add register names to allocator
make platform instantiate it basic plumbing
This commit is contained in:
@ -8,14 +8,26 @@ module Risc
|
||||
# return the translator instance that traslates risc intructions into
|
||||
# platform specific ones
|
||||
def translator
|
||||
raise "not implemented"
|
||||
end
|
||||
|
||||
# return an integer where the binary is loaded
|
||||
def loaded_at
|
||||
raise "not implemented"
|
||||
end
|
||||
|
||||
# return the number of registers the platform supports
|
||||
def num_registers
|
||||
raise "not implemented"
|
||||
end
|
||||
|
||||
# return the Allocator for the platform
|
||||
# stanrard implementation return StandardAllocator, which uses
|
||||
# num_registers and assumes rXX naming (ie arm + interpreter)
|
||||
#
|
||||
# Possibility to override and implemented different schemes
|
||||
def allocator(compiler)
|
||||
StandardAllocator.new(compiler , self )
|
||||
end
|
||||
|
||||
# Factory method to create a Platform object according to the platform
|
||||
|
Reference in New Issue
Block a user