| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 case CodeStub::SubString: { | 1078 case CodeStub::SubString: { |
| 1079 SubStringStub stub; | 1079 SubStringStub stub; |
| 1080 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1080 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1081 break; | 1081 break; |
| 1082 } | 1082 } |
| 1083 case CodeStub::StringCompare: { | 1083 case CodeStub::StringCompare: { |
| 1084 StringCompareStub stub; | 1084 StringCompareStub stub; |
| 1085 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1085 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1086 break; | 1086 break; |
| 1087 } | 1087 } |
| 1088 case CodeStub::TranscendentalCache: { | |
| 1089 __ ldr(r0, MemOperand(sp, 0)); | |
| 1090 TranscendentalCacheStub stub(instr->transcendental_type(), | |
| 1091 TranscendentalCacheStub::TAGGED); | |
| 1092 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 1093 break; | |
| 1094 } | |
| 1095 default: | 1088 default: |
| 1096 UNREACHABLE(); | 1089 UNREACHABLE(); |
| 1097 } | 1090 } |
| 1098 } | 1091 } |
| 1099 | 1092 |
| 1100 | 1093 |
| 1101 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { | 1094 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { |
| 1102 GenerateOsrPrologue(); | 1095 GenerateOsrPrologue(); |
| 1103 } | 1096 } |
| 1104 | 1097 |
| (...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2127 case Token::MUL: | 2120 case Token::MUL: |
| 2128 __ vmul(result, left, right); | 2121 __ vmul(result, left, right); |
| 2129 break; | 2122 break; |
| 2130 case Token::DIV: | 2123 case Token::DIV: |
| 2131 __ vdiv(result, left, right); | 2124 __ vdiv(result, left, right); |
| 2132 break; | 2125 break; |
| 2133 case Token::MOD: { | 2126 case Token::MOD: { |
| 2134 __ PrepareCallCFunction(0, 2, scratch0()); | 2127 __ PrepareCallCFunction(0, 2, scratch0()); |
| 2135 __ SetCallCDoubleArguments(left, right); | 2128 __ SetCallCDoubleArguments(left, right); |
| 2136 __ CallCFunction( | 2129 __ CallCFunction( |
| 2137 ExternalReference::double_fp_operation(Token::MOD, isolate()), | 2130 ExternalReference::mod_two_doubles_operation(isolate()), |
| 2138 0, 2); | 2131 0, 2); |
| 2139 // Move the result in the double result register. | 2132 // Move the result in the double result register. |
| 2140 __ GetCFunctionDoubleResult(result); | 2133 __ GetCFunctionDoubleResult(result); |
| 2141 break; | 2134 break; |
| 2142 } | 2135 } |
| 2143 default: | 2136 default: |
| 2144 UNREACHABLE(); | 2137 UNREACHABLE(); |
| 2145 break; | 2138 break; |
| 2146 } | 2139 } |
| 2147 } | 2140 } |
| (...skipping 1786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3934 Register temp1 = ToRegister(instr->temp1()); | 3927 Register temp1 = ToRegister(instr->temp1()); |
| 3935 Register temp2 = ToRegister(instr->temp2()); | 3928 Register temp2 = ToRegister(instr->temp2()); |
| 3936 | 3929 |
| 3937 MathExpGenerator::EmitMathExp( | 3930 MathExpGenerator::EmitMathExp( |
| 3938 masm(), input, result, double_scratch1, double_scratch2, | 3931 masm(), input, result, double_scratch1, double_scratch2, |
| 3939 temp1, temp2, scratch0()); | 3932 temp1, temp2, scratch0()); |
| 3940 } | 3933 } |
| 3941 | 3934 |
| 3942 | 3935 |
| 3943 void LCodeGen::DoMathLog(LMathLog* instr) { | 3936 void LCodeGen::DoMathLog(LMathLog* instr) { |
| 3944 ASSERT(ToDoubleRegister(instr->result()).is(d2)); | 3937 __ PrepareCallCFunction(0, 1, scratch0()); |
| 3945 // Set the context register to a GC-safe fake value. Clobbering it is | 3938 __ SetCallCDoubleArguments(ToDoubleRegister(instr->value())); |
| 3946 // OK because this instruction is marked as a call. | 3939 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
| 3947 __ mov(cp, Operand::Zero()); | 3940 0, 1); |
| 3948 TranscendentalCacheStub stub(TranscendentalCache::LOG, | 3941 __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result())); |
| 3949 TranscendentalCacheStub::UNTAGGED); | |
| 3950 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 3951 } | 3942 } |
| 3952 | 3943 |
| 3953 | 3944 |
| 3954 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3945 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
| 3955 ASSERT(ToRegister(instr->context()).is(cp)); | 3946 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3956 ASSERT(ToRegister(instr->function()).is(r1)); | 3947 ASSERT(ToRegister(instr->function()).is(r1)); |
| 3957 ASSERT(instr->HasPointerMap()); | 3948 ASSERT(instr->HasPointerMap()); |
| 3958 | 3949 |
| 3959 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3950 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
| 3960 if (known_function.is_null()) { | 3951 if (known_function.is_null()) { |
| (...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5824 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5815 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5825 __ ldr(result, FieldMemOperand(scratch, | 5816 __ ldr(result, FieldMemOperand(scratch, |
| 5826 FixedArray::kHeaderSize - kPointerSize)); | 5817 FixedArray::kHeaderSize - kPointerSize)); |
| 5827 __ bind(&done); | 5818 __ bind(&done); |
| 5828 } | 5819 } |
| 5829 | 5820 |
| 5830 | 5821 |
| 5831 #undef __ | 5822 #undef __ |
| 5832 | 5823 |
| 5833 } } // namespace v8::internal | 5824 } } // namespace v8::internal |
| OLD | NEW |