Thomas Preud'homme wrote:
x86_64-asm.h defines 3 kind of jmp instruction, 2 of them being:
ALT(DEF_ASM_OP1(jmp, 0xff, 4, OPC_MODRM, OPT_INDIR))
ALT(DEF_ASM_OP1(jmp, 0xff, 0, OPC_JMP | OPC_WL, OPT_REGW))
so basically the star select between the two. *%eax means indirection so first
kind, %eax means register so second choice. If gcc treat both syntax as the
same it means one of the two is incorrect.
Hard to say seen tcc's full spectrum of bugs there:
- emits wrong codes, e.g. for "jmp *(%eax)"
- accepts invalid input, e.g. "jmp *%eax"
- inconsistence wrt. optional forms: accepts "jmp %rax" but does
not accept "jmp (%rax)"
(all for x86-64)
Note that in my case, on x86_64, both syntaxs are refused by gcc, even with
ecx as suggested in the stackoverflow link.
Sure.
I've tried on i386 and as outputs:
"Warning: indirect jmp without `*'" so I guess the second alternative is wrong
and should be removed. Can someone confirm this?
Yes with gcc 4.5. No with gcc 3.4.
--- grischka
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel