Hello TCC maintainers,
I am compiling the following code (using libtcc, I checked also mob branch):
unsigned int f1() { return *(int*)0x7ffeb7162010ULL; }
I am facing the following issues:
- in the CValue struct, address field is declared as "unsigned int", therefore the address was cut.
- in load(ref, value) function (x86_64-gen.c) "fc" (should denote constant address) is also "int".
- even if my pointer fits in 32 bits the following wrong code is generated:
0xaaa7bb: mov 0xaaafdc(%rip),%eax # 0x155579d
This code was generated when my pointer was (0xaaafdc+4).
In general, PC relative indirection looks inappropriate in case of arbitrary const pointer indirection.
Another question - when a next stable version is going to be released? "mob" branch has a lots of good fixes we wanted to use.