We would like to add support for load and store instructions for AArch64 in llvm-exegesis, which currently throw a Segmentation Fault or error “Not all operands are initialized by snippet Generator”.
The reason is that the memory these instruction load/store from/to is uninitialised, so our question is how to initialise memory in the setup code. We are looking at x86 for which it seems to work, and also try to get inspiration from other targets more similar to AArch64 but it is unclear how well this is supported.
We are missing the high level idea and design how to get this working and what concepts apply to our target. So while we continue exploring this, any high level ideas how to implement loads/stores would be very much appreciated.
These are some of the questions that we have:
- We have noticed the memory annotations, e.g. LLVM-EXEGESIS-MEM-MAP and LLVM-EXEGESIS-MEM-DEF, but is this necessary to implement loads/stores?
- We started looking at one of the most basic load instruction that load a GPR register (LDR w0, [x0] → LDRWui) and found that llvm-exegesis fails to identify operands as memory operands here. Is that to be expected? That seems weird?