about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-15 07:44:48 +0200
committerGitHub <noreply@github.com>2021-10-15 07:44:48 +0200
commitf0555cefae16edba6ab1e89bc77b4897d1a193b8 (patch)
treee24de38c04a96beb13c2fe1433dc31b56f4d049b /src/test
parente2c28ad1e7c5f5fc74c6472c27c8f6adfebb5b8c (diff)
parentaf5b146324e2a20a432649723cf8d22487b1e499 (diff)
downloadrust-f0555cefae16edba6ab1e89bc77b4897d1a193b8.tar.gz
rust-f0555cefae16edba6ab1e89bc77b4897d1a193b8.zip
Rollup merge of #89880 - adamgemmell:dev/nc-relocation, r=Amanieu
Use non-checking TLS relocation in aarch64 asm! sym test.

The checking variant ensures that the offset required is not larger than 12 bits - hence we wouldn't ever need the upper 12 bits.

It's unlikely to ever fail in this small test but this is technically correct.

This was noticed incidentally when we found that LLD doesn't support the `tprel_lo12` relocation, even though LLVM can apparently generate it when using `-mtls-size=12`.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/asm/aarch64/sym.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/ui/asm/aarch64/sym.rs b/src/test/ui/asm/aarch64/sym.rs
index db732e96b80..6fd1192eec6 100644
--- a/src/test/ui/asm/aarch64/sym.rs
+++ b/src/test/ui/asm/aarch64/sym.rs
@@ -55,7 +55,7 @@ macro_rules! static_tls_addr {
                 // Add the top 12 bits of the symbol's offset
                 "add {out}, {out}, :tprel_hi12:{sym}",
                 // And the bottom 12 bits
-                "add {out}, {out}, :tprel_lo12:{sym}",
+                "add {out}, {out}, :tprel_lo12_nc:{sym}",
                 out = out(reg) result,
                 sym = sym $s
             );