bunch of method extraction on instructions
This commit is contained in:
@ -32,14 +32,11 @@ module Arm
|
||||
else
|
||||
raise "invalid operand argument #{right.inspect} , #{inspect}"
|
||||
end
|
||||
result = reg_code(@result)
|
||||
left_code = reg_code(left)
|
||||
op = shift_handling
|
||||
instuction_class = 0b00 # OPC_DATA_PROCESSING
|
||||
if( opcode == :mul )
|
||||
operand = reg_code(left) + 0x90
|
||||
op = reg_code(right) << 8
|
||||
result = 0
|
||||
left_code = reg_code(@result)
|
||||
end
|
||||
val = shift(operand , 0)
|
||||
@ -55,6 +52,14 @@ module Arm
|
||||
assemble_extra
|
||||
end
|
||||
|
||||
def result
|
||||
opcode == :mul ? 0 : reg_code(@result)
|
||||
end
|
||||
|
||||
def instuction_class
|
||||
0b00 # OPC_DATA_PROCESSING
|
||||
end
|
||||
|
||||
# Arm can't load any large (over 1024) numbers, or larger with fancy shifting,
|
||||
# but then the lower bits must be 0's. Especially in constant loading random large numbers
|
||||
# happen, and so they are split into two instructions. An exection is thrown, that triggers
|
||||
|
Reference in New Issue
Block a user