Skip to content

Commit e611f6c

Browse files
committed
Address review comments
1 parent 3455bfd commit e611f6c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

bolt/test/binary-analysis/AArch64/gs-pauth-address-materialization.s

+12-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
// Note that while "instructions that write to the affected registers"
88
// section of the report is still technically correct, it does not necessarily
9-
// mentions the instructions that are used incorrectly.
9+
// mention the instructions that are used incorrectly.
1010
//
1111
// FIXME: Switch to PAC* instructions instead of indirect tail call for testing
1212
// if a register is considered safe when detection of signing oracles is
@@ -91,7 +91,8 @@ bad_split_adrp:
9191
br x0
9292
.size bad_split_adrp, .-bad_split_adrp
9393

94-
// Materialization of absolute addresses is not expected.
94+
// Materialization of absolute addresses is not handled, as it is not expected
95+
// to be used by real-world code, but can be supported if needed.
9596

9697
.globl bad_immediate_constant
9798
.type bad_immediate_constant,@function
@@ -139,6 +140,15 @@ good_many_offsets:
139140
br x2
140141
.size good_many_offsets, .-good_many_offsets
141142

143+
.globl good_negative_offset
144+
.type good_negative_offset,@function
145+
good_negative_offset:
146+
// CHECK-NOT: good_negative_offset
147+
adr x0, sym
148+
sub x1, x0, #8
149+
br x1
150+
.size good_negative_offset, .-good_negative_offset
151+
142152
// MOV Xd, Xm (which is an alias of ORR Xd, XZR, Xm) is handled as part of
143153
// support for address arithmetics, but ORR in general is not.
144154

0 commit comments

Comments
 (0)