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

Side by Side Diff: runtime/vm/stub_code_x64.cc

Issue 811453002: Fix release x64 build: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « runtime/vm/assembler_x64_test.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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 if (FLAG_throw_on_javascript_int_overflow) { 1209 if (FLAG_throw_on_javascript_int_overflow) {
1210 // The overflow check is more complex than implemented below. 1210 // The overflow check is more complex than implemented below.
1211 return; 1211 return;
1212 } 1212 }
1213 ASSERT(num_args == 2); 1213 ASSERT(num_args == 2);
1214 __ movq(RCX, Address(RSP, + 1 * kWordSize)); // Right 1214 __ movq(RCX, Address(RSP, + 1 * kWordSize)); // Right
1215 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left. 1215 __ movq(RAX, Address(RSP, + 2 * kWordSize)); // Left.
1216 __ movq(R12, RCX); 1216 __ movq(R12, RCX);
1217 __ orq(R12, RAX); 1217 __ orq(R12, RAX);
1218 __ testq(R12, Immediate(kSmiTagMask)); 1218 __ testq(R12, Immediate(kSmiTagMask));
1219 #if defined(DEBUG) 1219 __ j(NOT_ZERO, not_smi_or_overflow);
1220 const bool jump_length = Assembler::kFarJump;
1221 #else
1222 const bool jump_length = Assembler::kNearJump;
1223 #endif
1224 __ j(NOT_ZERO, not_smi_or_overflow, jump_length);
1225 switch (kind) { 1220 switch (kind) {
1226 case Token::kADD: { 1221 case Token::kADD: {
1227 __ addq(RAX, RCX); 1222 __ addq(RAX, RCX);
1228 __ j(OVERFLOW, not_smi_or_overflow, jump_length); 1223 __ j(OVERFLOW, not_smi_or_overflow);
1229 break; 1224 break;
1230 } 1225 }
1231 case Token::kSUB: { 1226 case Token::kSUB: {
1232 __ subq(RAX, RCX); 1227 __ subq(RAX, RCX);
1233 __ j(OVERFLOW, not_smi_or_overflow, jump_length); 1228 __ j(OVERFLOW, not_smi_or_overflow);
1234 break; 1229 break;
1235 } 1230 }
1236 case Token::kEQ: { 1231 case Token::kEQ: {
1237 Label done, is_true; 1232 Label done, is_true;
1238 __ cmpq(RAX, RCX); 1233 __ cmpq(RAX, RCX);
1239 __ j(EQUAL, &is_true, Assembler::kNearJump); 1234 __ j(EQUAL, &is_true, Assembler::kNearJump);
1240 __ LoadObject(RAX, Bool::False(), PP); 1235 __ LoadObject(RAX, Bool::False(), PP);
1241 __ jmp(&done, Assembler::kNearJump); 1236 __ jmp(&done, Assembler::kNearJump);
1242 __ Bind(&is_true); 1237 __ Bind(&is_true);
1243 __ LoadObject(RAX, Bool::True(), PP); 1238 __ LoadObject(RAX, Bool::True(), PP);
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 2062
2068 __ movq(left, Address(RSP, 2 * kWordSize)); 2063 __ movq(left, Address(RSP, 2 * kWordSize));
2069 __ movq(right, Address(RSP, 1 * kWordSize)); 2064 __ movq(right, Address(RSP, 1 * kWordSize));
2070 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 2065 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
2071 __ ret(); 2066 __ ret();
2072 } 2067 }
2073 2068
2074 } // namespace dart 2069 } // namespace dart
2075 2070
2076 #endif // defined TARGET_ARCH_X64 2071 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698