pass binary that arm instruction belongs to in

at least to first. repositioning and stuff next
This commit is contained in:
Torsten Ruger
2018-05-06 19:56:36 +03:00
parent 415df49199
commit e89c4d1ce1
4 changed files with 31 additions and 14 deletions

View File

@ -78,7 +78,7 @@ module Risc
translate_arm unless @translated
#need the initial jump at 0 and then functions
Position.set_position(binary_init,0)
cpu_init.set_position( 12 ,0)
cpu_init.set_position( 12 ,0 , binary_init)
@code_start = position_objects( binary_init.padded_length )
# and then everything code
position_code
@ -110,7 +110,7 @@ module Risc
at = @code_start
objects.each do |id , method|
next unless method.is_a? Parfait::TypedMethod
method.cpu_instructions.set_position( at + 12)
method.cpu_instructions.set_position( at + 12 , 0 , method.binary)
before = at
nekst = method.binary
while(nekst)