|
6 | 6 | //
|
7 | 7 | // Note that while "instructions that write to the affected registers"
|
8 | 8 | // 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. |
10 | 10 | //
|
11 | 11 | // FIXME: Switch to PAC* instructions instead of indirect tail call for testing
|
12 | 12 | // if a register is considered safe when detection of signing oracles is
|
@@ -91,7 +91,8 @@ bad_split_adrp:
|
91 | 91 | br x0
|
92 | 92 | .size bad_split_adrp, .-bad_split_adrp
|
93 | 93 |
|
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. |
95 | 96 |
|
96 | 97 | .globl bad_immediate_constant
|
97 | 98 | .type bad_immediate_constant,@function
|
@@ -139,6 +140,15 @@ good_many_offsets:
|
139 | 140 | br x2
|
140 | 141 | .size good_many_offsets, .-good_many_offsets
|
141 | 142 |
|
| 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 | + |
142 | 152 | // MOV Xd, Xm (which is an alias of ORR Xd, XZR, Xm) is handled as part of
|
143 | 153 | // support for address arithmetics, but ORR in general is not.
|
144 | 154 |
|
|
0 commit comments