Fix spilling bug
commit6bd65a5cd61c8d989f8be06fd84647a6c0cb821c
authormwilliams <mwilliams@fb.com>
Fri, 28 Jun 2013 23:12:59 +0000 (28 16:12 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 1 Jul 2013 20:40:58 +0000 (1 13:40 -0700)
tree688632eb55b0af4d507f67b310613bbb6501f2a1
parent900dbd02258da7a1cae898d9ca25f242dd358446
Fix spilling bug

If we spilled a FuncCtx (pretty unlikely), we treated the class/this
portion as a type, and only spilled/restored the low 32 bits:

   0xb23ad54:    mov    %r13,0x10(%rsp)
   0xb23ad59:    mov    %edx,0x1c(%rsp) # rdx contained a $this pointer
   0xb23ad5d:    mov    %r14,-0x10(%rbx)
   0xb23ad61:    mov    %r15d,-0x4(%rbx)
   0xb23ad65:    add    $0xfffffffffffffff0,%rbx
   0xb23ad69:    lea    (%rbx),%rdi
   0xb23ad6c:    callq  0x33f68f1 <HPHP::assertTv(HPHP::TypedValue const*)>
   0xb23ad71:    mov    0x10(%rsp),%rdx
   0xb23ad76:    mov    0x1c(%rsp),%ecx # restored here
   0xb23ad7a:    movq   $0x0,-0x8(%rbx)
   0xb23ad82:    mov    %rdx,-0x20(%rbx)
   0xb23ad86:    mov    %rcx,-0x10(%rbx) # and written to the new actrec here
   0xb23ad8a:    mov    %rbp,-0x30(%rbx)
   0xb23ad8e:    movl   $0x0,-0x14(%rbx)
   0xb23ad95:    add    $0xffffffffffffffd0,%rbx
hphp/runtime/vm/jit/codegen.cpp