Le jeudi 29 août 2013 17:12:44 David Mertens a écrit : > I've subscribed to the "tcc" filter on Stack Exchange. I highly suggest > that others sign up. Questions seem to trickle in, such as this question > about the jmp command: > > http://stackoverflow.com/questions/18517634/tiny-c-compiler-error-unknown-op > code-jmp
So I looked at it and the reason it works on x86_64 but not on i386 target is that for i386 target it only works when I386_ASM_16 is defined (16-bit support). It seems from (i386|x86_64)-asm.h that jmp can take a register (such as %eax) instead of an address (*%eax). I guess in one case (register) it does a jump relative to the beginning of the segment while for the address case it's an absolute jump at the address stored in the register. As to the comment about jmp not being able to use eax, tcc doesn't know about register constraints from what I can see so any register would be accepted even if illegal. Best regards, Thomas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
