hippomocks
hippomocks copied to clipboard
Implement `Replace::Replace` properly for aarch64
Add a separate implementation for aarch64 which boils down to
ldr x17, =0x1122334455667788
br x17
The x17 register is used as it's allowed to be modified during function call and doesn't require saving. Old approach under SOME_ARM ifdef that doesn't require changing any registers isn't possible since the pc register is no longer directly accessible.
Tested with qemu-aarch64 user mode emulation. I've also only tested it with cpp11 branch, but opening the PR against master; do tell if additional PR against cpp11 will be required or whether you'll merge it there yourself.
Potentially fixes #73, #57. CC @rzr for review.