Skip to content

Commit

Permalink
implement AND for r/m32, r32
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonjs committed Feb 15, 2010
1 parent 9667c21 commit e3b220d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion asm/binary.rb
Expand Up @@ -834,7 +834,12 @@ def shr(op, n)




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)
Expand Down

0 comments on commit e3b220d

Please sign in to comment.