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

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

Issue 136613003: Demystified floating point ABI function names. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 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/codegen-mips.cc ('k') | src/mips/macro-assembler-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 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 break; 1929 break;
1930 case Token::DIV: 1930 case Token::DIV:
1931 __ div_d(result, left, right); 1931 __ div_d(result, left, right);
1932 break; 1932 break;
1933 case Token::MOD: { 1933 case Token::MOD: {
1934 // Save a0-a3 on the stack. 1934 // Save a0-a3 on the stack.
1935 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit(); 1935 RegList saved_regs = a0.bit() | a1.bit() | a2.bit() | a3.bit();
1936 __ MultiPush(saved_regs); 1936 __ MultiPush(saved_regs);
1937 1937
1938 __ PrepareCallCFunction(0, 2, scratch0()); 1938 __ PrepareCallCFunction(0, 2, scratch0());
1939 __ SetCallCDoubleArguments(left, right); 1939 __ MovToFloatParameters(left, right);
1940 __ CallCFunction( 1940 __ CallCFunction(
1941 ExternalReference::mod_two_doubles_operation(isolate()), 1941 ExternalReference::mod_two_doubles_operation(isolate()),
1942 0, 2); 1942 0, 2);
1943 // Move the result in the double result register. 1943 // Move the result in the double result register.
1944 __ GetCFunctionDoubleResult(result); 1944 __ MovFromFloatResult(result);
1945 1945
1946 // Restore saved register. 1946 // Restore saved register.
1947 __ MultiPop(saved_regs); 1947 __ MultiPop(saved_regs);
1948 break; 1948 break;
1949 } 1949 }
1950 default: 1950 default:
1951 UNREACHABLE(); 1951 UNREACHABLE();
1952 break; 1952 break;
1953 } 1953 }
1954 } 1954 }
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
3849 Register temp2 = ToRegister(instr->temp2()); 3849 Register temp2 = ToRegister(instr->temp2());
3850 3850
3851 MathExpGenerator::EmitMathExp( 3851 MathExpGenerator::EmitMathExp(
3852 masm(), input, result, double_scratch1, double_scratch2, 3852 masm(), input, result, double_scratch1, double_scratch2,
3853 temp1, temp2, scratch0()); 3853 temp1, temp2, scratch0());
3854 } 3854 }
3855 3855
3856 3856
3857 void LCodeGen::DoMathLog(LMathLog* instr) { 3857 void LCodeGen::DoMathLog(LMathLog* instr) {
3858 __ PrepareCallCFunction(0, 1, scratch0()); 3858 __ PrepareCallCFunction(0, 1, scratch0());
3859 __ SetCallCDoubleArguments(ToDoubleRegister(instr->value())); 3859 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3860 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), 3860 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
3861 0, 1); 3861 0, 1);
3862 __ GetCFunctionDoubleResult(ToDoubleRegister(instr->result())); 3862 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3863 } 3863 }
3864 3864
3865 3865
3866 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { 3866 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
3867 ASSERT(ToRegister(instr->context()).is(cp)); 3867 ASSERT(ToRegister(instr->context()).is(cp));
3868 ASSERT(ToRegister(instr->function()).is(a1)); 3868 ASSERT(ToRegister(instr->function()).is(a1));
3869 ASSERT(instr->HasPointerMap()); 3869 ASSERT(instr->HasPointerMap());
3870 3870
3871 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); 3871 Handle<JSFunction> known_function = instr->hydrogen()->known_function();
3872 if (known_function.is_null()) { 3872 if (known_function.is_null()) {
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
5806 __ Subu(scratch, result, scratch); 5806 __ Subu(scratch, result, scratch);
5807 __ lw(result, FieldMemOperand(scratch, 5807 __ lw(result, FieldMemOperand(scratch,
5808 FixedArray::kHeaderSize - kPointerSize)); 5808 FixedArray::kHeaderSize - kPointerSize));
5809 __ bind(&done); 5809 __ bind(&done);
5810 } 5810 }
5811 5811
5812 5812
5813 #undef __ 5813 #undef __
5814 5814
5815 } } // namespace v8::internal 5815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698