movs is not allowed into pc
Illegal instruction it says Otherwise the status update is nice (for branches) and we’ll keep
This commit is contained in:
@ -31,7 +31,9 @@ module Arm
|
||||
assert_equal should.length , binary.length , "code length wrong for #{code.inspect}"
|
||||
index = 0
|
||||
binary.each_byte do |byte |
|
||||
assert_equal should[index] , byte , "byte #{index} 0x#{should[index].to_s(16)} != 0x#{byte.to_s(16)}"
|
||||
msg = "byte #{index} 0x#{should[index].to_s(16)} != 0x#{byte.to_s(16)} | "
|
||||
msg += "#{should[index].to_s(2)} != #{byte.to_s(2)}"
|
||||
assert_equal should[index] , byte , msg
|
||||
index += 1
|
||||
end
|
||||
end
|
||||
|
@ -10,7 +10,11 @@ module Arm
|
||||
end
|
||||
def test_mov_pc
|
||||
code = @machine.mov :pc, 5
|
||||
assert_code code , :mov , [0x05,0xf0,0xb0,0xe3] #e3 b0 f0 06
|
||||
assert_code code , :mov , [0x05,0xf0,0xa0,0xe3] #e3 a0 f0 06
|
||||
end
|
||||
def test_mov_pc_r1
|
||||
code = @machine.mov :pc, :r1
|
||||
assert_code code , :mov , [0x01,0xf0,0xa0,0xe1] #e1 a0 f0 01
|
||||
end
|
||||
def test_mov_max_128
|
||||
code = @machine.mov :r1, 128
|
||||
|
Reference in New Issue
Block a user