diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-31 11:19:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-31 11:19:07 +0200 |
| commit | fd1c0d8585fa5de58fa0daa31d21aab63619a00c (patch) | |
| tree | 69b4304be113efab3b4a4f4343f34b858ff90a21 /tests | |
| parent | 617d3d6d722c432cdcbf210e6db55c3bdeafe381 (diff) | |
| parent | b65c2afdfd9aaee977302516c9ef177861abfe74 (diff) | |
| download | rust-fd1c0d8585fa5de58fa0daa31d21aab63619a00c.tar.gz rust-fd1c0d8585fa5de58fa0daa31d21aab63619a00c.zip | |
Rollup merge of #111772 - liushuyu:ubuntu/mips64-linkage, r=jackh726
Fix linkage for large binaries on mips64 platforms This pull request fixes the linkage for large binaries on mips64 platforms by enabling the `xgot` feature in LLVM. It is well understood that the generated binary will gain a hefty performance penalty where the external symbol jumps now cost at least three instructions each. Also, this pull request does not address the same issue on the mips32 counterparts (due to being unable to test the changes thoroughly). Should fix #52108
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/assembly/asm/mips-types.rs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/assembly/asm/mips-types.rs b/tests/assembly/asm/mips-types.rs index 6aa28b062db..27469b22980 100644 --- a/tests/assembly/asm/mips-types.rs +++ b/tests/assembly/asm/mips-types.rs @@ -72,7 +72,7 @@ macro_rules! check_reg { ($func:ident, $ty:ty, $reg:tt, $mov:literal) => { // mips32-LABEL: sym_static_32: // mips32: #APP -// mips32: lw $3, %got(extern_static) +// mips32: lw $3, %got(extern_static)($gp) // mips32: #NO_APP #[cfg(mips32)] #[no_mangle] @@ -82,7 +82,7 @@ pub unsafe fn sym_static_32() { // mips32-LABEL: sym_fn_32: // mips32: #APP -// mips32: lw $3, %got(extern_func) +// mips32: lw $3, %got(extern_func)($gp) // mips32: #NO_APP #[cfg(mips32)] #[no_mangle] @@ -92,7 +92,9 @@ pub unsafe fn sym_fn_32() { // mips64-LABEL: sym_static_64: // mips64: #APP -// mips64: ld $3, %got_disp(extern_static) +// mips64: lui $3, %got_hi(extern_static) +// mips64: daddu $3, $3, $gp +// mips64: ld $3, %got_lo(extern_static)($3) // mips64: #NO_APP #[cfg(mips64)] #[no_mangle] @@ -102,7 +104,9 @@ pub unsafe fn sym_static_64() { // mips64-LABEL: sym_fn_64: // mips64: #APP -// mips64: ld $3, %got_disp(extern_func) +// mips64: lui $3, %got_hi(extern_func) +// mips64: daddu $3, $3, $gp +// mips64: ld $3, %got_lo(extern_func)($3) // mips64: #NO_APP #[cfg(mips64)] #[no_mangle] |
