First part of int allocation

implemented allocate_int
instead of add_new_int
This commit is contained in:
Torsten Ruger
2018-11-21 11:12:39 +02:00
parent 5015a11108
commit bbb7dbef75
7 changed files with 98 additions and 12 deletions

View File

@ -55,7 +55,7 @@ module Risc
# add a risc instruction after the current (insertion point)
# the added instruction will become the new insertion point
def add_code( instruction )
raise "Not an instruction:#{instruction.to_s}" unless instruction.is_a?(Risc::Instruction)
raise "Not an instruction:#{instruction.to_s}:#{instruction.class.name}" unless instruction.is_a?(Risc::Instruction)
raise instruction.to_s if( instruction.class.name.split("::").first == "Arm")
new_current = instruction.last #after insertion this point is lost
@current.insert(instruction) #insert after current