foolab / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

lea for nacl - remove macro #268

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
incrementing a pointer should not need a macro.
currently its generating

lea 16(rax),eax

an add could be used, but will be slower on some cpus and sets flags.

Original issue reported on code.google.com by fbarch...@google.com on 12 Sep 2013 at 2:38

GoogleCodeExporter commented 9 years ago
'q' seems to work in 32 bit gcc

tools/clang/scripts/update.sh
GYP_DEFINES='clang=0 target_arch=ia32' ./build/gyp_chromium -f ninja --depth=. 
libyuv_test.gyp
ninja -j10 -C out/Debug
ninja -j10 -C out/Release

Original comment by fbarch...@google.com on 12 Sep 2013 at 3:11

GoogleCodeExporter commented 9 years ago
does not work in llvm 32 bit

source/row_posix.cc:1117:6: error: register %rcx is only available in 64-bit 
mode
    "lea       "MEMLEA(0x8,1)",%1              \n"
     ^
<inline asm>:40:15: note: instantiated into assembly here
lea       0x8(%rcx),%ecx
              ^~~~~

Original comment by fbarch...@google.com on 12 Sep 2013 at 3:13

GoogleCodeExporter commented 9 years ago
looks like a bug in llvm is going to prevent this.  The 'q' notation works with 
32 and 64 bit gcc, and 64 bit llvm, but not 32 bit llvm.

Original comment by fbarch...@google.com on 16 Sep 2013 at 4:50

GoogleCodeExporter commented 9 years ago
For now this appears to be unfeasible.  Can't fix.

Original comment by fbarch...@google.com on 23 Sep 2013 at 7:47