CensoredUsername / dynasm-rs

A dynasm-like tool for rust.
https://censoredusername.github.io/dynasm-rs/language/index.html
Mozilla Public License 2.0
720 stars 54 forks source link

setb isn't implemented #38

Closed eira-fransham closed 5 years ago

eira-fransham commented 5 years ago

Currently, dynasm-rs supports setbe, seta, setae, setl, setle, setg, setge, sete and setne but not setb. There's no reason for it not to, it just fails if you try to emit it. As far as I can tell setc and setnae are precisely equivalent, but it still means that intent is harder to express than it should be. Other synonyms are supported, there's no reason for this one not to be.

CensoredUsername commented 5 years ago

I just checked our ops definitions and found this:

"set
    b"        |
"setc"        |
"setnae"      = [
    b"vb",       [0x0F, 0x92      ], 0;
]
"setn
    b"       |
"setnc"       |
"setae"       = [
    b"vb",       [0x0F, 0x93      ], 0;
]

There seems to be an accidental enter in there causing the op to be missing, whoops.

I'll push fixed op definitions, in the meantime you can indeed use the aliases.

CensoredUsername commented 5 years ago

This has been fixed in 35456e7 and published in 0.3.0