Commit 52abc77
Fix AArch64 register-offset load/store memory operand access
Fix issue #2802 where register-offset addressing mode load and store
instructions were not correctly marking memory operands as READ/WRITE.
For example, LDRSW with register offset (ldrsw x10, [x22, x10, lsl #2])
had the memory operand access as invalid instead of READ.
The issue was in the auto-generated mapping table where roW/roX variants
incorrectly had CS_AC_INVALID instead of CS_AC_READ/CS_AC_WRITE. Since
the mapping is auto-generated and cannot be modified directly, add a
correction function AArch64_get_mem_access_for_opcode() that provides
the correct access type for these instructions.
This affects all load/store variants with register offset addressing:
- LDR*, LDRB*, LDRH*, LDRSB*, LDRSH*, LDRSW*
- STR*, STRB*, STRH*, STRD*
- PRFM
Add test case for LDRSW with register offset addressing mode.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>1 parent a020137 commit 52abc77
2 files changed
Lines changed: 92 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
139 | 202 | | |
140 | 203 | | |
141 | 204 | | |
| |||
903 | 966 | | |
904 | 967 | | |
905 | 968 | | |
906 | | - | |
907 | | - | |
| 969 | + | |
908 | 970 | | |
909 | 971 | | |
910 | 972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1542 | 1542 | | |
1543 | 1543 | | |
1544 | 1544 | | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
0 commit comments