From 25a39ae6be7a4b65e01d9bb6b1fd94688aa674b0 Mon Sep 17 00:00:00 2001 From: "xavier.leroy" Date: Fri, 23 Aug 2019 08:18:27 +0200 Subject: Offset out of range for ldp/stp instructions These instructions are generated by __builtin_memcpy. --- aarch64/Asmexpand.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aarch64/Asmexpand.ml b/aarch64/Asmexpand.ml index 71bd0042..ab155e9c 100644 --- a/aarch64/Asmexpand.ml +++ b/aarch64/Asmexpand.ml @@ -146,7 +146,9 @@ let expand_annot_val kind txt targ args res = Temporary registers used: x15 x16 x17 x29 x30. *) let offset_in_range ofs = - let ofs = Z.to_int64 ofs in 0L <= ofs && ofs < 0x1000L + (* The 512 upper bound comes from ldp/stp. Single-register load/store + instructions support bigger offsets. *) + let ofs = Z.to_int64 ofs in 0L <= ofs && ofs < 512L let memcpy_small_arg sz arg tmp = match arg with -- cgit