Commit 95bf85e
committed
crates/asm: fix aarch64 stack alignment and add bcmp/memcmp
aarch64 logical instructions encode register 31 as xzr, not sp, so
`and sp, sp, #-16` is an invalid operand. Use a temp register (x9)
to align the stack instead.
Also add bcmp and memcmp implementations needed for -static linking
without libc (riscv64 codegen emits calls to bcmp for byte comparisons).1 parent 81c1347 commit 95bf85e
1 file changed
Lines changed: 34 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
58 | 85 | | |
59 | 86 | | |
60 | 87 | | |
| |||
198 | 225 | | |
199 | 226 | | |
200 | 227 | | |
201 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
202 | 233 | | |
203 | 234 | | |
204 | | - | |
205 | | - | |
| 235 | + | |
206 | 236 | | |
207 | | - | |
| 237 | + | |
208 | 238 | | |
209 | 239 | | |
210 | 240 | | |
| |||
0 commit comments