tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] x86_64 assembler doesn't recognise pushfq and popfq


From: Jay Foad
Subject: [Tinycc-devel] x86_64 assembler doesn't recognise pushfq and popfq
Date: Wed, 18 May 2011 14:25:28 +0100

On x86_64 I get:

$ cat t.c
void f(void) {
    asm("pushfq" "\n\t" "popfq");
}
$ tcc t.c
t.c:3: error: unknown opcode 'pushfq'

The x86_64 assembler has these definitions, which seem to be copied
from the i386 assembler:

     DEF_ASM_OP0(pushfl, 0x9c)
     DEF_ASM_OP0(popfl, 0x9d)
     DEF_ASM_OP0(pushf, 0x9c)
     DEF_ASM_OP0(popf, 0x9d)

But for x86_64, I think "pushfl" and "popfl" should be changed to
"pushfq" and "popfq". I have attached a patch which implements this.

Thanks,
Jay.

Attachment: tcc-pushfq-popfq
Description: Binary data


reply via email to

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