move register constants here
This commit is contained in:
parent
05a7ded7d5
commit
6f0ae51dc5
@ -28,6 +28,31 @@ module Register
|
||||
sym = "r#{int + by}".to_sym
|
||||
RegisterReference.new( sym )
|
||||
end
|
||||
|
||||
SELF_REG = :r0
|
||||
MESSAGE_REG = :r1
|
||||
FRAME_REG = :r2
|
||||
NEW_MESSAGE_REG = :r3
|
||||
|
||||
TMP_REG = :r4
|
||||
|
||||
def self.self_reg
|
||||
new SELF_REG
|
||||
end
|
||||
def self.messsage_reg
|
||||
new MESSAGE_REG
|
||||
end
|
||||
def self.frame_reg
|
||||
new FRAME_REG
|
||||
end
|
||||
def self.new_messsage_reg
|
||||
new NEW_MESSAGE_REG
|
||||
end
|
||||
def self.tmp_reg
|
||||
new TMP_REG
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user