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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 70333002: Merged r17441 into 3.20 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.20
Patch Set: Created 7 years, 1 month 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/version.cc ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4441 matching lines...) Expand 10 before | Expand all | Expand 10 after
4452 LOperand* input = instr->value(); 4452 LOperand* input = instr->value();
4453 LOperand* output = instr->result(); 4453 LOperand* output = instr->result();
4454 LOperand* temp = instr->temp(); 4454 LOperand* temp = instr->temp();
4455 4455
4456 __ LoadUint32(ToDoubleRegister(output), 4456 __ LoadUint32(ToDoubleRegister(output),
4457 ToRegister(input), 4457 ToRegister(input),
4458 ToDoubleRegister(temp)); 4458 ToDoubleRegister(temp));
4459 } 4459 }
4460 4460
4461 4461
4462 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) {
4463 LOperand* input = instr->value();
4464 ASSERT(input->IsRegister());
4465 LOperand* output = instr->result();
4466 if (!instr->hydrogen()->value()->HasRange() ||
4467 !instr->hydrogen()->value()->range()->IsInSmiRange() ||
4468 instr->hydrogen()->value()->range()->upper() == kMaxInt) {
4469 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
4470 // interval, so we treat kMaxInt as a sentinel for this entire interval.
4471 __ testl(ToRegister(input), Immediate(0x80000000));
4472 DeoptimizeIf(not_zero, instr->environment());
4473 }
4474 __ Integer32ToSmi(ToRegister(output), ToRegister(input));
4475 }
4476
4477
4462 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4478 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4463 LOperand* input = instr->value(); 4479 LOperand* input = instr->value();
4464 ASSERT(input->IsRegister() && input->Equals(instr->result())); 4480 ASSERT(input->IsRegister() && input->Equals(instr->result()));
4465 Register reg = ToRegister(input); 4481 Register reg = ToRegister(input);
4466 4482
4467 __ Integer32ToSmi(reg, reg); 4483 __ Integer32ToSmi(reg, reg);
4468 } 4484 }
4469 4485
4470 4486
4471 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4487 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
5511 FixedArray::kHeaderSize - kPointerSize)); 5527 FixedArray::kHeaderSize - kPointerSize));
5512 __ bind(&done); 5528 __ bind(&done);
5513 } 5529 }
5514 5530
5515 5531
5516 #undef __ 5532 #undef __
5517 5533
5518 } } // namespace v8::internal 5534 } } // namespace v8::internal
5519 5535
5520 #endif // V8_TARGET_ARCH_X64 5536 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698