Hi Andy, On Fri, May 10, 2019 at 07:30:24PM +0300, ANDY TAKKER wrote: > A lot of words are said about compatibility and portability, but GCC > and PCC bring one result, and TCC is completely different.
Let's for a second assume that you run that code on an architecture with sizeof(char*) == sizeof(int). Why should TCC generate the same output as GCC and PCC? You attempt to skip the prologue of the function by adding 3 to the address, but the prologue is not standardized. The one used by TCC is different from the one used by GCC. Just compare the output of GCC with -O0 and GCC with -O3 -fomit-frame-pointer. That should also give you different results. And with -O3 GCC might even decide to omit that asm statement because it has no needed outputs, doesn't clobber anything and isn't marked as volatile. > Here is > another interesting link closely related to the TCC. > https://forum.nasm.us/index.php?topic=2524.0 If you have access to the output of that obscure mix of compiler, assembler, and linker, please provide the disassembly of the _start function. > nop&double jump: Sometimes TCC has to reserve space for an instruction before it knows if it is needed or how long it will be. To fill the gaps, it uses nops. Best regards, Daniel _______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
