Make LeakSanitizer happy, part 2. Fixed register usage on the way.

Note that according to the System V ABI for AMD64, rbx must be
preserved across calls. We actually crash with clang in the x64
assembler tests without that fix, we were lucky with GCC.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/144313017

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19178 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c3ba22ad
......@@ -179,10 +179,10 @@ TEST(AssemblerX64XchglOperations) {
Assembler assm(CcTest::i_isolate(), buffer, static_cast<int>(actual_size));
__ movq(rax, Operand(arg1, 0));
__ movq(rbx, Operand(arg2, 0));
__ xchgl(rax, rbx);
__ movq(rdx, Operand(arg2, 0));
__ xchgl(rax, rdx);
__ movq(Operand(arg1, 0), rax);
__ movq(Operand(arg2, 0), rbx);
__ movq(Operand(arg2, 0), rdx);
__ ret(0);
CodeDesc desc;
......@@ -279,8 +279,8 @@ TEST(AssemblerX64TestlOperations) {
// Set rax with the ZF flag of the testl instruction.
Label done;
__ movq(rax, Immediate(1));
__ movq(rbx, Operand(arg2, 0));
__ testl(Operand(arg1, 0), rbx);
__ movq(rdx, Operand(arg2, 0));
__ testl(Operand(arg1, 0), rdx);
__ j(zero, &done, Label::kNear);
__ movq(rax, Immediate(0));
__ bind(&done);
......
......@@ -316,6 +316,8 @@ TEST(ImplicitReferences) {
reinterpret_cast<HeapObject**>(g2s1.location()));
ASSERT(implicit_refs->at(1)->length == 1);
ASSERT(implicit_refs->at(1)->children[0] == g2c1.location());
global_handles->RemoveObjectGroups();
global_handles->RemoveImplicitRefGroups();
}
......
......@@ -3483,7 +3483,7 @@ TEST(DeferredHandles) {
DeferredHandleScope deferred(isolate);
DummyVisitor visitor;
isolate->handle_scope_implementer()->Iterate(&visitor);
deferred.Detach();
delete deferred.Detach();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment