fix add instruction and test

This commit is contained in:
Torsten Ruger 2014-09-29 21:04:38 +03:00
parent ae65952d0a
commit 527e591e75
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ module Arm
right = Virtual::IntegerConstant.new( right )
end
if (right.is_a?(Virtual::IntegerConstant))
if true #TODO (right.fits_u8?)
if (right.fits_u8?)
# no shifting needed
operand = right.integer
immediate = 1

View File

@ -25,6 +25,6 @@ class TestAdd < MiniTest::Test
end
def test_big_add
code = @machine.add :r1 , :r1, 0x220
assert_code code , :add , [0x20,0x12,0x81,0xe2] #e2 81 12 20 e28110dc
assert_code code , :add , [0x22,0x1e,0x81,0xe2] #e2 81 1e 22
end
end