[cfe-users] clang x86 assembler 8-bit displacements

2016-04-26 Thread Zenith432 via cfe-users
This time a question about the integrated assembler --- code .code32 .data L1: .quad 88 .equ L2, . - L1 .byte 29 .text mov 55(%ebx), %eax mov L2(%ebx), %eax end code clang -c -o file.o file.s gives this - 8b4337 movl

[cfe-users] dereferencing null pointers

2016-04-25 Thread Zenith432 via cfe-users
target is x86_64-apple-darwin15.4.0 (Apple LLVM 7.3.0) This function = vec.c = #include int vec(int index) { return ((int*) NULL)[index]; } === [Yes, I know it's undefined behavior in ansi C]. Compiled with "clang -c -O0 -o vec.o vec.c" yields this code = 000