]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
rust-target-config: Update the data layout for x86-64 target
authorDeepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Thu, 17 Oct 2024 12:32:44 +0000 (05:32 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 22 Oct 2024 11:26:25 +0000 (12:26 +0100)
The data layout for x86-64 target was different in rust from llvm.
It resulted in the following data layout error:
--------------------------------------------------------------------------------------
error: data-layout for target `x86_64-linux`, `e-m:e-i64:64-f80:128-n8:16:32:64-S128`,
differs from LLVM target's `x86_64-unknown-linux-gnu` default layout,
`e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128`
--------------------------------------------------------------------------------------

The issue was reported in meta-rust layer as:
https://github.com/meta-rust/meta-rust/pull/442

Hence, the data layout for x86-64 is modified as per the llvm sources which fixes the issue.

After running the testsuite with the modified data layout; it was observed that the
"tests/codegen/i128-x86-align.rs" passed. The modified data layout fixed the scalar pair which
resolved the testcase failure. Hence, the testcase has been removed from the exclude list.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/rust-target-config.bbclass
meta/lib/oeqa/selftest/cases/rust.py

index 334f2e7d5fc8f5bd71003249755d7038bd791710..f7aa6c74d86fbdb8598f9303ef272de47442b6d6 100644 (file)
@@ -153,7 +153,7 @@ TARGET_C_INT_WIDTH[aarch64] = "32"
 MAX_ATOMIC_WIDTH[aarch64] = "128"
 
 ## x86_64-unknown-linux-{gnu, musl}
-DATA_LAYOUT[x86_64] = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+DATA_LAYOUT[x86_64] = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
 TARGET_ENDIAN[x86_64] = "little"
 TARGET_POINTER_WIDTH[x86_64] = "64"
 TARGET_C_INT_WIDTH[x86_64] = "32"
index cbe6366f759d48fa56b426db50b39d0defa03850..88d7bb95189a65af0c58679638e7152c3a27fa61 100644 (file)
@@ -83,7 +83,6 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
                             'src/tools/tidy/src/',
                             'tests/assembly/asm/aarch64-outline-atomics.rs',
                             'tests/codegen/abi-main-signature-32bit-c-int.rs',
-                            'tests/codegen/i128-x86-align.rs',
                             'tests/codegen/issues/issue-122805.rs',
                             'tests/codegen/thread-local.rs',
                             'tests/mir-opt/',