mirror of https://gitee.com/openkylin/nodejs.git
use configuration directive to set mips fpu mode
Forwarded: https://github.com/paul99/v8m-rb/issues/192 Last-Update: 2015-09-29 Gbp-Pq: Name 2017_mips_configure_fpu.patch
This commit is contained in:
parent
5b0d2b1398
commit
396a571908
|
@ -140,22 +140,11 @@ static uint32_t ReadELFHWCaps() {
|
|||
|
||||
#if V8_HOST_ARCH_MIPS
|
||||
int __detect_fp64_mode(void) {
|
||||
double result = 0;
|
||||
// Bit representation of (double)1 is 0x3FF0000000000000.
|
||||
__asm__ volatile(
|
||||
".set push\n\t"
|
||||
".set noreorder\n\t"
|
||||
".set oddspreg\n\t"
|
||||
"lui $t0, 0x3FF0\n\t"
|
||||
"ldc1 $f0, %0\n\t"
|
||||
"mtc1 $t0, $f1\n\t"
|
||||
"sdc1 $f0, %0\n\t"
|
||||
".set pop\n\t"
|
||||
: "+m"(result)
|
||||
:
|
||||
: "t0", "$f0", "$f1", "memory");
|
||||
|
||||
return !(result == 1);
|
||||
#ifdef FPU_MODE_FP64
|
||||
return 1;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue