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

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

Issue 2885002: ARM: Use the vsqrt instruction when available... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 5 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/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 // void Decoder::DecodeTypeVFP(Instr* instr) 1031 // void Decoder::DecodeTypeVFP(Instr* instr)
1032 // vmov: Sn = Rt 1032 // vmov: Sn = Rt
1033 // vmov: Rt = Sn 1033 // vmov: Rt = Sn
1034 // vcvt: Dd = Sm 1034 // vcvt: Dd = Sm
1035 // vcvt: Sd = Dm 1035 // vcvt: Sd = Dm
1036 // Dd = vadd(Dn, Dm) 1036 // Dd = vadd(Dn, Dm)
1037 // Dd = vsub(Dn, Dm) 1037 // Dd = vsub(Dn, Dm)
1038 // Dd = vmul(Dn, Dm) 1038 // Dd = vmul(Dn, Dm)
1039 // Dd = vdiv(Dn, Dm) 1039 // Dd = vdiv(Dn, Dm)
1040 // vcmp(Dd, Dm) 1040 // vcmp(Dd, Dm)
1041 // VMRS 1041 // vmrs
1042 // Dd = vsqrt(Dm)
1042 void Decoder::DecodeTypeVFP(Instr* instr) { 1043 void Decoder::DecodeTypeVFP(Instr* instr) {
1043 ASSERT((instr->TypeField() == 7) && (instr->Bit(24) == 0x0) ); 1044 ASSERT((instr->TypeField() == 7) && (instr->Bit(24) == 0x0) );
1044 ASSERT(instr->Bits(11, 9) == 0x5); 1045 ASSERT(instr->Bits(11, 9) == 0x5);
1045 1046
1046 if (instr->Bit(4) == 0) { 1047 if (instr->Bit(4) == 0) {
1047 if (instr->Opc1Field() == 0x7) { 1048 if (instr->Opc1Field() == 0x7) {
1048 // Other data processing instructions 1049 // Other data processing instructions
1049 if ((instr->Opc2Field() == 0x7) && (instr->Opc3Field() == 0x3)) { 1050 if ((instr->Opc2Field() == 0x7) && (instr->Opc3Field() == 0x3)) {
1050 DecodeVCVTBetweenDoubleAndSingle(instr); 1051 DecodeVCVTBetweenDoubleAndSingle(instr);
1051 } else if ((instr->Opc2Field() == 0x8) && (instr->Opc3Field() & 0x1)) { 1052 } else if ((instr->Opc2Field() == 0x8) && (instr->Opc3Field() & 0x1)) {
1052 DecodeVCVTBetweenFloatingPointAndInteger(instr); 1053 DecodeVCVTBetweenFloatingPointAndInteger(instr);
1053 } else if (((instr->Opc2Field() >> 1) == 0x6) && 1054 } else if (((instr->Opc2Field() >> 1) == 0x6) &&
1054 (instr->Opc3Field() & 0x1)) { 1055 (instr->Opc3Field() & 0x1)) {
1055 DecodeVCVTBetweenFloatingPointAndInteger(instr); 1056 DecodeVCVTBetweenFloatingPointAndInteger(instr);
1056 } else if (((instr->Opc2Field() == 0x4) || (instr->Opc2Field() == 0x5)) && 1057 } else if (((instr->Opc2Field() == 0x4) || (instr->Opc2Field() == 0x5)) &&
1057 (instr->Opc3Field() & 0x1)) { 1058 (instr->Opc3Field() & 0x1)) {
1058 DecodeVCMP(instr); 1059 DecodeVCMP(instr);
1060 } else if (((instr->Opc2Field() == 0x1)) && (instr->Opc3Field() == 0x3)) {
1061 Format(instr, "vsqrt.f64'cond 'Dd, 'Dm");
1059 } else { 1062 } else {
1060 Unknown(instr); // Not used by V8. 1063 Unknown(instr); // Not used by V8.
1061 } 1064 }
1062 } else if (instr->Opc1Field() == 0x3) { 1065 } else if (instr->Opc1Field() == 0x3) {
1063 if (instr->SzField() == 0x1) { 1066 if (instr->SzField() == 0x1) {
1064 if (instr->Opc3Field() & 0x1) { 1067 if (instr->Opc3Field() & 0x1) {
1065 Format(instr, "vsub.f64'cond 'Dd, 'Dn, 'Dm"); 1068 Format(instr, "vsub.f64'cond 'Dd, 'Dn, 'Dm");
1066 } else { 1069 } else {
1067 Format(instr, "vadd.f64'cond 'Dd, 'Dn, 'Dm"); 1070 Format(instr, "vadd.f64'cond 'Dd, 'Dn, 'Dm");
1068 } 1071 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1389 pc += d.InstructionDecode(buffer, pc); 1392 pc += d.InstructionDecode(buffer, pc);
1390 fprintf(f, "%p %08x %s\n", 1393 fprintf(f, "%p %08x %s\n",
1391 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); 1394 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start());
1392 } 1395 }
1393 } 1396 }
1394 1397
1395 1398
1396 } // namespace disasm 1399 } // namespace disasm
1397 1400
1398 #endif // V8_TARGET_ARCH_ARM 1401 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698