Numerous fixes to MIPS. Basic oatexec works.
- Fixed reversed base and destination reg in genConstString
- Changed compiler to use T9 to hold address to jump to
- Fixed compilation of instruction getting current PC
- Prevented T9 from being used as a compiler temp
- Fixed loadBaseDispBody for long form single loads
- Fixed stack setup for SaveAll callee methods to save rSELF & rSUSPEND
- Added .cpload directive to assembly to regenerate $gp when overwritten
- Fixed passing of extra arguments on the stack to account for space
reserved for $a0-$a3
- Fixed resolution trampoline to properly setup and restore stack
- Created mips stubs for interface trampoline and unresolved direct
method trampoline
Change-Id: I63a3fd0366bdfabdebebf58ec4b8bc9443cec355
diff --git a/src/runtime.cc b/src/runtime.cc
index 62447df..e3384df 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -1014,8 +1014,8 @@
(1 << art::arm::R8) | (1 << art::arm::R10) | (1 << art::arm::R11);
uint32_t arg_spills = (1 << art::arm::R1) | (1 << art::arm::R2) | (1 << art::arm::R3);
uint32_t all_spills = (1 << art::arm::R4) | (1 << art::arm::R9);
- uint32_t core_spills = ref_spills | (type == kRefsAndArgs ? arg_spills :0) |
- (type == kSaveAll ? all_spills :0) | (1 << art::arm::LR);
+ uint32_t core_spills = ref_spills | (type == kRefsAndArgs ? arg_spills : 0) |
+ (type == kSaveAll ? all_spills : 0) | (1 << art::arm::LR);
uint32_t fp_all_spills = (1 << art::arm::S0) | (1 << art::arm::S1) | (1 << art::arm::S2) |
(1 << art::arm::S3) | (1 << art::arm::S4) | (1 << art::arm::S5) |
(1 << art::arm::S6) | (1 << art::arm::S7) | (1 << art::arm::S8) |
@@ -1039,9 +1039,11 @@
(1 << art::mips::S5) | (1 << art::mips::S6) | (1 << art::mips::S7) |
(1 << art::mips::FP);
uint32_t arg_spills = (1 << art::mips::A1) | (1 << art::mips::A2) | (1 << art::mips::A3);
+ uint32_t all_spills = (1 << art::mips::S0) | (1 << art::mips::S1);
uint32_t core_spills = ref_spills | (type == kRefsAndArgs ? arg_spills : 0) |
- (1 << art::mips::RA);
+ (type == kSaveAll ? all_spills : 0) | (1 << art::mips::RA);
size_t frame_size = RoundUp((__builtin_popcount(core_spills) /* gprs */ +
+ (type == kRefsAndArgs ? 0 : 3) /* always reserve arg space */ +
1 /* Method* */) * kPointerSize, kStackAlignment);
method->SetFrameSizeInBytes(frame_size);
method->SetCoreSpillMask(core_spills);