| OLD | NEW |
| 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 4994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5005 LOperand* input = instr->value(); | 5005 LOperand* input = instr->value(); |
| 5006 LOperand* output = instr->result(); | 5006 LOperand* output = instr->result(); |
| 5007 LOperand* temp = instr->temp(); | 5007 LOperand* temp = instr->temp(); |
| 5008 | 5008 |
| 5009 __ LoadUint32(ToDoubleRegister(output), | 5009 __ LoadUint32(ToDoubleRegister(output), |
| 5010 ToRegister(input), | 5010 ToRegister(input), |
| 5011 ToDoubleRegister(temp)); | 5011 ToDoubleRegister(temp)); |
| 5012 } | 5012 } |
| 5013 | 5013 |
| 5014 | 5014 |
| 5015 void LCodeGen::DoUint32ToSmi(LUint32ToSmi* instr) { |
| 5016 Register input = ToRegister(instr->value()); |
| 5017 if (!instr->hydrogen()->value()->HasRange() || |
| 5018 !instr->hydrogen()->value()->range()->IsInSmiRange()) { |
| 5019 __ test(input, Immediate(0xc0000000)); |
| 5020 DeoptimizeIf(not_zero, instr->environment()); |
| 5021 } |
| 5022 __ SmiTag(input); |
| 5023 } |
| 5024 |
| 5025 |
| 5015 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { | 5026 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { |
| 5016 class DeferredNumberTagI V8_FINAL : public LDeferredCode { | 5027 class DeferredNumberTagI V8_FINAL : public LDeferredCode { |
| 5017 public: | 5028 public: |
| 5018 DeferredNumberTagI(LCodeGen* codegen, | 5029 DeferredNumberTagI(LCodeGen* codegen, |
| 5019 LNumberTagI* instr, | 5030 LNumberTagI* instr, |
| 5020 const X87Stack& x87_stack) | 5031 const X87Stack& x87_stack) |
| 5021 : LDeferredCode(codegen, x87_stack), instr_(instr) { } | 5032 : LDeferredCode(codegen, x87_stack), instr_(instr) { } |
| 5022 virtual void Generate() V8_OVERRIDE { | 5033 virtual void Generate() V8_OVERRIDE { |
| 5023 codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); | 5034 codegen()->DoDeferredNumberTagI(instr_, instr_->value(), SIGNED_INT32); |
| 5024 } | 5035 } |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6357 FixedArray::kHeaderSize - kPointerSize)); | 6368 FixedArray::kHeaderSize - kPointerSize)); |
| 6358 __ bind(&done); | 6369 __ bind(&done); |
| 6359 } | 6370 } |
| 6360 | 6371 |
| 6361 | 6372 |
| 6362 #undef __ | 6373 #undef __ |
| 6363 | 6374 |
| 6364 } } // namespace v8::internal | 6375 } } // namespace v8::internal |
| 6365 | 6376 |
| 6366 #endif // V8_TARGET_ARCH_IA32 | 6377 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |