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

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

Issue 66783007: Merged r17441 into 3.21 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.21
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 4461 matching lines...) Expand 10 before | Expand all | Expand 10 after
4472 LOperand* input = instr->value(); 4472 LOperand* input = instr->value();
4473 LOperand* output = instr->result(); 4473 LOperand* output = instr->result();
4474 LOperand* temp = instr->temp(); 4474 LOperand* temp = instr->temp();
4475 4475
4476 __ LoadUint32(ToDoubleRegister(output), 4476 __ LoadUint32(ToDoubleRegister(output),
4477 ToRegister(input), 4477 ToRegister(input),
4478 ToDoubleRegister(temp)); 4478 ToDoubleRegister(temp));
4479 } 4479 }
4480 4480
4481 4481
4482 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) {
4483 LOperand* input = instr->value();
4484 ASSERT(input->IsRegister());
4485 LOperand* output = instr->result();
4486 if (!instr->hydrogen()->value()->HasRange() ||
4487 !instr->hydrogen()->value()->range()->IsInSmiRange() ||
4488 instr->hydrogen()->value()->range()->upper() == kMaxInt) {
4489 // The Range class can't express upper bounds in the (kMaxInt, kMaxUint32]
4490 // interval, so we treat kMaxInt as a sentinel for this entire interval.
4491 __ testl(ToRegister(input), Immediate(0x80000000));
4492 DeoptimizeIf(not_zero, instr->environment());
4493 }
4494 __ Integer32ToSmi(ToRegister(output), ToRegister(input));
4495 }
4496
4497
4482 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4498 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4483 LOperand* input = instr->value(); 4499 LOperand* input = instr->value();
4484 ASSERT(input->IsRegister() && input->Equals(instr->result())); 4500 ASSERT(input->IsRegister() && input->Equals(instr->result()));
4485 Register reg = ToRegister(input); 4501 Register reg = ToRegister(input);
4486 4502
4487 __ Integer32ToSmi(reg, reg); 4503 __ Integer32ToSmi(reg, reg);
4488 } 4504 }
4489 4505
4490 4506
4491 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4507 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
(...skipping 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
5493 FixedArray::kHeaderSize - kPointerSize)); 5509 FixedArray::kHeaderSize - kPointerSize));
5494 __ bind(&done); 5510 __ bind(&done);
5495 } 5511 }
5496 5512
5497 5513
5498 #undef __ 5514 #undef __
5499 5515
5500 } } // namespace v8::internal 5516 } } // namespace v8::internal
5501 5517
5502 #endif // V8_TARGET_ARCH_X64 5518 #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