diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2018-12-23 12:04:55 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2018-12-23 12:04:55 +0000 |
| commit | da29981707a34833b26f92e3f9cb6feb5bff547e (patch) | |
| tree | a9cf5a9ea9ce99ea92a5e7a58f795b3348f62611 | |
| parent | a5afbce82b921da7c584929a416bbe656443f716 (diff) | |
| download | bcm5719-llvm-da29981707a34833b26f92e3f9cb6feb5bff547e.tar.gz bcm5719-llvm-da29981707a34833b26f92e3f9cb6feb5bff547e.zip | |
[ORC] Remove redundant instruction from MIPS resolver code. NFC
It's redundant to restore the `$a3` register twice.
llvm-svn: 350021
| -rw-r--r-- | llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h | 2 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h b/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h index 49e7b534f21..6b748e58ea0 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h @@ -245,7 +245,7 @@ class OrcMips32_Base { public: static const unsigned PointerSize = 4; static const unsigned TrampolineSize = 20; - static const unsigned ResolverCodeSize = 0xfc; + static const unsigned ResolverCodeSize = 0xf8; using IndirectStubsInfo = GenericIndirectStubsInfo<16>; using JITReentryFn = JITTargetAddress (*)(void *CallbackMgr, diff --git a/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp b/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp index cf335df0e7c..2f2a04293b9 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp @@ -604,19 +604,18 @@ void OrcMips32_Base::writeResolverCode(uint8_t *ResolverMem, JITReentryFn Reentr 0x8fb1001c, // 0xd4: lw $s1,28($sp) 0x8fb00018, // 0xd8: lw $s0,24($sp) 0x8fa70014, // 0xdc: lw $a3,20($sp) - 0x8fa70014, // 0xe0: lw $a3,20($sp) - 0x8fa60010, // 0xe4: lw $a2,16($sp) - 0x8fa5000c, // 0xe8: lw $a1,12($sp) - 0x8fa40008, // 0xec: lw $a0,8($sp) - 0x27bd0068, // 0xf4: addiu $sp,$sp,104 - 0x0300f825, // 0xf8: move $ra, $t8 - 0x00000000 // 0xfc: jr $v0/v1 + 0x8fa60010, // 0xe0: lw $a2,16($sp) + 0x8fa5000c, // 0xe4: lw $a1,12($sp) + 0x8fa40008, // 0xe8: lw $a0,8($sp) + 0x27bd0068, // 0xec: addiu $sp,$sp,104 + 0x0300f825, // 0xf0: move $ra, $t8 + 0x00000000 // 0xf4: jr $v0/v1 }; const unsigned ReentryFnAddrOffset = 0x7c; // JIT re-entry fn addr lui const unsigned CallbackMgrAddrOffset = 0x6c; // Callback manager addr lui - const unsigned offsett = 0xfc; + const unsigned offsett = 0xf4; memcpy(ResolverMem, ResolverCode, sizeof(ResolverCode)); |

