Bug 673850 - Fix YARR with Solaris Studio compiler. r=dmandelin.
authorGinn Chen <ginn.chen@oracle.com>
Thu, 28 Jul 2011 11:35:30 +0800
changeset 73456 1ae32abc30cd901354a19e8d5253e00e53386532
parent 73455 45750d4529d95b4c9ed92589cfc1b7aeb0536653
child 73457 d243ecaed4adec211af7f8fd2d309efa1bb48fcd
push id20871
push usereakhgari@mozilla.com
push dateThu, 28 Jul 2011 14:37:48 +0000
treeherdermozilla-central@fe48bbfeff94 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmandelin
bugs673850
milestone8.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 673850 - Fix YARR with Solaris Studio compiler. r=dmandelin.
js/src/assembler/assembler/MacroAssemblerX86Common.h
js/src/yarr/YarrJIT.cpp
js/src/yarr/YarrJIT.h
--- a/js/src/assembler/assembler/MacroAssemblerX86Common.h
+++ b/js/src/assembler/assembler/MacroAssemblerX86Common.h
@@ -1314,17 +1314,17 @@ private:
              "popl %%ebx;"
              "movl %%ecx, %0;"
              "movl %%edx, %1;"
              : "=g" (flags_ecx), "=g" (flags_edx)
              :
              : "%eax", "%ecx", "%edx"
              );
 #endif
-#elif WTF_COMPILER_SUNPRO
+#elif WTF_COMPILER_SUNCC
 #if WTF_CPU_X86_64
         asm (
              "movl $0x1, %%eax;"
              "pushq %%rbx;"
              "cpuid;"
              "popq %%rbx;"
              "movl %%ecx, (%rsi);"
              "movl %%edx, (%rdi);"
--- a/js/src/yarr/YarrJIT.cpp
+++ b/js/src/yarr/YarrJIT.cpp
@@ -2300,17 +2300,17 @@ class YarrGenerator : private MacroAssem
 #elif WTF_CPU_X86
         push(X86Registers::ebp);
         move(stackPointerRegister, X86Registers::ebp);
         // TODO: do we need spill registers to fill the output pointer if there are no sub captures?
         push(X86Registers::ebx);
         push(X86Registers::edi);
         push(X86Registers::esi);
         // load output into edi (2 = saved ebp + return address).
-    #if WTF_COMPILER_MSVC
+    #if WTF_COMPILER_MSVC || WTF_COMPILER_SUNCC
         loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), input);
         loadPtr(Address(X86Registers::ebp, 3 * sizeof(void*)), index);
         loadPtr(Address(X86Registers::ebp, 4 * sizeof(void*)), length);
         loadPtr(Address(X86Registers::ebp, 5 * sizeof(void*)), output);
     #else
         loadPtr(Address(X86Registers::ebp, 2 * sizeof(void*)), output);
     #endif
 #elif WTF_CPU_ARM
--- a/js/src/yarr/YarrJIT.h
+++ b/js/src/yarr/YarrJIT.h
@@ -32,17 +32,17 @@
 
 #include "assembler/wtf/Platform.h"
 
 #if ENABLE_YARR_JIT
 
 #include "assembler/assembler/MacroAssembler.h"
 #include "YarrPattern.h"
 
-#if WTF_CPU_X86 && !WTF_COMPILER_MSVC
+#if WTF_CPU_X86 && !WTF_COMPILER_MSVC && !WTF_COMPILER_SUNCC
 #define YARR_CALL __attribute__ ((regparm (3)))
 #else
 #define YARR_CALL
 #endif
 
 namespace JSC {
 
 class JSGlobalData;