diff options
-rw-r--r-- | src/arch/link.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/arch/link.c b/src/arch/link.c index a5b8ca1..c11fe54 100644 --- a/src/arch/link.c +++ b/src/arch/link.c @@ -61,10 +61,10 @@ void handle_jump_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon g_arch_instruction_unlock_operands(instr); - if (G_IS_IMM_OPERAND(op) && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt)) + if (G_IS_IMM_OPERAND(op) + && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt) + && g_exe_format_translate_address_into_vmpa(format, virt, &addr)) { - init_vmpa(&addr, VMPA_NO_PHYSICAL, virt); - target = g_arch_processor_find_instr_by_address(proc, &addr); if (target != NULL) @@ -125,10 +125,7 @@ void handle_branch_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcC else if (G_IS_IMM_OPERAND(op)) { if (g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt)) - { - init_vmpa(&addr, VMPA_NO_PHYSICAL, virt); - defined = true; - } + defined = g_exe_format_translate_address_into_vmpa(format, virt, &addr); } g_object_unref(G_OBJECT(op)); @@ -193,10 +190,10 @@ void handle_call_as_link(GArchInstruction *instr, GArchProcessor *proc, GProcCon g_arch_instruction_unlock_operands(instr); - if (G_IS_IMM_OPERAND(op) && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt)) + if (G_IS_IMM_OPERAND(op) + && g_imm_operand_to_virt_t(G_IMM_OPERAND(op), &virt) + && g_exe_format_translate_address_into_vmpa(format, virt, &addr)) { - init_vmpa(&addr, VMPA_NO_PHYSICAL, virt); - target = g_arch_processor_find_instr_by_address(proc, &addr); if (target != NULL) |