[Tinycc-devel] x86-64: absolute data refs are pc-relative

2016-09-05 Thread Zdeněk Pavlas
$ cat const_data.c int main() { printf("%d\n", *(int*) 0); } $ objdump -dr const_data.o 0:55 push %rbp 1:48 89 e5 mov%rsp,%rbp 4:48 81 ec 00 00 00 00 sub$0x0,%rsp b:8b 05 fc ff ff ffmov-0x4(%rip),%eax

[Tinycc-devel] Patch for review - duplicate case label checking in switches

2016-09-15 Thread Zdeněk Pavlas
Hi Arnold, The current TOK_SWITCH/TOK_CASE code clearly prefers simplicity over performance and features. It was just fine for OTCC but I agree with you it should be improved. However, I don't like this patch, because it adds time+space complexity without improving generated code in any way.