Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(335)

Side by Side Diff: test/cctest/test-macro-assembler-x64.cc

Issue 64453002: Refactor loading a pointer into a register instruction for X64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased with bleeding_edge Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2340 __ push(Immediate(0x108)); 2340 __ push(Immediate(0x108));
2341 __ push(Immediate(0x109)); // <-- rsp 2341 __ push(Immediate(0x109)); // <-- rsp
2342 // rbp = rsp[9] 2342 // rbp = rsp[9]
2343 // r15 = rsp[3] 2343 // r15 = rsp[3]
2344 // rbx = rsp[5] 2344 // rbx = rsp[5]
2345 // r13 = rsp[7] 2345 // r13 = rsp[7]
2346 __ lea(r14, Operand(rsp, 3 * kPointerSize)); 2346 __ lea(r14, Operand(rsp, 3 * kPointerSize));
2347 __ lea(r13, Operand(rbp, -3 * kPointerSize)); 2347 __ lea(r13, Operand(rbp, -3 * kPointerSize));
2348 __ lea(rbx, Operand(rbp, -5 * kPointerSize)); 2348 __ lea(rbx, Operand(rbp, -5 * kPointerSize));
2349 __ movl(rcx, Immediate(2)); 2349 __ movl(rcx, Immediate(2));
2350 __ movq(r8, reinterpret_cast<Address>(&data[128]), RelocInfo::NONE64); 2350 __ Move(r8, reinterpret_cast<Address>(&data[128]), RelocInfo::NONE64);
2351 __ movl(rax, Immediate(1)); 2351 __ movl(rax, Immediate(1));
2352 2352
2353 Operand sp0 = Operand(rsp, 0); 2353 Operand sp0 = Operand(rsp, 0);
2354 2354
2355 // Test 1. 2355 // Test 1.
2356 __ movl(rdx, sp0); // Sanity check. 2356 __ movl(rdx, sp0); // Sanity check.
2357 __ cmpl(rdx, Immediate(0x109)); 2357 __ cmpl(rdx, Immediate(0x109));
2358 __ j(not_equal, &exit); 2358 __ j(not_equal, &exit);
2359 __ incq(rax); 2359 __ incq(rax);
2360 2360
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 2804
2805 CodeDesc desc; 2805 CodeDesc desc;
2806 masm->GetCode(&desc); 2806 masm->GetCode(&desc);
2807 // Call the function from C++. 2807 // Call the function from C++.
2808 int result = FUNCTION_CAST<F0>(buffer)(); 2808 int result = FUNCTION_CAST<F0>(buffer)();
2809 CHECK_EQ(0, result); 2809 CHECK_EQ(0, result);
2810 } 2810 }
2811 2811
2812 2812
2813 #undef __ 2813 #undef __
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698