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

Side by Side Diff: src/ia32/macro-assembler-ia32.cc

Issue 26236004: Rollback of r17108, r17106, r17104 in trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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/ia32/macro-assembler-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 add(esp, Immediate(kDoubleSize)); 246 add(esp, Immediate(kDoubleSize));
247 } 247 }
248 248
249 249
250 void MacroAssembler::X87TOSToI(Register result_reg, 250 void MacroAssembler::X87TOSToI(Register result_reg,
251 MinusZeroMode minus_zero_mode, 251 MinusZeroMode minus_zero_mode,
252 Label* conversion_failed, 252 Label* conversion_failed,
253 Label::Distance dst) { 253 Label::Distance dst) {
254 Label done; 254 Label done;
255 sub(esp, Immediate(kPointerSize)); 255 sub(esp, Immediate(kPointerSize));
256 fist_s(MemOperand(esp, 0));
256 fld(0); 257 fld(0);
257 fist_s(MemOperand(esp, 0));
258 fild_s(MemOperand(esp, 0)); 258 fild_s(MemOperand(esp, 0));
259 pop(result_reg); 259 pop(result_reg);
260 FCmp(); 260 FCmp();
261 j(not_equal, conversion_failed, dst); 261 j(not_equal, conversion_failed, dst);
262 j(parity_even, conversion_failed, dst); 262 j(parity_even, conversion_failed, dst);
263 if (minus_zero_mode == FAIL_ON_MINUS_ZERO) { 263 if (minus_zero_mode == FAIL_ON_MINUS_ZERO) {
264 test(result_reg, Operand(result_reg)); 264 test(result_reg, Operand(result_reg));
265 j(not_zero, &done, Label::kNear); 265 j(not_zero, &done, Label::kNear);
266 // To check for minus zero, we load the value again as float, and check 266 // To check for minus zero, we load the value again as float, and check
267 // if that is still 0. 267 // if that is still 0.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 447
448 448
449 static double kUint32Bias = 449 static double kUint32Bias =
450 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; 450 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
451 451
452 452
453 void MacroAssembler::LoadUint32(XMMRegister dst, 453 void MacroAssembler::LoadUint32(XMMRegister dst,
454 Register src, 454 Register src,
455 XMMRegister scratch) { 455 XMMRegister scratch) {
456 ASSERT(!Serializer::enabled());
457 Label done; 456 Label done;
458 cmp(src, Immediate(0)); 457 cmp(src, Immediate(0));
459 movdbl(scratch, 458 movdbl(scratch,
460 Operand(reinterpret_cast<int32_t>(&kUint32Bias), RelocInfo::NONE32)); 459 Operand(reinterpret_cast<int32_t>(&kUint32Bias), RelocInfo::NONE32));
461 Cvtsi2sd(dst, src); 460 Cvtsi2sd(dst, src);
462 j(not_sign, &done, Label::kNear); 461 j(not_sign, &done, Label::kNear);
463 addsd(dst, scratch); 462 addsd(dst, scratch);
464 bind(&done); 463 bind(&done);
465 } 464 }
466 465
467 466
468 void MacroAssembler::LoadUint32NoSSE2(Register src) {
469 ASSERT(!Serializer::enabled());
470 Label done;
471 push(src);
472 fild_s(Operand(esp, 0));
473 cmp(src, Immediate(0));
474 j(not_sign, &done, Label::kNear);
475 fld_d(Operand(reinterpret_cast<int32_t>(&kUint32Bias), RelocInfo::NONE32));
476 faddp(1);
477 bind(&done);
478 add(esp, Immediate(kPointerSize));
479 }
480
481
482 void MacroAssembler::RecordWriteArray(Register object, 467 void MacroAssembler::RecordWriteArray(Register object,
483 Register value, 468 Register value,
484 Register index, 469 Register index,
485 SaveFPRegsMode save_fp, 470 SaveFPRegsMode save_fp,
486 RememberedSetAction remembered_set_action, 471 RememberedSetAction remembered_set_action,
487 SmiCheck smi_check) { 472 SmiCheck smi_check) {
488 // First, check if a write barrier is even needed. The tests below 473 // First, check if a write barrier is even needed. The tests below
489 // catch stores of Smis. 474 // catch stores of Smis.
490 Label done; 475 Label done;
491 476
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after
3528 j(greater, &no_memento_available); 3513 j(greater, &no_memento_available);
3529 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize), 3514 cmp(MemOperand(scratch_reg, -AllocationMemento::kSize),
3530 Immediate(isolate()->factory()->allocation_memento_map())); 3515 Immediate(isolate()->factory()->allocation_memento_map()));
3531 bind(&no_memento_available); 3516 bind(&no_memento_available);
3532 } 3517 }
3533 3518
3534 3519
3535 } } // namespace v8::internal 3520 } } // namespace v8::internal
3536 3521
3537 #endif // V8_TARGET_ARCH_IA32 3522 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698