automatically create binary once cpu instructions are there
This commit is contained in:
parent
3fcb4b74c7
commit
294f4d988f
@ -1,4 +1,6 @@
|
||||
module Arm
|
||||
# A translator is cpu specific and translates from risc instructions to a given
|
||||
# cpu. This one transltes to Arm Instructions.
|
||||
class Translator
|
||||
|
||||
# translator should translate from register instructio set to it's own (arm eg)
|
||||
|
@ -57,12 +57,9 @@ module Parfait
|
||||
@cpu_instructions << cpu if cpu
|
||||
nekst = nekst.next
|
||||
end
|
||||
@cpu_instructions
|
||||
end
|
||||
|
||||
def create_binary
|
||||
total = @cpu_instructions.total_byte_length / 4 + 1
|
||||
@binary = BinaryCode.new( total )
|
||||
@cpu_instructions
|
||||
end
|
||||
|
||||
# determine whether this method has an argument by the name
|
||||
|
@ -50,7 +50,6 @@ module Risc
|
||||
next unless method.is_a? Parfait::TypedMethod
|
||||
log.debug "CODE1 #{method.name}"
|
||||
# create binary for assembly
|
||||
method.create_binary
|
||||
binary = method.binary
|
||||
Positioned.set_position(binary,at)
|
||||
method.cpu_instructions.set_position( at + 12) # BinaryCode header
|
||||
|
Loading…
Reference in New Issue
Block a user