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

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

Issue 6716018: X64: Optimize access to external references. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge with tip of bleeding edge. Created 9 years, 9 months 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 typedef int (*F0)(); 90 typedef int (*F0)();
91 91
92 #define __ masm-> 92 #define __ masm->
93 93
94 94
95 static void EntryCode(MacroAssembler* masm) { 95 static void EntryCode(MacroAssembler* masm) {
96 // Smi constant register is callee save. 96 // Smi constant register is callee save.
97 __ push(v8::internal::kSmiConstantRegister); 97 __ push(v8::internal::kSmiConstantRegister);
98 __ InitializeSmiConstantRegister(); 98 __ InitializeSmiConstantRegister();
99 __ InitializeRootRegister();
99 } 100 }
100 101
101 102
102 static void ExitCode(MacroAssembler* masm) { 103 static void ExitCode(MacroAssembler* masm) {
103 // Return -1 if kSmiConstantRegister was clobbered during the test. 104 // Return -1 if kSmiConstantRegister was clobbered during the test.
104 __ Move(rdx, Smi::FromInt(1)); 105 __ Move(rdx, Smi::FromInt(1));
105 __ cmpq(rdx, v8::internal::kSmiConstantRegister); 106 __ cmpq(rdx, v8::internal::kSmiConstantRegister);
106 __ movq(rdx, Immediate(-1)); 107 __ movq(rdx, Immediate(-1));
107 __ cmovq(not_equal, rax, rdx); 108 __ cmovq(not_equal, rax, rdx);
108 __ pop(v8::internal::kSmiConstantRegister); 109 __ pop(v8::internal::kSmiConstantRegister);
(...skipping 2378 matching lines...) Expand 10 before | Expand all | Expand 10 after
2487 CodeDesc desc; 2488 CodeDesc desc;
2488 masm->GetCode(&desc); 2489 masm->GetCode(&desc);
2489 // Call the function from C++. 2490 // Call the function from C++.
2490 int result = FUNCTION_CAST<F0>(buffer)(); 2491 int result = FUNCTION_CAST<F0>(buffer)();
2491 CHECK_EQ(0, result); 2492 CHECK_EQ(0, result);
2492 } 2493 }
2493 2494
2494 2495
2495 2496
2496 #undef __ 2497 #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