cfallin labeled issue #1064:
Currently,
stack_store
andstack_load
are legalized intostack_addr
followed by plainstore
andload
, producing code like this:lea rax, qword ptr [rsp + 8] mov qword ptr [rax], rdi
We really want to just emit this:
mov qword ptr [rsp + 8], rdi
Options include:
- Add encoding rules forstack_load
andstack_store
, making them legal. This is straightforward, but if we later want to extend this to allow extending loads and narrowing stores, we'll need a bunch more instructions.
- Extendload_complex
/store_complex
to have a way represent a base pointer which is the stack pointer, and then foldstack_addr
intoload
/store
.
Last updated: Nov 22 2024 at 17:03 UTC