Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 157503002: A64: Synchronize with r18444. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 case CodeStub::SubString: { 1038 case CodeStub::SubString: {
1039 SubStringStub stub; 1039 SubStringStub stub;
1040 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 1040 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
1041 break; 1041 break;
1042 } 1042 }
1043 case CodeStub::StringCompare: { 1043 case CodeStub::StringCompare: {
1044 StringCompareStub stub; 1044 StringCompareStub stub;
1045 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 1045 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
1046 break; 1046 break;
1047 } 1047 }
1048 case CodeStub::TranscendentalCache: {
1049 __ lw(a0, MemOperand(sp, 0));
1050 TranscendentalCacheStub stub(instr->transcendental_type(),
1051 TranscendentalCacheStub::TAGGED);
1052 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
1053 break;
1054 }
1055 default: 1048 default:
1056 UNREACHABLE(); 1049 UNREACHABLE();
1057 } 1050 }
1058 } 1051 }
1059 1052
1060 1053
1061 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) { 1054 void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
1062 GenerateOsrPrologue(); 1055 GenerateOsrPrologue();
1063 } 1056 }
1064 1057
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 __ div_d(result, left, right); 1931 __ div_d(result, left, right);
1939 break; 1932 break;
1940 case Token::MOD: { 1933 case Token::MOD: {
1941 // Save a0-a3 on the stack. 1934 // Save a0-a3 on the stack.
1942 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); 1935 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit();
1943 __ MultiPush(saved_regs); 1936 __ MultiPush(saved_regs);
1944 1937
1945 __ PrepareCallCFunction(0, 2, scratch0()); 1938 __ PrepareCallCFunction(0, 2, scratch0());
1946 __ SetCallCDoubleArguments(left, right); 1939 __ SetCallCDoubleArguments(left, right);
1947 __ CallCFunction( 1940 __ CallCFunction(
1948 ExternalReference::double_fp_operation(Token::MOD, isolate()), 1941 ExternalReference::mod_two_doubles_operation(isolate()),
1949 0, 2); 1942 0, 2);
1950 // Move the result in the double result register. 1943 // Move the result in the double result register.
1951 __ GetCFunctionDoubleResult(result); 1944 __ GetCFunctionDoubleResult(result);
1952 1945
1953 // Restore saved register. 1946 // Restore saved register.
1954 __ MultiPop(saved_regs); 1947 __ MultiPop(saved_regs);
1955 break; 1948 break;
1956 } 1949 }
1957 default: 1950 default:
1958 UNREACHABLE(); 1951 UNREACHABLE();
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 // Deoptimize if the receiver is not a JS object. 3364 // Deoptimize if the receiver is not a JS object.
3372 __ SmiTst(receiver, scratch); 3365 __ SmiTst(receiver, scratch);
3373 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg)); 3366 DeoptimizeIf(eq, instr->environment(), scratch, Operand(zero_reg));
3374 3367
3375 __ GetObjectType(receiver, scratch, scratch); 3368 __ GetObjectType(receiver, scratch, scratch);
3376 DeoptimizeIf(lt, instr->environment(), 3369 DeoptimizeIf(lt, instr->environment(),
3377 scratch, Operand(FIRST_SPEC_OBJECT_TYPE)); 3370 scratch, Operand(FIRST_SPEC_OBJECT_TYPE));
3378 __ Branch(&result_in_receiver); 3371 __ Branch(&result_in_receiver);
3379 3372
3380 __ bind(&global_object); 3373 __ bind(&global_object);
3381 __ lw(result, GlobalObjectOperand()); 3374
3375 __ lw(result, MemOperand(fp, StandardFrameConstants::kContextOffset));
3376 __ lw(result, ContextOperand(result, Context::GLOBAL_OBJECT_INDEX));
3382 __ lw(result, 3377 __ lw(result,
3383 FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset)); 3378 FieldMemOperand(result, JSGlobalObject::kGlobalReceiverOffset));
3384 if (result.is(receiver)) { 3379 if (result.is(receiver)) {
3385 __ bind(&result_in_receiver); 3380 __ bind(&result_in_receiver);
3386 } else { 3381 } else {
3387 Label result_ok; 3382 Label result_ok;
3388 __ Branch(&result_ok); 3383 __ Branch(&result_ok);
3389 __ bind(&result_in_receiver); 3384 __ bind(&result_in_receiver);
3390 __ mov(result, receiver); 3385 __ mov(result, receiver);
3391 __ bind(&result_ok); 3386 __ bind(&result_ok);
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
3857 Register temp1 = ToRegister(instr->temp1()); 3852 Register temp1 = ToRegister(instr->temp1());
3858 Register temp2 = ToRegister(instr->temp2()); 3853 Register temp2 = ToRegister(instr->temp2());
3859 3854
3860 MathExpGenerator::EmitMathExp( 3855 MathExpGenerator::EmitMathExp(
3861 masm(), input, result, double_scratch1, double_scratch2, 3856 masm(), input, result, double_scratch1, double_scratch2,
3862 temp1, temp2, scratch0()); 3857 temp1, temp2, scratch0());
3863 } 3858 }
3864 3859
3865 3860
3866 void LCodeGen::DoMathLog(LMathLog* instr) { 3861 void LCodeGen::DoMathLog(LMathLog* instr) {
3867 ASSERT(ToDoubleRegister(instr->result()).is(f4)); 3862 __ PrepareCallCFunction(0, 1, scratch0());
3868 // Set the context register to a GC-safe fake value. Clobbering it is 3863 __ SetCallCDoubleArguments(ToDoubleRegister(instr->value()));
3869 // OK because this instruction is marked as a call. 3864 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
3870 __ mov(cp, zero_reg); 3865 0, 1);
3871 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3866 __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result()));
3872 TranscendentalCacheStub::UNTAGGED);
3873 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3874 } 3867 }
3875 3868
3876 3869
3877 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { 3870 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
3878 ASSERT(ToRegister(instr->context()).is(cp)); 3871 ASSERT(ToRegister(instr->context()).is(cp));
3879 ASSERT(ToRegister(instr->function()).is(a1)); 3872 ASSERT(ToRegister(instr->function()).is(a1));
3880 ASSERT(instr->HasPointerMap()); 3873 ASSERT(instr->HasPointerMap());
3881 3874
3882 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); 3875 Handle<JSFunction> known_function = instr->hydrogen()->known_function();
3883 if (known_function.is_null()) { 3876 if (known_function.is_null()) {
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
5818 __ Subu(scratch, result, scratch); 5811 __ Subu(scratch, result, scratch);
5819 __ lw(result, FieldMemOperand(scratch, 5812 __ lw(result, FieldMemOperand(scratch,
5820 FixedArray::kHeaderSize - kPointerSize)); 5813 FixedArray::kHeaderSize - kPointerSize));
5821 __ bind(&done); 5814 __ bind(&done);
5822 } 5815 }
5823 5816
5824 5817
5825 #undef __ 5818 #undef __
5826 5819
5827 } } // namespace v8::internal 5820 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698