tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] inline assembly problem with cmovcl/cmovbl


From: Michael Matz
Subject: Re: [Tinycc-devel] inline assembly problem with cmovcl/cmovbl
Date: Sun, 3 Dec 2017 05:00:19 +0100 (CET)
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Hi,

On Sat, 2 Dec 2017, Somchai Smythe wrote:

I realize there are other ways to get this cpuid information, but if I
wanted to use cmovcl in some other code I think the inline assembler
really is broken.  I tried the synonym cmovbl, but it didn't work
either.  Both cmovc and cmovb are listed in intel's manual as
generating 0x04 0x42 /r, so I think they are just two mnemonics for
the same instruction.  If I delete the 'l' suffix, and use bare
'cmovc' (or bare 'cmovb'), it will compile.

And that's really the right solution: Unlike e.g. mov and push cmovCC always has register operands from which the size can be inferred, so it's always okay to remove the suffix.

But I've now added some code to mob which accepts (and ignores) size suffixes for cmovCC in a way that doesn't blow up our assembler tables even more, so your example should work now.


Ciao,
Michael.



reply via email to

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