File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 9595
9696
9797let version = new version_info_t
98- ~version: " 0.6.0_20250420 "
99- ~date: " 2025-04-20 "
98+ ~version: " 0.6.0_20250502 "
99+ ~date: " 2025-05-02 "
100100 ~licensee: None
101101 ~maxfilesize: None
102102 ()
Original file line number Diff line number Diff line change @@ -2346,9 +2346,24 @@ let translate_arm_instruction
23462346 match rtype with
23472347 | TVoid _ -> []
23482348 | _ ->
2349+ (* Return variables need to be treated somewhat differently
2350+ than other 'initial-value' variables, because in the
2351+ lifting to C code they get assigned to, while other
2352+ 'initial-value' variables always have their values
2353+ and thus are by default not included in the use-high
2354+ variables. *)
23492355 let r0_op = arm_register_op AR0 RD in
2350- let xr0 = r0_op#to_expr floc in
2351- get_use_high_vars_r [xr0]
2356+ let xr0_r = r0_op#to_expr floc in
2357+ TR. tfold_default
2358+ (fun xr0 ->
2359+ let xxr0 = floc#inv#rewrite_expr xr0 in
2360+ match xxr0 with
2361+ | XVar v when floc#env#is_return_value v ->
2362+ [floc#f#env#mk_arm_register_variable AR0 ]
2363+ | _ ->
2364+ get_use_high_vars_r ~is_pop: true [xr0_r])
2365+ (get_use_high_vars_r ~is_pop: true [xr0_r])
2366+ xr0_r
23522367 else
23532368 [] in
23542369 let popdefcmds =
You can’t perform that action at this time.
0 commit comments