Backout a21f23d350d8 (bug 645111)
authorSteve Fink <sfink@mozilla.com>
Mon, 26 Sep 2011 15:38:51 -0700
changeset 78942 e84d5957f3ae78d6f89b0aa75470e90160aa782c
parent 78941 7b4c9429370708d2a69204f2582028d068e1eb1b
child 78943 0cce4b4dead83618b4e2b4a08540e90ed510cdaa
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs645111
milestone9.0a1
backs outa21f23d350d819d20a42e73a247545dce83d4f7b
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
Backout a21f23d350d8 (bug 645111)
js/src/methodjit/MethodJIT.cpp
--- a/js/src/methodjit/MethodJIT.cpp
+++ b/js/src/methodjit/MethodJIT.cpp
@@ -53,21 +53,16 @@
 #include "jsgcmark.h"
 
 #include "jsgcinlines.h"
 #include "jsinterpinlines.h"
 
 using namespace js;
 using namespace js::mjit;
 
-// Put frame unwinding information into .debug_frame rather than .eh_frame so
-// that it doesn't take up space in the binary. This is for the manually
-// inserted .cfi_* directives in the inline assembly below. If we ever decide
-// to enable exceptions, we'll want to remove this.
-asm(".cfi_sections .debug_frame");
 
 js::mjit::CompilerAllocPolicy::CompilerAllocPolicy(JSContext *cx, Compiler &compiler)
 : TempAllocPolicy(cx),
   oomFlag(&compiler.oomInVector)
 {
 }
 void
 StackFrame::methodjitStaticAsserts()
@@ -208,35 +203,24 @@ JS_STATIC_ASSERT(VMFrame::offsetOfFp == 
 JS_STATIC_ASSERT(JSVAL_TAG_MASK == 0xFFFF800000000000LL);
 JS_STATIC_ASSERT(JSVAL_PAYLOAD_MASK == 0x00007FFFFFFFFFFFLL);
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerTrampoline) "\n"
 SYMBOL_STRING(JaegerTrampoline) ":"       "\n"
     /* Prologue. */
-    ".cfi_startproc"                     "\n"
-    ".cfi_def_cfa_register rsp"          "\n"
-    ".cfi_def_cfa_offset 8"              "\n"
     "pushq %rbp"                         "\n"
-    ".cfi_def_cfa_offset 16"             "\n"
-    ".cfi_offset rbp, -16"               "\n"
     "movq %rsp, %rbp"                    "\n"
-    ".cfi_def_cfa_register rbp"          "\n"
     /* Save non-volatile registers. */
     "pushq %r12"                         "\n"
     "pushq %r13"                         "\n"
     "pushq %r14"                         "\n"
     "pushq %r15"                         "\n"
     "pushq %rbx"                         "\n"
-    ".cfi_offset r12, -24"               "\n"
-    ".cfi_offset r13, -32"               "\n"
-    ".cfi_offset r14, -40"               "\n"
-    ".cfi_offset r15, -48"               "\n"
-    ".cfi_offset rbx, -56"               "\n"
 
     /* Load mask registers. */
     "movq $0xFFFF800000000000, %r13"     "\n"
     "movq $0x00007FFFFFFFFFFF, %r14"     "\n"
 
     /* Build the JIT frame.
      * rdi = cx
      * rsi = fp
@@ -261,82 +245,59 @@ SYMBOL_STRING(JaegerTrampoline) ":"     
     "pushq %rdx"                         "\n"
     "movq  %rsp, %rdi"                   "\n"
     "call " SYMBOL_STRING_VMFRAME(SetVMFrameRegs) "\n"
     "movq  %rsp, %rdi"                   "\n"
     "call " SYMBOL_STRING_VMFRAME(PushActiveVMFrame) "\n"
 
     /* Jump into the JIT'd code. */
     "jmp *0(%rsp)"                      "\n"
-    ".cfi_endproc"                      "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerTrampolineReturn) "\n"
 SYMBOL_STRING(JaegerTrampolineReturn) ":"       "\n"
-    ".cfi_startproc"                     "\n"
-    ".cfi_def_cfa_register rbp"          "\n"
-    ".cfi_def_cfa_offset 16"             "\n"
-    ".cfi_offset rbp, -16"               "\n"
-    ".cfi_offset r12, -24"               "\n"
-    ".cfi_offset r13, -32"               "\n"
-    ".cfi_offset r14, -40"               "\n"
-    ".cfi_offset r15, -48"               "\n"
-    ".cfi_offset rbx, -56"               "\n"
     "or   %rdi, %rsi"                    "\n"
     "movq %rsi, 0x30(%rbx)"              "\n"
     "movq %rsp, %rdi"                    "\n"
     "call " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
 
     "addq $0x68, %rsp"                   "\n"
     "popq %rbx"                          "\n"
     "popq %r15"                          "\n"
     "popq %r14"                          "\n"
     "popq %r13"                          "\n"
     "popq %r12"                          "\n"
     "popq %rbp"                          "\n"
-    ".cfi_def_cfa rsp, 8"                "\n"
     "movq $1, %rax"                      "\n"
     "ret"                                "\n"
-    ".cfi_endproc"                       "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerThrowpoline)  "\n"
 SYMBOL_STRING(JaegerThrowpoline) ":"        "\n"
-    ".cfi_startproc"                        "\n"
-    ".cfi_def_cfa_register rbp"             "\n"
-    ".cfi_def_cfa_offset 16"                "\n"
-    ".cfi_offset rbp, -16"                  "\n"
-    ".cfi_offset r12, -24"                  "\n"
-    ".cfi_offset r13, -32"                  "\n"
-    ".cfi_offset r14, -40"                  "\n"
-    ".cfi_offset r15, -48"                  "\n"
-    ".cfi_offset rbx, -56"                  "\n"
     "movq %rsp, %rdi"                       "\n"
     "call " SYMBOL_STRING_RELOC(js_InternalThrow) "\n"
     "testq %rax, %rax"                      "\n"
     "je   throwpoline_exit"                 "\n"
     "jmp  *%rax"                            "\n"
   "throwpoline_exit:"                       "\n"
     "movq %rsp, %rdi"                       "\n"
     "call " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
     "addq $0x68, %rsp"                      "\n"
     "popq %rbx"                             "\n"
     "popq %r15"                             "\n"
     "popq %r14"                             "\n"
     "popq %r13"                             "\n"
     "popq %r12"                             "\n"
     "popq %rbp"                             "\n"
-    ".cfi_def_cfa rsp, 8"                   "\n"
     "xorq %rax,%rax"                        "\n"
     "ret"                                   "\n"
-    ".cfi_endproc"                          "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerInterpoline)  "\n"
 SYMBOL_STRING(JaegerInterpoline) ":"        "\n"
     "movq %rsp, %rcx"                       "\n"
     "movq %rax, %rdx"                       "\n"
@@ -386,30 +347,22 @@ JS_STATIC_ASSERT(offsetof(VMFrame, saved
 JS_STATIC_ASSERT(offsetof(VMFrame, scratch) == 0xC);
 JS_STATIC_ASSERT(VMFrame::offsetOfFp == 0x1C);
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerTrampoline) "\n"
 SYMBOL_STRING(JaegerTrampoline) ":"       "\n"
     /* Prologue. */
-    ".cfi_startproc"                     "\n"
-    ".cfi_def_cfa esp, 4"                "\n"
     "pushl %ebp"                         "\n"
-    ".cfi_def_cfa_offset 8"              "\n"
-    ".cfi_offset ebp, -8"                "\n"
     "movl %esp, %ebp"                    "\n"
-    ".cfi_def_cfa_register ebp"          "\n"
     /* Save non-volatile registers. */
     "pushl %esi"                         "\n"
     "pushl %edi"                         "\n"
     "pushl %ebx"                         "\n"
-    ".cfi_offset esi, -12"               "\n"
-    ".cfi_offset edi, -16"               "\n"
-    ".cfi_offset ebx, -20"               "\n"
 
     /* Build the JIT frame. Push fields in order, 
      * then align the stack to form esp == VMFrame. */
     "movl  12(%ebp), %ebx"               "\n"   /* load fp */
     "pushl %ebx"                         "\n"   /* unused1 */
     "pushl %ebx"                         "\n"   /* unused0 */
     "pushl $0x0"                         "\n"   /* stubRejoin */
     "pushl %ebx"                         "\n"   /* entryncode */
@@ -422,58 +375,43 @@ SYMBOL_STRING(JaegerTrampoline) ":"     
     /* Jump into the JIT'd code. */
     "movl  %esp, %ecx"                   "\n"
     "call " SYMBOL_STRING_VMFRAME(SetVMFrameRegs) "\n"
     "movl  %esp, %ecx"                   "\n"
     "call " SYMBOL_STRING_VMFRAME(PushActiveVMFrame) "\n"
 
     "movl 28(%esp), %ebp"                "\n"   /* load fp for JIT code */
     "jmp *88(%esp)"                      "\n"
-    ".cfi_endproc"                       "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerTrampolineReturn) "\n"
 SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n"
-    ".cfi_startproc"                     "\n"
-    ".cfi_def_cfa ebp, 8"                "\n"
-    ".cfi_offset ebp, -8"                "\n"
-    ".cfi_offset esi, -12"               "\n"
-    ".cfi_offset edi, -16"               "\n"
-    ".cfi_offset ebx, -20"               "\n"
     "movl  %esi, 0x18(%ebp)"             "\n"
     "movl  %edi, 0x1C(%ebp)"             "\n"
     "movl  %esp, %ebp"                   "\n"
     "addl  $0x48, %ebp"                  "\n" /* Restore stack at STACK_BASE_DIFFERENCE */
     "movl  %esp, %ecx"                   "\n"
     "call " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
 
     "addl $0x3C, %esp"                   "\n"
     "popl %ebx"                          "\n"
     "popl %edi"                          "\n"
     "popl %esi"                          "\n"
     "popl %ebp"                          "\n"
-    ".cfi_def_cfa esp, 4"                "\n"
     "movl $1, %eax"                      "\n"
     "ret"                                "\n"
-    ".cfi_endproc"                       "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerThrowpoline)  "\n"
 SYMBOL_STRING(JaegerThrowpoline) ":"        "\n"
     /* Align the stack to 16 bytes. */
-    ".cfi_startproc"                     "\n"
-    ".cfi_def_cfa ebp, 8"                "\n"
-    ".cfi_offset ebp, -8"                "\n"
-    ".cfi_offset esi, -12"               "\n"
-    ".cfi_offset edi, -16"               "\n"
-    ".cfi_offset ebx, -20"               "\n"
     "pushl %esp"                         "\n"
     "pushl (%esp)"                       "\n"
     "pushl (%esp)"                       "\n"
     "pushl (%esp)"                       "\n"
     "call " SYMBOL_STRING_RELOC(js_InternalThrow) "\n"
     /* Bump the stack by 0x2c, as in the basic trampoline, but
      * also one more word to clean up the stack for js_InternalThrow,
      * and another to balance the alignment above. */
@@ -484,20 +422,18 @@ SYMBOL_STRING(JaegerThrowpoline) ":"    
   "throwpoline_exit:"                    "\n"
     "movl %esp, %ecx"                    "\n"
     "call " SYMBOL_STRING_VMFRAME(PopActiveVMFrame) "\n"
     "addl $0x3c, %esp"                   "\n"
     "popl %ebx"                          "\n"
     "popl %edi"                          "\n"
     "popl %esi"                          "\n"
     "popl %ebp"                          "\n"
-    ".cfi_def_cfa esp, 4"                "\n"
     "xorl %eax, %eax"                    "\n"
     "ret"                                "\n"
-    ".cfi_endproc"                       "\n"
 );
 
 asm (
 ".text\n"
 ".globl " SYMBOL_STRING(JaegerInterpoline)  "\n"
 SYMBOL_STRING(JaegerInterpoline) ":"        "\n"
     /* Align the stack to 16 bytes. */
     "pushl %esp"                         "\n"