[llvm] [BOLT] support AArch64 JUMP26 createRelocation (PR #83531)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 22:41:22 PST 2024
================
@@ -104,6 +104,48 @@ TEST_P(BinaryContextTester, FlushPendingRelocCALL26) {
EXPECT_FALSE(memcmp(Func2Call, &Vect[12], 4)) << "Wrong forward call value\n";
}
+TEST_P(BinaryContextTester, FlushPendingRelocJUMP26) {
+ if (GetParam() != Triple::aarch64)
+ GTEST_SKIP();
+
+ // This test checks that encodeValueAArch64 used by flushPendingRelocations
+ // returns correctly encoded values for R_AARCH64_JUMP26 relocation for both
+ // backward and forward branches.
+ //
+ // The offsets layout is:
+ // 4: func1
+ // 8: b func1
+ // 12: b func2
+ // 16: func2
+
+ char Data[20] = {};
----------------
linsinan1995 wrote:
thx, updated.
https://github.com/llvm/llvm-project/pull/83531
More information about the llvm-commits
mailing list