Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: src/IceRegistersMIPS32.h

Issue 2052793003: Calling convention for MIPS32 (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceRegistersMIPS32.h
diff --git a/src/IceRegistersMIPS32.h b/src/IceRegistersMIPS32.h
index f6ea38e312b5b65537cbc20c7acff76456ddf1b7..bd1acac0cd3fa9e783ca9bcb02f006958441ea1a 100644
--- a/src/IceRegistersMIPS32.h
+++ b/src/IceRegistersMIPS32.h
@@ -89,6 +89,24 @@ static inline bool isFPRReg(RegNumT RegNum) {
const char *getRegName(RegNumT RegNum);
+static inline RegNumT getI64PairFirstGPRNum(RegNumT RegNum) {
+ // CAUTION: This is not entirely correct, as it will return Reg_A2 even when
Jim Stichnoth 2016/06/09 21:27:23 I think the caution should be stronger, such as so
+ // we pass Reg_V0V1 as argument.
+ // TODO(mohit.bhakkad): Change this once we provide table-driven approach
+ RegNum.assertIsValid();
+ return (RegNum == RegMIPS32::Reg_A0A1) ? RegMIPS32::Reg_A0
+ : RegMIPS32::Reg_A2;
+}
+
+static inline RegNumT getI64PairSecondGPRNum(RegNumT RegNum) {
+ // CAUTION: This is not entirely correct, as it will return Reg_A3 even when
+ // we pass Reg_V0V1 as argument.
+ // TODO(mohit.bhakkad): Change this once we provide table-driven approach
+ RegNum.assertIsValid();
+ return (RegNum == RegMIPS32::Reg_A0A1) ? RegMIPS32::Reg_A1
+ : RegMIPS32::Reg_A3;
+}
+
} // end of namespace RegMIPS32
// Extend enum RegClass with MIPS32-specific register classes (if any).
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698