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

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

Issue 172533002: MIPS: Harmony: optimize Math.clz32. (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
Patch Set: Fixed nit. 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
« no previous file with comments | « no previous file | 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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 3778 matching lines...) Expand 10 before | Expand all | Expand 10 after
3789 3789
3790 void LCodeGen::DoMathLog(LMathLog* instr) { 3790 void LCodeGen::DoMathLog(LMathLog* instr) {
3791 __ PrepareCallCFunction(0, 1, scratch0()); 3791 __ PrepareCallCFunction(0, 1, scratch0());
3792 __ MovToFloatParameter(ToDoubleRegister(instr->value())); 3792 __ MovToFloatParameter(ToDoubleRegister(instr->value()));
3793 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), 3793 __ CallCFunction(ExternalReference::math_log_double_function(isolate()),
3794 0, 1); 3794 0, 1);
3795 __ MovFromFloatResult(ToDoubleRegister(instr->result())); 3795 __ MovFromFloatResult(ToDoubleRegister(instr->result()));
3796 } 3796 }
3797 3797
3798 3798
3799 void LCodeGen::DoMathClz32(LMathClz32* instr) {
3800 Register input = ToRegister(instr->value());
3801 Register result = ToRegister(instr->result());
3802 __ Clz(result, input);
3803 }
3804
3805
3799 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { 3806 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
3800 ASSERT(ToRegister(instr->context()).is(cp)); 3807 ASSERT(ToRegister(instr->context()).is(cp));
3801 ASSERT(ToRegister(instr->function()).is(a1)); 3808 ASSERT(ToRegister(instr->function()).is(a1));
3802 ASSERT(instr->HasPointerMap()); 3809 ASSERT(instr->HasPointerMap());
3803 3810
3804 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); 3811 Handle<JSFunction> known_function = instr->hydrogen()->known_function();
3805 if (known_function.is_null()) { 3812 if (known_function.is_null()) {
3806 LPointerMap* pointers = instr->pointer_map(); 3813 LPointerMap* pointers = instr->pointer_map();
3807 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); 3814 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
3808 ParameterCount count(instr->arity()); 3815 ParameterCount count(instr->arity());
(...skipping 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after
5735 __ Subu(scratch, result, scratch); 5742 __ Subu(scratch, result, scratch);
5736 __ lw(result, FieldMemOperand(scratch, 5743 __ lw(result, FieldMemOperand(scratch,
5737 FixedArray::kHeaderSize - kPointerSize)); 5744 FixedArray::kHeaderSize - kPointerSize));
5738 __ bind(&done); 5745 __ bind(&done);
5739 } 5746 }
5740 5747
5741 5748
5742 #undef __ 5749 #undef __
5743 5750
5744 } } // namespace v8::internal 5751 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698