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

Unified Diff: src/x87/assembler-x87.h

Issue 1954953002: Add the concept of FloatRegister for all platforms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 7 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 | « src/x64/assembler-x64.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x87/assembler-x87.h
diff --git a/src/x87/assembler-x87.h b/src/x87/assembler-x87.h
index 69dab9c98b27bbbdc13cabf817563495230aad07..057201a637990402d96fe0ca5c69bba55efea521 100644
--- a/src/x87/assembler-x87.h
+++ b/src/x87/assembler-x87.h
@@ -74,6 +74,8 @@ namespace internal {
V(stX_6) \
V(stX_7)
+#define FLOAT_REGISTERS DOUBLE_REGISTERS
+
#define ALLOCATABLE_DOUBLE_REGISTERS(V) \
V(stX_0) \
V(stX_1) \
@@ -145,8 +147,7 @@ GENERAL_REGISTERS(DECLARE_REGISTER)
#undef DECLARE_REGISTER
const Register no_reg = {Register::kCode_no_reg};
-
-struct DoubleRegister {
+struct X87Register {
enum Code {
#define REGISTER_CODE(R) kCode_##R,
DOUBLE_REGISTERS(REGISTER_CODE)
@@ -158,8 +159,8 @@ struct DoubleRegister {
static const int kMaxNumRegisters = Code::kAfterLast;
static const int kMaxNumAllocatableRegisters = 6;
- static DoubleRegister from_code(int code) {
- DoubleRegister result = {code};
+ static X87Register from_code(int code) {
+ X87Register result = {code};
return result;
}
@@ -171,24 +172,26 @@ struct DoubleRegister {
return reg_code;
}
- bool is(DoubleRegister reg) const { return reg_code == reg.reg_code; }
+ bool is(X87Register reg) const { return reg_code == reg.reg_code; }
const char* ToString();
int reg_code;
};
+typedef X87Register FloatRegister;
+
+typedef X87Register DoubleRegister;
+
+// TODO(x87) Define SIMD registers.
+typedef X87Register Simd128Register;
+
#define DECLARE_REGISTER(R) \
const DoubleRegister R = {DoubleRegister::kCode_##R};
DOUBLE_REGISTERS(DECLARE_REGISTER)
#undef DECLARE_REGISTER
const DoubleRegister no_double_reg = {DoubleRegister::kCode_no_reg};
-typedef DoubleRegister X87Register;
-
-// TODO(x87) Define SIMD registers.
-typedef DoubleRegister Simd128Register;
-
enum Condition {
// any value < 0 is considered no_condition
no_condition = -1,
« no previous file with comments | « src/x64/assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698