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

Side by Side Diff: src/IceRegistersMIPS32.h

Issue 2341713003: Subzero, MIPS32: Floating point support in ELF output (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Encodings for more existing instructions, alphabetized Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | tests_lit/assembler/mips32/encoding_test_arith_fp.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceRegistersMIPS32.h - Register information --*- C++ -*-===// 1 //===- subzero/src/IceRegistersMIPS32.h - Register information --*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 return IsGPR; 79 return IsGPR;
80 } 80 }
81 81
82 static inline FPRRegister getEncodedFPR(RegNumT RegNum) { 82 static inline FPRRegister getEncodedFPR(RegNumT RegNum) {
83 assert(int(Reg_FPR_First) <= int(RegNum)); 83 assert(int(Reg_FPR_First) <= int(RegNum));
84 assert(unsigned(RegNum) <= Reg_FPR_Last); 84 assert(unsigned(RegNum) <= Reg_FPR_Last);
85 return FPRRegister(RegNum - Reg_FPR_First); 85 return FPRRegister(RegNum - Reg_FPR_First);
86 } 86 }
87 87
88 static inline bool isFPRReg(RegNumT RegNum) { 88 static inline bool isFPRReg(RegNumT RegNum) {
89 return (int(Reg_FPR_First) <= int(RegNum)) && 89 return ((int(Reg_FPR_First) <= int(RegNum)) &&
90 (unsigned(RegNum) <= Reg_FPR_Last); 90 (unsigned(RegNum) <= Reg_FPR_Last));
91 }
92
93 static inline FPRRegister getEncodedFPR64(RegNumT RegNum) {
94 assert(int(Reg_F64PAIR_First) <= int(RegNum));
95 assert(unsigned(RegNum) <= Reg_F64PAIR_Last);
96 return FPRRegister((RegNum - Reg_F64PAIR_First) * 2);
97 }
98
99 static inline bool isFPR64Reg(RegNumT RegNum) {
100 return (int(Reg_F64PAIR_First) <= int(RegNum)) &&
101 (unsigned(RegNum) <= Reg_F64PAIR_Last);
91 } 102 }
92 103
93 const char *getRegName(RegNumT RegNum); 104 const char *getRegName(RegNumT RegNum);
94 105
95 static inline RegNumT get64PairFirstRegNum(RegNumT RegNum) { 106 static inline RegNumT get64PairFirstRegNum(RegNumT RegNum) {
96 assert(unsigned(RegNum) >= Reg_I64PAIR_First); 107 assert(unsigned(RegNum) >= Reg_I64PAIR_First);
97 assert(unsigned(RegNum) <= Reg_F64PAIR_Last); 108 assert(unsigned(RegNum) <= Reg_F64PAIR_Last);
98 if (unsigned(RegNum) >= Reg_F64PAIR_First && 109 if (unsigned(RegNum) >= Reg_F64PAIR_First &&
99 unsigned(RegNum) <= Reg_F64PAIR_Last) 110 unsigned(RegNum) <= Reg_F64PAIR_Last)
100 return RegNumT::fixme(((RegNum - Reg_F64PAIR_First) * 2) + 111 return RegNumT::fixme(((RegNum - Reg_F64PAIR_First) * 2) +
(...skipping 19 matching lines...) Expand all
120 131
121 } // end of namespace RegMIPS32 132 } // end of namespace RegMIPS32
122 133
123 // Extend enum RegClass with MIPS32-specific register classes (if any). 134 // Extend enum RegClass with MIPS32-specific register classes (if any).
124 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target }; 135 enum RegClassMIPS32 : uint8_t { RCMIPS32_NUM = RC_Target };
125 136
126 } // end of namespace MIPS32 137 } // end of namespace MIPS32
127 } // end of namespace Ice 138 } // end of namespace Ice
128 139
129 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H 140 #endif // SUBZERO_SRC_ICEREGISTERSMIPS32_H
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.cpp ('k') | tests_lit/assembler/mips32/encoding_test_arith_fp.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698