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 3850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3861 | 3861 |
3862 void LCodeGen::DoMathLog(LMathLog* instr) { | 3862 void LCodeGen::DoMathLog(LMathLog* instr) { |
3863 __ PrepareCallCFunction(0, 1, scratch0()); | 3863 __ PrepareCallCFunction(0, 1, scratch0()); |
3864 __ MovToFloatParameter(ToDoubleRegister(instr->value())); | 3864 __ MovToFloatParameter(ToDoubleRegister(instr->value())); |
3865 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), | 3865 __ CallCFunction(ExternalReference::math_log_double_function(isolate()), |
3866 0, 1); | 3866 0, 1); |
3867 __ MovFromFloatResult(ToDoubleRegister(instr->result())); | 3867 __ MovFromFloatResult(ToDoubleRegister(instr->result())); |
3868 } | 3868 } |
3869 | 3869 |
3870 | 3870 |
| 3871 void LCodeGen::DoMathClz32(LMathClz32* instr) { |
| 3872 Register input = ToRegister(instr->value()); |
| 3873 Register result = ToRegister(instr->result()); |
| 3874 __ clz(result, input); |
| 3875 } |
| 3876 |
| 3877 |
3871 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { | 3878 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { |
3872 ASSERT(ToRegister(instr->context()).is(cp)); | 3879 ASSERT(ToRegister(instr->context()).is(cp)); |
3873 ASSERT(ToRegister(instr->function()).is(r1)); | 3880 ASSERT(ToRegister(instr->function()).is(r1)); |
3874 ASSERT(instr->HasPointerMap()); | 3881 ASSERT(instr->HasPointerMap()); |
3875 | 3882 |
3876 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); | 3883 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); |
3877 if (known_function.is_null()) { | 3884 if (known_function.is_null()) { |
3878 LPointerMap* pointers = instr->pointer_map(); | 3885 LPointerMap* pointers = instr->pointer_map(); |
3879 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 3886 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
3880 ParameterCount count(instr->arity()); | 3887 ParameterCount count(instr->arity()); |
(...skipping 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5735 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5742 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5736 __ ldr(result, FieldMemOperand(scratch, | 5743 __ ldr(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 |
OLD | NEW |