A Fews Bugs

Vivek Mohan vivek.mt at gmail.com
Sat May 20 07:20:29 PDT 2006


Hi,

I'm Vivek. I use Yasm for verification of my own project - udis86:
(http://udis86.sourceforge.net/). Great work with the assembler. I'd
just like to point out, what I think are, a few bugs in YASM.

(1) YASM assembles "pushfd" in 64-bits mode, generating 0x9c, whereas
the AMD manuals state that pushfd is invalid in that mode.

(2) YASM assembles "pushfq" in 64-bits mode, generating 0x48 0x9c. A
rex prefix is not required for pushfq, as it defaults to 64-bit
operand size. It should generate 0x9c.

(3) YASM seems to ignore invalid opcodes that have no operands. I
discovered this when a program I wrote assembled without any errors
with YASM, but wasn't generating the code I was expecting. For example
the following program assembles perfectly with YASM.

[bits 64]

  htl
  pushhfq
  innt3

I think this is critical, since they are typos, and in a large
program, if YASM ignores them, the programmer would be misled to
believe it's a logical error rather than a syntactical one.

Regards,
Vivek


More information about the yasm-devel mailing list