aboutsummaryrefslogtreecommitdiffstats
path: root/arm/TargetPrinter.ml
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2017-08-18 11:23:05 +0200
committerGitHub <noreply@github.com>2017-08-18 11:23:05 +0200
commitf66711dc06c73adf3dd715c564cb6d27b51c5199 (patch)
treee68a132caa6df4bc3215b638dfe83ddf9db7a506 /arm/TargetPrinter.ml
parentab6d5e98b4d967cc7834ad457b36bbf4c141f2ee (diff)
parentfc1b2bfea598354a3e939de35d270376c880e1b0 (diff)
downloadcompcert-f66711dc06c73adf3dd715c564cb6d27b51c5199.tar.gz
compcert-f66711dc06c73adf3dd715c564cb6d27b51c5199.zip
Merge pull request #22 from AbsIntPrivate/arm_large_offsets
Issue #P18: handle large offsets when accessing return address and back link in the stack frame
Diffstat (limited to 'arm/TargetPrinter.ml')
-rw-r--r--arm/TargetPrinter.ml15
1 files changed, 3 insertions, 12 deletions
diff --git a/arm/TargetPrinter.ml b/arm/TargetPrinter.ml
index 60f52efd..1dfe8af6 100644
--- a/arm/TargetPrinter.ml
+++ b/arm/TargetPrinter.ml
@@ -539,23 +539,13 @@ struct
| Psbc (r1,r2,sa) ->
fprintf oc " sbc %a, %a, %a\n" ireg r1 ireg r2 shift_op sa; 1
| Pstr(r1, r2, sa) | Pstr_a(r1, r2, sa) ->
- fprintf oc " str %a, [%a, %a]\n" ireg r1 ireg r2 shift_op sa;
- begin match r1, r2, sa with
- | IR14, IR13, SOimm n -> cfi_rel_offset oc "lr" (camlint_of_coqint n)
- | _ -> ()
- end;
- 1
+ fprintf oc " str %a, [%a, %a]\n" ireg r1 ireg r2 shift_op sa; 1
| Pstrb(r1, r2, sa) ->
fprintf oc " strb %a, [%a, %a]\n" ireg r1 ireg r2 shift_op sa; 1
| Pstrh(r1, r2, sa) ->
fprintf oc " strh %a, [%a, %a]\n" ireg r1 ireg r2 shift_op sa; 1
| Pstr_p(r1, r2, sa) ->
- fprintf oc " str %a, [%a], %a\n" ireg r1 ireg r2 shift_op sa;
- begin match r1, r2, sa with
- | IR14, IR13, SOimm n -> cfi_rel_offset oc "lr" (camlint_of_coqint n)
- | _ -> ()
- end;
- 1
+ fprintf oc " str %a, [%a], %a\n" ireg r1 ireg r2 shift_op sa; 1
| Pstrb_p(r1, r2, sa) ->
fprintf oc " strb %a, [%a], %a\n" ireg r1 ireg r2 shift_op sa; 1
| Pstrh_p(r1, r2, sa) ->
@@ -751,6 +741,7 @@ struct
assert false
end
| Pcfi_adjust sz -> cfi_adjust oc (camlint_of_coqint sz); 0
+ | Pcfi_rel_offset ofs -> cfi_rel_offset oc "lr" (camlint_of_coqint ofs); 0
let no_fallthrough = function
| Pb _ -> true