minor
This commit is contained in:
parent
59952f8503
commit
c56b7cdf09
@ -46,6 +46,7 @@ module Arm
|
||||
raise "Not CallSite #{call.inspect}" unless call.is_a? Vm::CallSite
|
||||
raise "Not linked #{call.inspect}" unless call.function
|
||||
into << call( call.function )
|
||||
raise "No return type for #{call.function.name}" unless call.function.return_type
|
||||
call.function.return_type
|
||||
end
|
||||
|
||||
|
@ -22,8 +22,8 @@ module Arm
|
||||
}
|
||||
#return the bit patter that the cpu uses for the current instruction @attributes[:opcode]
|
||||
def op_bit_code
|
||||
bit_code = OPCODES[@attributes[:opcode]]
|
||||
bit_code or raise "no code found for #{@attributes[:opcode].inspect}"
|
||||
bit_code = OPCODES[opcode]
|
||||
bit_code or raise "no code found for #{opcode} #{inspect}"
|
||||
end
|
||||
|
||||
#codition codes can be applied to many instructions and thus save branches
|
||||
|
@ -3,7 +3,7 @@ module Arm
|
||||
class LogicInstruction < Vm::LogicInstruction
|
||||
include Arm::Constants
|
||||
|
||||
def initialize(result , left , right , attributes)
|
||||
def initialize(result , left , right , attributes = {})
|
||||
super(result ,left , right , attributes)
|
||||
@attributes[:update_status] = 0 if @attributes[:update_status] == nil
|
||||
@attributes[:condition_code] = :al if @attributes[:condition_code] == nil
|
||||
|
@ -27,7 +27,7 @@ module Arm
|
||||
right = Vm::IntegerConstant.new( right.position - self.position - 8 )
|
||||
@rn = :pc
|
||||
end
|
||||
if( right.is_a? Fixnum ) #HACK to not have to change the code just now
|
||||
if( right.is_a? Fixnum )
|
||||
right = Vm::IntegerConstant.new( right )
|
||||
end
|
||||
if (right.is_a?(Vm::IntegerConstant))
|
||||
|
Loading…
Reference in New Issue
Block a user