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

Unified Diff: src/mips/constants-mips.h

Issue 1586223004: MIPS: Add FPXX support to MIPS32R2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing changes from master Created 4 years, 11 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
Index: src/mips/constants-mips.h
diff --git a/src/mips/constants-mips.h b/src/mips/constants-mips.h
index e7cb67b884ef33f7570105745683fad34fa5bd1d..c453aa120022d882ec6a42edf0d5557bb869a8c2 100644
--- a/src/mips/constants-mips.h
+++ b/src/mips/constants-mips.h
@@ -64,9 +64,13 @@ enum FpuMode {
#elif defined(FPU_MODE_FP64)
static const FpuMode kFpuMode = kFP64;
#elif defined(FPU_MODE_FPXX)
- static const FpuMode kFpuMode = kFPXX;
+#if defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_MIPS32R6)
+static const FpuMode kFpuMode = kFPXX;
#else
- static const FpuMode kFpuMode = kFP32;
+#error "FPXX is supported only on Mips32R2 and Mips32R6"
+#endif
+#else
+static const FpuMode kFpuMode = kFP32;
#endif
#if(defined(__mips_hard_float) && __mips_hard_float != 0)
@@ -92,13 +96,9 @@ const uint32_t kHoleNanLower32Offset = 4;
#error Unknown endianness
#endif
-#ifndef FPU_MODE_FPXX
-#define IsFp64Mode() \
- (kFpuMode == kFP64)
-#else
-#define IsFp64Mode() \
- (CpuFeatures::IsSupported(FP64FPU))
-#endif
+#define IsFp64Mode() (kFpuMode == kFP64)
+#define IsFp32Mode() (kFpuMode == kFP32)
+#define IsFpxxMode() (kFpuMode == kFPXX)
#ifndef _MIPS_ARCH_MIPS32RX
#define IsMipsArchVariant(check) \

Powered by Google App Engine
This is Rietveld 408576698