aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvia Taylor <sylvia.taylor@arm.com>2019-07-03 10:57:28 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2019-07-03 10:57:28 +0000
commit0e510d1824241953c67b38f7a894de7238c23c61 (patch)
treeff23f7ae7ef98f75b63b9afedbba8fbfe3a38ff0
parente676d70449ae990db8ac8d242d54342440f9204a (diff)
downloadgcc-0e510d1824241953c67b38f7a894de7238c23c61.zip
gcc-0e510d1824241953c67b38f7a894de7238c23c61.tar.gz
gcc-0e510d1824241953c67b38f7a894de7238c23c61.tar.bz2
[aarch64]: force frame pointer setup before tlsdesc call
The operation that sets up the tlsdesc register is really a function call; as such, the frame pointer should really be correctly set up before this happens. However, because it does not appear as a call_insn in the RTL the normal dependencies are not added automatically. We fix this by adding a USE of FP_REGNUM to prevent migration of the frame-pointer setup past the call by the scheduler. If a frame pointer is not being used, this is harmless since it only represents a scheduling constraint. 2019-07-03 Sylvia Taylor <sylvia.taylor@arm.com> * config/aarch64/aarch64.md (FP_REGNUM): New constant. (tlsdesc_small_advsimd_<mode>): Add use of FP_REGNUM. (tlsdesc_small_sve_<mode>): Likewise. From-SVN: r273000
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/aarch64/aarch64.md7
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5b255ad..68eb338 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-07-03 Sylvia Taylor <sylvia.taylor@arm.com>
+
+ * config/aarch64/aarch64.md (FP_REGNUM): New constant.
+ (tlsdesc_small_advsimd_<mode>): Add use of FP_REGNUM.
+ (tlsdesc_small_sve_<mode>): Likewise.
+
2019-07-03 Martin Liska <mliska@suse.cz>
* Makefile.in: Define ZSTD_LIB.
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 7026b3a..b11bf15 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -120,6 +120,7 @@
;; Scratch registers used in frame layout.
(IP0_REGNUM 16)
(IP1_REGNUM 17)
+ (FP_REGNUM 29)
(LR_REGNUM 30)
]
)
@@ -6731,7 +6732,8 @@
UNSPEC_TLSDESC))
(clobber (reg:DI LR_REGNUM))
(clobber (reg:CC CC_REGNUM))
- (clobber (match_scratch:DI 1 "=r"))]
+ (clobber (match_scratch:DI 1 "=r"))
+ (use (reg:DI FP_REGNUM))]
"TARGET_TLS_DESC && !TARGET_SVE"
"adrp\\tx0, %A0\;ldr\\t%<w>1, [x0, #%L0]\;add\\t<w>0, <w>0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
[(set_attr "type" "call")
@@ -6794,7 +6796,8 @@
(clobber (reg:VNx2BI P13_REGNUM))
(clobber (reg:VNx2BI P14_REGNUM))
(clobber (reg:VNx2BI P15_REGNUM))
- (clobber (match_scratch:DI 1 "=r"))]
+ (clobber (match_scratch:DI 1 "=r"))
+ (use (reg:DI FP_REGNUM))]
"TARGET_TLS_DESC && TARGET_SVE"
"adrp\\tx0, %A0\;ldr\\t%<w>1, [x0, #%L0]\;add\\t<w>0, <w>0, %L0\;.tlsdesccall\\t%0\;blr\\t%1"
[(set_attr "type" "call")