mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-13 21:05:16 +00:00
use pre-UAL mnemonics for push/pop for compilaton callback function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57911 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cef7527a85
commit
a9ab95b38b
@ -56,7 +56,7 @@ extern "C" {
|
|||||||
// for the real target function right now. We have to act as if this
|
// for the real target function right now. We have to act as if this
|
||||||
// whole compilation callback doesn't exist as far as the caller is
|
// whole compilation callback doesn't exist as far as the caller is
|
||||||
// concerned, so we can't just preserve the callee saved regs.
|
// concerned, so we can't just preserve the callee saved regs.
|
||||||
"push {r0, r1, r2, r3, lr}\n"
|
"stmdb sp!, {r0, r1, r2, r3, lr}\n"
|
||||||
// The LR contains the address of the stub function on entry.
|
// The LR contains the address of the stub function on entry.
|
||||||
// pass it as the argument to the C part of the callback
|
// pass it as the argument to the C part of the callback
|
||||||
"mov r0, lr\n"
|
"mov r0, lr\n"
|
||||||
@ -87,7 +87,7 @@ extern "C" {
|
|||||||
// The above twiddling of the saved return addresses allows us to
|
// The above twiddling of the saved return addresses allows us to
|
||||||
// deallocate everything, including the LR the stub saved, all in one
|
// deallocate everything, including the LR the stub saved, all in one
|
||||||
// pop instruction.
|
// pop instruction.
|
||||||
"pop {r0, r1, r2, r3, lr, pc}\n"
|
"ldmia sp!, {r0, r1, r2, r3, lr, pc}\n"
|
||||||
);
|
);
|
||||||
#else // Not an ARM host
|
#else // Not an ARM host
|
||||||
void ARMCompilationCallback() {
|
void ARMCompilationCallback() {
|
||||||
|
Loading…
Reference in New Issue
Block a user