define and use syscall_XX registers
rather than use hardcoded r0 etc use syscall_X change the syscalls and interpreter to use them later use platform to map from syscall_X to actually used register (like r0 in arm)
This commit is contained in:
@ -19,6 +19,13 @@ module Risc
|
||||
def to_s
|
||||
class_source name
|
||||
end
|
||||
end
|
||||
|
||||
# return the nth register that a sycall needs
|
||||
# these map to different physical registers in the Platform
|
||||
# first arg is (running 1..) integer, second (optional) type
|
||||
def self.syscall_reg( number , type = nil)
|
||||
type = :Integer unless type
|
||||
RegisterValue.new("syscall_#{number}".to_sym , type)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user