use slot constants
This commit is contained in:
parent
b7e0d3fba4
commit
b29de4600e
@ -7,7 +7,7 @@ module Register
|
|||||||
# save return register and create a new frame
|
# save return register and create a new frame
|
||||||
to = RegisterReference.new(:r0) # message base
|
to = RegisterReference.new(:r0) # message base
|
||||||
pc = RegisterReference.new(:pc)
|
pc = RegisterReference.new(:pc)
|
||||||
move1 = RegisterMachine.instance.str( pc , to , Virtual::Message::RETURN )
|
move1 = RegisterMachine.instance.str( pc , to , Virtual::Slot::RETURN )
|
||||||
block.replace(code , [move1] )
|
block.replace(code , [move1] )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -6,7 +6,7 @@ module Register
|
|||||||
#load the return address into pc, affecting return. (other cpus have commands for this, but not arm)
|
#load the return address into pc, affecting return. (other cpus have commands for this, but not arm)
|
||||||
message = RegisterReference.new(:r0)
|
message = RegisterReference.new(:r0)
|
||||||
pc = RegisterReference.new(:pc)
|
pc = RegisterReference.new(:pc)
|
||||||
move1 = RegisterMachine.instance.ldr( pc ,message , Virtual::Message::RETURN )
|
move1 = RegisterMachine.instance.ldr( pc ,message , Virtual::Slot::RETURN )
|
||||||
block.replace(code , [move1] )
|
block.replace(code , [move1] )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -20,9 +20,6 @@ module Virtual
|
|||||||
# During compilation Message and frame objects are created to do type analysis
|
# During compilation Message and frame objects are created to do type analysis
|
||||||
|
|
||||||
class Message
|
class Message
|
||||||
RETURN = 2
|
|
||||||
EXCEPTION = 3
|
|
||||||
SELF = 4
|
|
||||||
|
|
||||||
SELF_REG = :r0
|
SELF_REG = :r0
|
||||||
MESSAGE_REG = :r1
|
MESSAGE_REG = :r1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user