OLD | NEW |
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 4427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4438 __ Set(result, 0); | 4438 __ Set(result, 0); |
4439 | 4439 |
4440 PushSafepointRegistersScope scope(this); | 4440 PushSafepointRegistersScope scope(this); |
4441 __ Integer32ToSmi(char_code, char_code); | 4441 __ Integer32ToSmi(char_code, char_code); |
4442 __ push(char_code); | 4442 __ push(char_code); |
4443 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); | 4443 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr); |
4444 __ StoreToSafepointRegisterSlot(result, rax); | 4444 __ StoreToSafepointRegisterSlot(result, rax); |
4445 } | 4445 } |
4446 | 4446 |
4447 | 4447 |
4448 void LCodeGen::DoStringLength(LStringLength* instr) { | |
4449 Register string = ToRegister(instr->string()); | |
4450 Register result = ToRegister(instr->result()); | |
4451 __ movq(result, FieldOperand(string, String::kLengthOffset)); | |
4452 } | |
4453 | |
4454 | |
4455 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 4448 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
4456 LOperand* input = instr->value(); | 4449 LOperand* input = instr->value(); |
4457 ASSERT(input->IsRegister() || input->IsStackSlot()); | 4450 ASSERT(input->IsRegister() || input->IsStackSlot()); |
4458 LOperand* output = instr->result(); | 4451 LOperand* output = instr->result(); |
4459 ASSERT(output->IsDoubleRegister()); | 4452 ASSERT(output->IsDoubleRegister()); |
4460 if (input->IsRegister()) { | 4453 if (input->IsRegister()) { |
4461 __ cvtlsi2sd(ToDoubleRegister(output), ToRegister(input)); | 4454 __ cvtlsi2sd(ToDoubleRegister(output), ToRegister(input)); |
4462 } else { | 4455 } else { |
4463 __ cvtlsi2sd(ToDoubleRegister(output), ToOperand(input)); | 4456 __ cvtlsi2sd(ToDoubleRegister(output), ToOperand(input)); |
4464 } | 4457 } |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5566 FixedArray::kHeaderSize - kPointerSize)); | 5559 FixedArray::kHeaderSize - kPointerSize)); |
5567 __ bind(&done); | 5560 __ bind(&done); |
5568 } | 5561 } |
5569 | 5562 |
5570 | 5563 |
5571 #undef __ | 5564 #undef __ |
5572 | 5565 |
5573 } } // namespace v8::internal | 5566 } } // namespace v8::internal |
5574 | 5567 |
5575 #endif // V8_TARGET_ARCH_X64 | 5568 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |