File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -867,11 +867,16 @@ let translate_arm_instruction
867867 | Branch (_, op, _)
868868 | BranchExchange (ACCAlways , op)
869869 when op#is_register && op#get_register = ARLR ->
870- let r0_op = arm_register_op AR0 RD in
871- let usevars = get_register_vars [r0_op] in
872- let xr0 = r0_op#to_expr floc in
873- let usehigh = get_use_high_vars_r [xr0] in
874- let defcmds = floc#get_vardef_commands ~use: usevars ~usehigh ctxtiaddr in
870+ let returntype = finfo#get_summary#get_returntype in
871+ let defcmds =
872+ match returntype with
873+ | TVoid _ -> []
874+ | _ ->
875+ let r0_op = arm_register_op AR0 RD in
876+ let usevars = get_register_vars [r0_op] in
877+ let xr0 = r0_op#to_expr floc in
878+ let usehigh = get_use_high_vars_r [xr0] in
879+ floc#get_vardef_commands ~use: usevars ~usehigh ctxtiaddr in
875880 default defcmds
876881
877882 | Branch (_, op, _)
You can’t perform that action at this time.
0 commit comments