mirror of
https://github.com/samsonjs/compiler.git
synced 2026-04-27 14:57:45 +00:00
implement AND for r/m32, r32
This commit is contained in:
parent
9667c21e8b
commit
e3b220dd2d
1 changed files with 6 additions and 1 deletions
|
|
@ -834,7 +834,12 @@ module Assembler
|
||||||
|
|
||||||
|
|
||||||
def and_(dest, src)
|
def and_(dest, src)
|
||||||
if rm?(dest, 8) && immediate?(src, 8)
|
if rm?(dest) && register?(src)
|
||||||
|
asm do
|
||||||
|
emit_byte(0x21)
|
||||||
|
emit_modrm(dest, src.regnum)
|
||||||
|
end
|
||||||
|
elsif rm?(dest, 8) && immediate?(src, 8)
|
||||||
asm do
|
asm do
|
||||||
emit_byte(0x80)
|
emit_byte(0x80)
|
||||||
emit_modrm(dest, 4)
|
emit_modrm(dest, 4)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue