Skip to content

Commit 67133dd

Browse files
committed
Added a detailed description into the test
1 parent 2107f0c commit 67133dd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bolt/test/AArch64/test-indirect-branch.s

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
// Test how BOLT handles indirect branch sequence of instructions in
22
// AArch64MCPlus builder.
3-
// This test checks that case when we have no shift amount after add
4-
// instruction. This pattern comes from libc, so needs to build '-static'
5-
// binary to reproduce the issue easily.
3+
// This test checks the pattern where there is no shift amount after add
4+
// instruction. The pattern come from libc, it can be reproduced with
5+
// a 'static' built binary.
66
//
77
// adr x6, 0x219fb0 <sigall_set+0x88>
88
// add x6, x6, x14, lsl #2
99
// ldr w7, [x6]
1010
// add x6, x6, w7, sxtw => no shift amount
1111
// br x6
12-
// It also tests another case when we use '-fuse-ld=lld' along with '-static'
13-
// which produces the following sequence of intsructions:
12+
//
13+
// It also tests another case where there is no adrp/add pair.
14+
// The pattern also come from libc, and it only represents in the binary
15+
// if the lld linker is used to create the static binary.
16+
// It doesn't occur with GCC ld linker.
1417
//
1518
// nop => nop/adr instead of adrp/add
1619
// adr x13, 0x215a18 <_nl_value_type_LC_COLLATE+0x50>

0 commit comments

Comments
 (0)