[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Stack Overflow question about jmp

From: Thomas Preud'homme
Subject: Re: [Tinycc-devel] Stack Overflow question about jmp
Date: Sun, 22 Sep 2013 17:09:54 +0200
User-agent: KMail/4.10.5 (Linux/3.10-3-amd64; KDE/4.10.5; x86_64; ; )

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,


Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]