finish syscall

works, even had to fix parfait bug to see
This commit is contained in:
Torsten Ruger
2015-06-24 16:07:27 +03:00
parent 1a82ebcd69
commit 59188105ba
3 changed files with 8 additions and 5 deletions

View File

@ -4,13 +4,14 @@ module Arm
def run block
block.codes.dup.each do |code|
next unless code.is_a? Register::Syscall
new_codes = []
load = ArmMachine.ldr( :r1 , code.constant )
store = ArmMachine.str( code.register , code.array , code.index )
raise "uups" unless code.name == :putstring
new_codes = [ ArmMachine.mov( :r1 , 20 ) ]
new_codes << ArmMachine.ldr( :r0 , Virtual::Slot::MESSAGE_REGISTER, Virtual::SELF_INDEX)
new_codes << ArmMachine.mov( :r7 , 4 )
new_codes << ArmMachine.swi( 0 )
block.replace(code , new_codes )
end
end
end
Virtual.machine.add_pass "Arm::SetImplementation"
Virtual.machine.add_pass "Arm::SyscallImplementation"
end