| 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 4578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4589 __ mov(result, zero_reg); | 4589 __ mov(result, zero_reg); |
| 4590 | 4590 |
| 4591 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4591 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 4592 __ SmiTag(char_code); | 4592 __ SmiTag(char_code); |
| 4593 __ push(char_code); | 4593 __ push(char_code); |
| 4594 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); | 4594 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); |
| 4595 __ StoreToSafepointRegisterSlot(v0, result); | 4595 __ StoreToSafepointRegisterSlot(v0, result); |
| 4596 } | 4596 } |
| 4597 | 4597 |
| 4598 | 4598 |
| 4599 void LCodeGen::DoStringLength(LStringLength* instr) { | |
| 4600 Register string = ToRegister(instr->string()); | |
| 4601 Register result = ToRegister(instr->result()); | |
| 4602 __ lw(result, FieldMemOperand(string, String::kLengthOffset)); | |
| 4603 } | |
| 4604 | |
| 4605 | |
| 4606 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 4599 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
| 4607 LOperand* input = instr->value(); | 4600 LOperand* input = instr->value(); |
| 4608 ASSERT(input->IsRegister() || input->IsStackSlot()); | 4601 ASSERT(input->IsRegister() || input->IsStackSlot()); |
| 4609 LOperand* output = instr->result(); | 4602 LOperand* output = instr->result(); |
| 4610 ASSERT(output->IsDoubleRegister()); | 4603 ASSERT(output->IsDoubleRegister()); |
| 4611 FPURegister single_scratch = double_scratch0().low(); | 4604 FPURegister single_scratch = double_scratch0().low(); |
| 4612 if (input->IsStackSlot()) { | 4605 if (input->IsStackSlot()) { |
| 4613 Register scratch = scratch0(); | 4606 Register scratch = scratch0(); |
| 4614 __ lw(scratch, ToMemOperand(input)); | 4607 __ lw(scratch, ToMemOperand(input)); |
| 4615 __ mtc1(scratch, single_scratch); | 4608 __ mtc1(scratch, single_scratch); |
| (...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5849 __ Subu(scratch, result, scratch); | 5842 __ Subu(scratch, result, scratch); |
| 5850 __ lw(result, FieldMemOperand(scratch, | 5843 __ lw(result, FieldMemOperand(scratch, |
| 5851 FixedArray::kHeaderSize - kPointerSize)); | 5844 FixedArray::kHeaderSize - kPointerSize)); |
| 5852 __ bind(&done); | 5845 __ bind(&done); |
| 5853 } | 5846 } |
| 5854 | 5847 |
| 5855 | 5848 |
| 5856 #undef __ | 5849 #undef __ |
| 5857 | 5850 |
| 5858 } } // namespace v8::internal | 5851 } } // namespace v8::internal |
| OLD | NEW |