make arm use branch_lsteners
This commit is contained in:
@ -41,6 +41,11 @@ module Arm
|
||||
end
|
||||
end
|
||||
|
||||
# if branch_to is implemented it must return the label it branches to
|
||||
def branch_to
|
||||
@first unless opcode == :swi
|
||||
end
|
||||
|
||||
def handle_call(io)
|
||||
case @first
|
||||
when Risc::Label
|
||||
|
@ -38,6 +38,7 @@ module Elf
|
||||
|
||||
@machine.object_positions.each do |slot , position|
|
||||
next if slot.is_a?(Parfait::BinaryCode)
|
||||
next if slot.class.name.include?("Arm")
|
||||
if( slot.respond_to? :rxf_reference_name )
|
||||
label = "#{slot.rxf_reference_name}"
|
||||
else
|
||||
|
@ -97,6 +97,7 @@ module Risc
|
||||
instruction = instruction.next
|
||||
end
|
||||
branches.each do |branch|
|
||||
next if branch.branch_to.nil? #nil allowed for when there is no branch
|
||||
label_pos = Position.get(branch.branch_to)
|
||||
label_pos.position_listener( BranchListener.new(branch) )
|
||||
end
|
||||
|
Reference in New Issue
Block a user