Skip to content

Commit b60843a

Browse files
committed
ARM: include BLX targets in assembly listing
1 parent a882fc5 commit b60843a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

CodeHawk/CHB/bchlibarm32/bCHARMOpcodeRecords.ml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
------------------------------------------------------------------------------
55
The MIT License (MIT)
66
7-
Copyright (c) 2021-2024 Aarno Labs, LLC
7+
Copyright (c) 2021-2025 Aarno Labs, LLC
88
99
Permission is hereby granted, free of charge, to any person obtaining a copy
1010
of this software and associated documentation files (the "Software"), to deal
@@ -1667,11 +1667,14 @@ let arm_opcode_to_string ?(width=12) (opc:arm_opcode_t) =
16671667
let default () = (get_record opc).ida_asm formatter in
16681668
let fnsdata = BCHFunctionData.functions_data in
16691669
match opc with
1670-
| BranchLink (ACCAlways, tgt) when tgt#is_absolute_address ->
1670+
| BranchLink (ACCAlways, tgt)
1671+
| BranchLinkExchange (ACCAlways, tgt)
1672+
| BranchLinkExchange (ACCUnconditional, tgt) when tgt#is_absolute_address ->
16711673
let tgtaddr = tgt#get_absolute_address in
16721674
if fnsdata#has_function_name tgtaddr then
16731675
let name = (fnsdata#get_function tgtaddr)#get_function_name in
1674-
(fixed_length_string "BL" width)
1676+
let popc = match opc with BranchLink _ -> "BL" | _ -> "BLX" in
1677+
(fixed_length_string popc width)
16751678
^ " <"
16761679
^ tgtaddr#to_hex_string
16771680
^ ":"

0 commit comments

Comments
 (0)