Skip to content

Commit

Permalink
Assembler: support some more instruction forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathell committed Jan 16, 2013
1 parent 784efb5 commit d26be8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lithium/assembler.clj
Expand Up @@ -67,6 +67,7 @@
[:pop reg16] [[:r+ 0x58]]
[:stosb] [0xaa]
[:ret] [0xc3]
[:cli] [0xfa]
[:inc reg16] [[:r+ 0x40]]
[:inc rm8] [0xfe :0]
[:cmp :al imm8] [0x3c :ib]
Expand All @@ -86,11 +87,15 @@
[:sub rm8 imm8] [0x80 :5 :ib]
[:sub rm16 imm8] [0x83 :5 :ib]
[:sub rm16 imm16] [0x81 :5 :iw]
[:sub reg8 rm8] [0x2a :r]
[:sub reg16 rm16] [0x2b :r]
[:and rm8 imm8] [0x80 :4 :ib]
[:and rm16 imm8] [0x83 :4 :ib]
[:and rm16 imm16] [0x81 :4 :iw]
[:mul rm8] [0xf6 :4]
[:mul rm16] [0xf7 :4]
[:div rm16] [0xf7 :6]
[:div rm8] [0xf6 :6] ;; FIXME: implement explicit byte/word memory sizes
[:sal rm8 1] [0xd0 :4]
[:sal rm8 imm8] [0xc0 :4 :ib]
[:sal rm16 1] [0xd1 :4]
Expand All @@ -99,6 +104,7 @@
[:sar rm8 imm8] [0xc0 :7 :ib]
[:sar rm16 1] [0xd1 :7]
[:sar rm16 imm8] [0xc1 :7 :ib]
[:stosb] [0xaa]
[:or rm8 imm8] [0x80 :1 :ib]
[:or rm16 imm16] [0x81 :1 :iw]
[:jCC label] [[:cc+ 0x70] :rb]
Expand Down

0 comments on commit d26be8c

Please sign in to comment.