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 4677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4688 } else { | 4688 } else { |
4689 __ vmov(single_scratch, ToRegister(input)); | 4689 __ vmov(single_scratch, ToRegister(input)); |
4690 } | 4690 } |
4691 __ vcvt_f64_s32(ToDoubleRegister(output), single_scratch); | 4691 __ vcvt_f64_s32(ToDoubleRegister(output), single_scratch); |
4692 } | 4692 } |
4693 | 4693 |
4694 | 4694 |
4695 void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { | 4695 void LCodeGen::DoInteger32ToSmi(LInteger32ToSmi* instr) { |
4696 LOperand* input = instr->value(); | 4696 LOperand* input = instr->value(); |
4697 LOperand* output = instr->result(); | 4697 LOperand* output = instr->result(); |
4698 __ SmiTag(ToRegister(output), ToRegister(input), SetCC); | 4698 ASSERT(output->IsRegister()); |
4699 if (!instr->hydrogen()->value()->HasRange() || | 4699 if (!instr->hydrogen()->value()->HasRange() || |
4700 !instr->hydrogen()->value()->range()->IsInSmiRange()) { | 4700 !instr->hydrogen()->value()->range()->IsInSmiRange()) { |
| 4701 __ SmiTag(ToRegister(output), ToRegister(input), SetCC); |
4701 DeoptimizeIf(vs, instr->environment()); | 4702 DeoptimizeIf(vs, instr->environment()); |
| 4703 } else { |
| 4704 __ SmiTag(ToRegister(output), ToRegister(input)); |
4702 } | 4705 } |
4703 } | 4706 } |
4704 | 4707 |
4705 | 4708 |
4706 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { | 4709 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { |
4707 LOperand* input = instr->value(); | 4710 LOperand* input = instr->value(); |
4708 LOperand* output = instr->result(); | 4711 LOperand* output = instr->result(); |
4709 | 4712 |
4710 SwVfpRegister flt_scratch = double_scratch0().low(); | 4713 SwVfpRegister flt_scratch = double_scratch0().low(); |
4711 __ vmov(flt_scratch, ToRegister(input)); | 4714 __ vmov(flt_scratch, ToRegister(input)); |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5879 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5882 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5880 __ ldr(result, FieldMemOperand(scratch, | 5883 __ ldr(result, FieldMemOperand(scratch, |
5881 FixedArray::kHeaderSize - kPointerSize)); | 5884 FixedArray::kHeaderSize - kPointerSize)); |
5882 __ bind(&done); | 5885 __ bind(&done); |
5883 } | 5886 } |
5884 | 5887 |
5885 | 5888 |
5886 #undef __ | 5889 #undef __ |
5887 | 5890 |
5888 } } // namespace v8::internal | 5891 } } // namespace v8::internal |
OLD | NEW |