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 4889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4900 PushSafepointRegistersScope scope(this); | 4900 PushSafepointRegistersScope scope(this); |
4901 __ SmiTag(char_code); | 4901 __ SmiTag(char_code); |
4902 __ push(char_code); | 4902 __ push(char_code); |
4903 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); | 4903 CallRuntimeFromDeferred(Runtime::kCharFromCode, 1, instr, instr->context()); |
4904 __ StoreToSafepointRegisterSlot(result, eax); | 4904 __ StoreToSafepointRegisterSlot(result, eax); |
4905 } | 4905 } |
4906 | 4906 |
4907 | 4907 |
4908 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4908 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
4909 ASSERT(ToRegister(instr->context()).is(esi)); | 4909 ASSERT(ToRegister(instr->context()).is(esi)); |
4910 if (FLAG_new_string_add) { | 4910 ASSERT(ToRegister(instr->left()).is(edx)); |
4911 ASSERT(ToRegister(instr->left()).is(edx)); | 4911 ASSERT(ToRegister(instr->right()).is(eax)); |
4912 ASSERT(ToRegister(instr->right()).is(eax)); | 4912 StringAddStub stub(instr->hydrogen()->flags(), |
4913 NewStringAddStub stub(instr->hydrogen()->flags(), | 4913 instr->hydrogen()->pretenure_flag()); |
4914 instr->hydrogen()->pretenure_flag()); | 4914 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
4915 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
4916 } else { | |
4917 EmitPushTaggedOperand(instr->left()); | |
4918 EmitPushTaggedOperand(instr->right()); | |
4919 StringAddStub stub(instr->hydrogen()->flags()); | |
4920 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
4921 } | |
4922 } | 4915 } |
4923 | 4916 |
4924 | 4917 |
4925 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { | 4918 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
4926 LOperand* input = instr->value(); | 4919 LOperand* input = instr->value(); |
4927 LOperand* output = instr->result(); | 4920 LOperand* output = instr->result(); |
4928 ASSERT(input->IsRegister() || input->IsStackSlot()); | 4921 ASSERT(input->IsRegister() || input->IsStackSlot()); |
4929 ASSERT(output->IsDoubleRegister()); | 4922 ASSERT(output->IsDoubleRegister()); |
4930 if (CpuFeatures::IsSupported(SSE2)) { | 4923 if (CpuFeatures::IsSupported(SSE2)) { |
4931 CpuFeatureScope scope(masm(), SSE2); | 4924 CpuFeatureScope scope(masm(), SSE2); |
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6362 FixedArray::kHeaderSize - kPointerSize)); | 6355 FixedArray::kHeaderSize - kPointerSize)); |
6363 __ bind(&done); | 6356 __ bind(&done); |
6364 } | 6357 } |
6365 | 6358 |
6366 | 6359 |
6367 #undef __ | 6360 #undef __ |
6368 | 6361 |
6369 } } // namespace v8::internal | 6362 } } // namespace v8::internal |
6370 | 6363 |
6371 #endif // V8_TARGET_ARCH_IA32 | 6364 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |