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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 6625084: ARM: Improved double to integer truncation.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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/macro-assembler-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 2449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 } 2460 }
2461 } 2461 }
2462 2462
2463 2463
2464 // void Simulator::DecodeTypeVFP(Instruction* instr) 2464 // void Simulator::DecodeTypeVFP(Instruction* instr)
2465 // The Following ARMv7 VFPv instructions are currently supported. 2465 // The Following ARMv7 VFPv instructions are currently supported.
2466 // vmov :Sn = Rt 2466 // vmov :Sn = Rt
2467 // vmov :Rt = Sn 2467 // vmov :Rt = Sn
2468 // vcvt: Dd = Sm 2468 // vcvt: Dd = Sm
2469 // vcvt: Sd = Dm 2469 // vcvt: Sd = Dm
2470 // Dd = vabs(Dm)
2471 // Dd = vneg(Dm)
2470 // Dd = vadd(Dn, Dm) 2472 // Dd = vadd(Dn, Dm)
2471 // Dd = vsub(Dn, Dm) 2473 // Dd = vsub(Dn, Dm)
2472 // Dd = vmul(Dn, Dm) 2474 // Dd = vmul(Dn, Dm)
2473 // Dd = vdiv(Dn, Dm) 2475 // Dd = vdiv(Dn, Dm)
2474 // vcmp(Dd, Dm) 2476 // vcmp(Dd, Dm)
2475 // vmrs 2477 // vmrs
2476 // Dd = vsqrt(Dm) 2478 // Dd = vsqrt(Dm)
2477 void Simulator::DecodeTypeVFP(Instruction* instr) { 2479 void Simulator::DecodeTypeVFP(Instruction* instr) {
2478 ASSERT((instr->TypeValue() == 7) && (instr->Bit(24) == 0x0) ); 2480 ASSERT((instr->TypeValue() == 7) && (instr->Bit(24) == 0x0) );
2479 ASSERT(instr->Bits(11, 9) == 0x5); 2481 ASSERT(instr->Bits(11, 9) == 0x5);
(...skipping 15 matching lines...) Expand all
2495 } else { 2497 } else {
2496 int m = instr->VFPMRegValue(kSinglePrecision); 2498 int m = instr->VFPMRegValue(kSinglePrecision);
2497 int d = instr->VFPDRegValue(kSinglePrecision); 2499 int d = instr->VFPDRegValue(kSinglePrecision);
2498 set_s_register_from_float(d, get_float_from_s_register(m)); 2500 set_s_register_from_float(d, get_float_from_s_register(m));
2499 } 2501 }
2500 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) { 2502 } else if ((instr->Opc2Value() == 0x0) && (instr->Opc3Value() == 0x3)) {
2501 // vabs 2503 // vabs
2502 double dm_value = get_double_from_d_register(vm); 2504 double dm_value = get_double_from_d_register(vm);
2503 double dd_value = fabs(dm_value); 2505 double dd_value = fabs(dm_value);
2504 set_d_register_from_double(vd, dd_value); 2506 set_d_register_from_double(vd, dd_value);
2507 } else if ((instr->Opc2Value() == 0x1) && (instr->Opc3Value() == 0x1)) {
2508 // vneg
2509 double dm_value = get_double_from_d_register(vm);
2510 double dd_value = -dm_value;
2511 set_d_register_from_double(vd, dd_value);
2505 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) { 2512 } else if ((instr->Opc2Value() == 0x7) && (instr->Opc3Value() == 0x3)) {
2506 DecodeVCVTBetweenDoubleAndSingle(instr); 2513 DecodeVCVTBetweenDoubleAndSingle(instr);
2507 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) { 2514 } else if ((instr->Opc2Value() == 0x8) && (instr->Opc3Value() & 0x1)) {
2508 DecodeVCVTBetweenFloatingPointAndInteger(instr); 2515 DecodeVCVTBetweenFloatingPointAndInteger(instr);
2509 } else if (((instr->Opc2Value() >> 1) == 0x6) && 2516 } else if (((instr->Opc2Value() >> 1) == 0x6) &&
2510 (instr->Opc3Value() & 0x1)) { 2517 (instr->Opc3Value() & 0x1)) {
2511 DecodeVCVTBetweenFloatingPointAndInteger(instr); 2518 DecodeVCVTBetweenFloatingPointAndInteger(instr);
2512 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) && 2519 } else if (((instr->Opc2Value() == 0x4) || (instr->Opc2Value() == 0x5)) &&
2513 (instr->Opc3Value() & 0x1)) { 2520 (instr->Opc3Value() & 0x1)) {
2514 DecodeVCMP(instr); 2521 DecodeVCMP(instr);
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
3156 uintptr_t address = *stack_slot; 3163 uintptr_t address = *stack_slot;
3157 set_register(sp, current_sp + sizeof(uintptr_t)); 3164 set_register(sp, current_sp + sizeof(uintptr_t));
3158 return address; 3165 return address;
3159 } 3166 }
3160 3167
3161 } } // namespace v8::internal 3168 } } // namespace v8::internal
3162 3169
3163 #endif // USE_SIMULATOR 3170 #endif // USE_SIMULATOR
3164 3171
3165 #endif // V8_TARGET_ARCH_ARM 3172 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | test/cctest/test-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698