Revert "Fix access to FP registers when visiting stack"
This reverts commit aa9b3aee1e06f922e4518713f9b3dff00a0b2597.
Change-Id: Ied27deb89cca5ec9094d391374e03f83fcb76c33
diff --git a/runtime/arch/mips/context_mips.h b/runtime/arch/mips/context_mips.h
index f2ee335..d5f27ae 100644
--- a/runtime/arch/mips/context_mips.h
+++ b/runtime/arch/mips/context_mips.h
@@ -31,53 +31,31 @@
}
virtual ~MipsContext() {}
- void Reset() OVERRIDE;
+ virtual void Reset();
- void FillCalleeSaves(const StackVisitor& fr) OVERRIDE SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ virtual void FillCalleeSaves(const StackVisitor& fr) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- void SetSP(uintptr_t new_sp) OVERRIDE {
- bool success = SetGPR(SP, new_sp);
- CHECK(success) << "Failed to set SP register";
+ virtual void SetSP(uintptr_t new_sp) {
+ SetGPR(SP, new_sp);
}
- void SetPC(uintptr_t new_pc) OVERRIDE {
- bool success = SetGPR(RA, new_pc);
- CHECK(success) << "Failed to set RA register";
+ virtual void SetPC(uintptr_t new_pc) {
+ SetGPR(RA, new_pc);
}
- uintptr_t* GetGPRAddress(uint32_t reg) OVERRIDE {
+ virtual uintptr_t* GetGPRAddress(uint32_t reg) {
DCHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
return gprs_[reg];
}
- bool GetGPR(uint32_t reg, uintptr_t* val) OVERRIDE {
+ virtual uintptr_t GetGPR(uint32_t reg) {
CHECK_LT(reg, static_cast<uint32_t>(kNumberOfCoreRegisters));
- if (gprs_[reg] == nullptr) {
- return false;
- } else {
- DCHECK(val != nullptr);
- *val = *gprs_[reg];
- return true;
- }
+ return *gprs_[reg];
}
- bool SetGPR(uint32_t reg, uintptr_t value) OVERRIDE;
-
- bool GetFPR(uint32_t reg, uintptr_t* val) OVERRIDE {
- CHECK_LT(reg, static_cast<uint32_t>(kNumberOfFRegisters));
- if (fprs_[reg] == nullptr) {
- return false;
- } else {
- DCHECK(val != nullptr);
- *val = *fprs_[reg];
- return true;
- }
- }
-
- bool SetFPR(uint32_t reg, uintptr_t value) OVERRIDE;
-
- void SmashCallerSaves() OVERRIDE;
- void DoLongJump() OVERRIDE;
+ virtual void SetGPR(uint32_t reg, uintptr_t value);
+ virtual void SmashCallerSaves();
+ virtual void DoLongJump();
private:
// Pointers to registers in the stack, initialized to NULL except for the special cases below.