Bug 1205166 - IonMonkey: MIPS: Import MIPS64 support into Architecture-mips-shared. r=nbp f=rankov

---
 .../jit/mips-shared/Architecture-mips-shared.cpp   |  4 +--
 js/src/jit/mips-shared/Architecture-mips-shared.h  | 33 ++++++++++++++++++----
 2 files changed, 29 insertions(+), 8 deletions(-)
This commit is contained in:
Heiher 2015-10-12 04:45:49 +08:00
Родитель 146f761ff8
Коммит 72beb2cfc6
2 изменённых файлов: 29 добавлений и 8 удалений

Просмотреть файл

@ -23,7 +23,7 @@ uint32_t GetMIPSFlags()
static uint32_t flags = 0;
if (isSet)
return flags;
#ifdef JS_SIMULATOR_MIPS32
#if defined(JS_SIMULATOR_MIPS32) || defined(JS_SIMULATOR_MIPS64)
isSet = true;
flags |= HWCAP_FPU;
return flags;
@ -46,7 +46,7 @@ uint32_t GetMIPSFlags()
#endif
return flags;
#endif // JS_SIMULATOR_MIPS32
#endif // JS_SIMULATOR_MIPS32 || JS_SIMULATOR_MIPS64
}
bool hasFPU()

Просмотреть файл

@ -17,11 +17,13 @@
// gcc appears to use _mips_hard_float to denote
// that the target is a hard-float target.
#ifdef _mips_hard_float
#define JS_CODEGEN_MIPS32_HARDFP
#define JS_CODEGEN_MIPS_HARDFP
#endif
#if _MIPS_SIM == _ABIO32
#if (defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32)) || defined(JS_SIMULATOR_MIPS32)
#define USES_O32_ABI
#elif (defined(_MIPS_SIM) && (_MIPS_SIM == _ABI64)) || defined(JS_SIMULATOR_MIPS64)
#define USES_N64_ABI
#else
#error "Unsupported ABI"
#endif
@ -73,6 +75,7 @@ class Registers
a1 = r5,
a2 = r6,
a3 = r7,
#if defined(USES_O32_ABI)
t0 = r8,
t1 = r9,
t2 = r10,
@ -81,6 +84,24 @@ class Registers
t5 = r13,
t6 = r14,
t7 = r15,
ta0 = t4,
ta1 = t5,
ta2 = t6,
ta3 = t7,
#elif defined(USES_N64_ABI)
a4 = r8,
a5 = r9,
a6 = r10,
a7 = r11,
t0 = r12,
t1 = r13,
t2 = r14,
t3 = r15,
ta0 = a4,
ta1 = a5,
ta2 = a6,
ta3 = a7,
#endif
s0 = r16,
s1 = r17,
s2 = r18,
@ -140,10 +161,10 @@ class Registers
(1 << Registers::t1) |
(1 << Registers::t2) |
(1 << Registers::t3) |
(1 << Registers::t4) |
(1 << Registers::t5) |
(1 << Registers::t6) |
(1 << Registers::t7);
(1 << Registers::ta0) |
(1 << Registers::ta1) |
(1 << Registers::ta2) |
(1 << Registers::ta3);
// We use this constant to save registers when entering functions. This
// is why $ra is added here even though it is not "Non Volatile".