Aarch64: emit prefix/postfix-indexed memory accesses
- teach Vgen to generate prefix and postfix indexed forms for scalar/pair memory ops
- validate update immediates before encoding the indexed memory instructions
- let psimplify fold plain memory accesses into the new prefix/postfix variants
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D86516435. (Because this pull request was imported automatically, there will not be any future comments.)
Thanks @igogo-x86 !
This one is failing with
hphp/runtime/vm/jit/vasm-simplify-arm.cpp:396:15: error: unused variable 'inst' [-Werror,-Wunused-variable]
396 | auto const& inst = env.unit.blocks[b].code[i];
| ^~~~
hphp/runtime/vm/jit/vasm-simplify-arm.cpp:415:15: error: unused variable 'inst' [-Werror,-Wunused-variable]
415 | auto const& inst = env.unit.blocks[b].code[i];
| ^~~~
2 errors generated.
@igogo-x86 has updated the pull request. You must reimport the pull request before landing.
Fixed!
New error
Stderr:
fbcode/hphp/runtime/vm/jit/vasm-info.cpp:159:11: error: 44 enumeration values not handled in switch: 'loadpri', 'loadpi', 'loadbpri'... [-Werror,-Wswitch]
159 | switch (inst.op) {
| ^~~~~~~
1 error generated.
@igogo-x86 has updated the pull request. You must reimport the pull request before landing.
Hey @igogo-x86 , now fails to compile with this error
Stderr:
fbcode/hphp/runtime/vm/jit/vasm-instr.cpp:94:11: error: 44 enumeration values not handled in switch: 'loadpri', 'loadpi', 'loadbpri'... [-Werror,-Wswitch]
94 | switch (op) {
| ^~
1 error generated.
@igogo-x86 has updated the pull request. You must reimport the pull request before landing.
I've got another compilation error
fbcode/hphp/runtime/vm/jit/vasm-instr.cpp:391:5: error: no member named 'loadzlqpri' in 'HPHP::jit::Vinstr'
391 | CASE_WITH_UPDATES(loadzlq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fbcode/hphp/runtime/vm/jit/vasm-instr.cpp:97:18: note: expanded from macro 'CASE_WITH_UPDATES'
97 | case Vinstr::name##pri: \
| ~~~~~~~~^
<scratch space>:302:1: note: expanded from here
302 | loadzlqpri
| ^
fbcode/hphp/runtime/vm/jit/vasm-instr.cpp:391:5: error: no member named 'loadzlqpi' in 'HPHP::jit::Vinstr'
391 | CASE_WITH_UPDATES(loadzlq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
fbcode/hphp/runtime/vm/jit/vasm-instr.cpp:98:18: note: expanded from macro 'CASE_WITH_UPDATES'
98 | case Vinstr::name##pi:
| ~~~~~~~~^
<scratch space>:303:1: note: expanded from here
303 | loadzlqpi
| ^
2 errors generated.
@igogo-x86 has updated the pull request. You must reimport the pull request before landing.