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

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

Issue 6257003: ARM: Implement DoInteger32ToDouble stub. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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/arm/lithium-codegen-arm.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 2282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2293 2293
2294 void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) { 2294 void LCodeGen::DoMathAbs(LUnaryMathOperation* instr) {
2295 Abort("DoMathAbs unimplemented."); 2295 Abort("DoMathAbs unimplemented.");
2296 } 2296 }
2297 2297
2298 2298
2299 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { 2299 void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
2300 DoubleRegister input = ToDoubleRegister(instr->input()); 2300 DoubleRegister input = ToDoubleRegister(instr->input());
2301 Register result = ToRegister(instr->result()); 2301 Register result = ToRegister(instr->result());
2302 Register prev_fpscr = ToRegister(instr->temp()); 2302 Register prev_fpscr = ToRegister(instr->temp());
2303 SwVfpRegister single_scratch = single_scratch0(); 2303 SwVfpRegister single_scratch = double_scratch0().low();
2304 Register scratch = scratch0(); 2304 Register scratch = scratch0();
2305 2305
2306 // Set custom FPCSR: 2306 // Set custom FPCSR:
2307 // - Set rounding mode to "Round towards Minus Infinity". 2307 // - Set rounding mode to "Round towards Minus Infinity".
2308 // - Clear vfp cumulative exception flags. 2308 // - Clear vfp cumulative exception flags.
2309 // - Make sure Flush-to-zero mode control bit is unset. 2309 // - Make sure Flush-to-zero mode control bit is unset.
2310 __ vmrs(prev_fpscr); 2310 __ vmrs(prev_fpscr);
2311 __ bic(scratch, prev_fpscr, 2311 __ bic(scratch, prev_fpscr,
2312 Operand(kVFPExceptionMask | kVFPRoundingModeMask | kVFPFlushToZeroMask)); 2312 Operand(kVFPExceptionMask | kVFPRoundingModeMask | kVFPFlushToZeroMask));
2313 __ orr(scratch, scratch, Operand(kVFPRoundToMinusInfinityBits)); 2313 __ orr(scratch, scratch, Operand(kVFPRoundToMinusInfinityBits));
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 ASSERT(ToRegister(instr->object()).is(r2)); 2501 ASSERT(ToRegister(instr->object()).is(r2));
2502 ASSERT(ToRegister(instr->key()).is(r1)); 2502 ASSERT(ToRegister(instr->key()).is(r1));
2503 ASSERT(ToRegister(instr->value()).is(r0)); 2503 ASSERT(ToRegister(instr->value()).is(r0));
2504 2504
2505 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize)); 2505 Handle<Code> ic(Builtins::builtin(Builtins::KeyedStoreIC_Initialize));
2506 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2506 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2507 } 2507 }
2508 2508
2509 2509
2510 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { 2510 void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) {
2511 Abort("DoInteger32ToDouble unimplemented."); 2511 LOperand* input = instr->input();
2512 ASSERT(input->IsRegister() || input->IsStackSlot());
2513 LOperand* output = instr->result();
2514 ASSERT(output->IsDoubleRegister());
2515 SwVfpRegister single_scratch = double_scratch0().low();
2516 if (input->IsStackSlot()) {
2517 Register scratch = scratch0();
2518 __ ldr(scratch, ToMemOperand(input));
2519 __ vmov(single_scratch, scratch);
2520 } else {
2521 __ vmov(single_scratch, ToRegister(input));
2522 }
2523 __ vcvt_f64_s32(ToDoubleRegister(output), single_scratch);
2512 } 2524 }
2513 2525
2514 2526
2515 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 2527 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
2516 class DeferredNumberTagI: public LDeferredCode { 2528 class DeferredNumberTagI: public LDeferredCode {
2517 public: 2529 public:
2518 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) 2530 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
2519 : LDeferredCode(codegen), instr_(instr) { } 2531 : LDeferredCode(codegen), instr_(instr) { }
2520 virtual void Generate() { codegen()->DoDeferredNumberTagI(instr_); } 2532 virtual void Generate() { codegen()->DoDeferredNumberTagI(instr_); }
2521 private: 2533 private:
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 3191
3180 3192
3181 void LCodeGen::DoOsrEntry(LOsrEntry* instr) { 3193 void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
3182 Abort("DoOsrEntry unimplemented."); 3194 Abort("DoOsrEntry unimplemented.");
3183 } 3195 }
3184 3196
3185 3197
3186 #undef __ 3198 #undef __
3187 3199
3188 } } // namespace v8::internal 3200 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698