Bug 885169 - Spidermonkey: Fix x64 trampoline code to inform its RegisterSet of its use of a context register. r=nbp
authorDan Gohman <sunfish@google.com>
Sat, 07 Sep 2013 06:47:56 -0700
changeset 146063 d6b0a8afb4675f12148e37487dc2c80a7b13aba4
parent 146062 de8f83fde39482118e4e9b5249d7d1fd36b1d793
child 146064 26006e5cefdcd37bc68aa4ad4aaa55fe68d8abb6
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersnbp
bugs885169
milestone26.0a1
Bug 885169 - Spidermonkey: Fix x64 trampoline code to inform its RegisterSet of its use of a context register. r=nbp
js/src/jit/x64/Trampoline-x64.cpp
--- a/js/src/jit/x64/Trampoline-x64.cpp
+++ b/js/src/jit/x64/Trampoline-x64.cpp
@@ -500,16 +500,17 @@ IonRuntime::generateVMWrapper(JSContext 
     // the function call.
     GeneralRegisterSet regs = GeneralRegisterSet(Register::Codes::WrapperMask);
 
     // Wrapper register set is a superset of Volatile register set.
     JS_STATIC_ASSERT((Register::Codes::VolatileMask & ~Register::Codes::WrapperMask) == 0);
 
     // The context is the first argument.
     Register cxreg = IntArgReg0;
+    regs.take(cxreg);
 
     // Stack is:
     //    ... frame ...
     //  +12 [args]
     //  +8  descriptor
     //  +0  returnAddress
     //
     // We're aligned to an exit frame, so link it up.