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 4627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4638 __ mov(result, Operand::Zero()); | 4638 __ mov(result, Operand::Zero()); |
4639 | 4639 |
4640 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 4640 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
4641 __ SmiTag(char_code); | 4641 __ SmiTag(char_code); |
4642 __ push(char_code); | 4642 __ push(char_code); |
4643 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); | 4643 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); |
4644 __ StoreToSafepointRegisterSlot(r0, result); | 4644 __ StoreToSafepointRegisterSlot(r0, result); |
4645 } | 4645 } |
4646 | 4646 |
4647 | 4647 |
4648 void LCodeGen::DoStringLength(LStringLength* instr) { | |
4649 Register string = ToRegister(instr->string()); | |
4650 Register result = ToRegister(instr->result()); | |
4651 __ ldr(result, FieldMemOperand(string, String::kLengthOffset)); | |
4652 } | |
4653 | |
4654 | |
4655 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 4648 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
4656 LOperand* input = instr->value(); | 4649 LOperand* input = instr->value(); |
4657 ASSERT(input->IsRegister() || input->IsStackSlot()); | 4650 ASSERT(input->IsRegister() || input->IsStackSlot()); |
4658 LOperand* output = instr->result(); | 4651 LOperand* output = instr->result(); |
4659 ASSERT(output->IsDoubleRegister()); | 4652 ASSERT(output->IsDoubleRegister()); |
4660 SwVfpRegister single_scratch = double_scratch0().low(); | 4653 SwVfpRegister single_scratch = double_scratch0().low(); |
4661 if (input->IsStackSlot()) { | 4654 if (input->IsStackSlot()) { |
4662 Register scratch = scratch0(); | 4655 Register scratch = scratch0(); |
4663 __ ldr(scratch, ToMemOperand(input)); | 4656 __ ldr(scratch, ToMemOperand(input)); |
4664 __ vmov(single_scratch, scratch); | 4657 __ vmov(single_scratch, scratch); |
(...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5831 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5824 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5832 __ ldr(result, FieldMemOperand(scratch, | 5825 __ ldr(result, FieldMemOperand(scratch, |
5833 FixedArray::kHeaderSize - kPointerSize)); | 5826 FixedArray::kHeaderSize - kPointerSize)); |
5834 __ bind(&done); | 5827 __ bind(&done); |
5835 } | 5828 } |
5836 | 5829 |
5837 | 5830 |
5838 #undef __ | 5831 #undef __ |
5839 | 5832 |
5840 } } // namespace v8::internal | 5833 } } // namespace v8::internal |
OLD | NEW |