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

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

Issue 391051: Allow a platform to indicate that some CPU features are always... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 27 matching lines...) Expand all
38 38
39 #include "arm/assembler-arm-inl.h" 39 #include "arm/assembler-arm-inl.h"
40 #include "serialize.h" 40 #include "serialize.h"
41 41
42 namespace v8 { 42 namespace v8 {
43 namespace internal { 43 namespace internal {
44 44
45 // Safe default is no features. 45 // Safe default is no features.
46 unsigned CpuFeatures::supported_ = 0; 46 unsigned CpuFeatures::supported_ = 0;
47 unsigned CpuFeatures::enabled_ = 0; 47 unsigned CpuFeatures::enabled_ = 0;
48 unsigned CpuFeatures::found_by_runtime_probing_ = 0;
48 49
49 void CpuFeatures::Probe() { 50 void CpuFeatures::Probe() {
50 // If the compiler is allowed to use vfp then we can use vfp too in our 51 // If the compiler is allowed to use vfp then we can use vfp too in our
51 // code generation. 52 // code generation.
52 #if !defined(__arm__) || (defined(__VFP_FP__) && !defined(__SOFTFP__)) 53 #if !defined(__arm__)
53 // The supported flags for VFP are set to true for the following 54 // For the simulator=arm build, always use VFP since the arm simulator has
54 // conditions, even without runtime detection of VFP: 55 // VFP support.
55 // (1) For the simulator=arm build, always use VFP since
56 // the arm simulator has VFP support.
57 // (2) If V8 is being compiled with GCC with the vfp option turned on,
58 // always use VFP since the build system assumes that V8 will run on
59 // a platform that has VFP hardware.
60 supported_ |= 1u << VFP3; 56 supported_ |= 1u << VFP3;
61 #else 57 #else
62 if (Serializer::enabled()) return; // No features if we might serialize. 58 if (Serializer::enabled()) {
59 supported_ |= OS::CpuFeaturesImpliedByPlatform();
60 return; // No features if we might serialize.
61 }
63 62
64 if (OS::ArmCpuHasFeature(OS::VFP)) { 63 if (OS::ArmCpuHasFeature(VFP3)) {
65 // This implementation also sets the VFP flags if 64 // This implementation also sets the VFP flags if
66 // runtime detection of VFP returns true. 65 // runtime detection of VFP returns true.
67 supported_ |= 1u << VFP3; 66 supported_ |= 1u << VFP3;
67 found_by_runtime_probing_ |= 1u << VFP3;
68 } 68 }
69 #endif 69 #endif
70 } 70 }
71 71
72
72 // ----------------------------------------------------------------------------- 73 // -----------------------------------------------------------------------------
73 // Implementation of Register and CRegister 74 // Implementation of Register and CRegister
74 75
75 Register no_reg = { -1 }; 76 Register no_reg = { -1 };
76 77
77 Register r0 = { 0 }; 78 Register r0 = { 0 };
78 Register r1 = { 1 }; 79 Register r1 = { 1 };
79 Register r2 = { 2 }; 80 Register r2 = { 2 };
80 Register r3 = { 3 }; 81 Register r3 = { 3 };
81 Register r4 = { 4 }; 82 Register r4 = { 4 };
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 return false; 599 return false;
599 } 600 }
600 601
601 602
602 // We have to use the temporary register for things that can be relocated even 603 // We have to use the temporary register for things that can be relocated even
603 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction 604 // if they can be encoded in the ARM's 12 bits of immediate-offset instruction
604 // space. There is no guarantee that the relocated location can be similarly 605 // space. There is no guarantee that the relocated location can be similarly
605 // encoded. 606 // encoded.
606 static bool MustUseIp(RelocInfo::Mode rmode) { 607 static bool MustUseIp(RelocInfo::Mode rmode) {
607 if (rmode == RelocInfo::EXTERNAL_REFERENCE) { 608 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
609 #ifdef DEBUG
610 if (!Serializer::enabled()) {
611 Serializer::TooLateToEnableNow();
612 }
613 #endif
608 return Serializer::enabled(); 614 return Serializer::enabled();
609 } else if (rmode == RelocInfo::NONE) { 615 } else if (rmode == RelocInfo::NONE) {
610 return false; 616 return false;
611 } 617 }
612 return true; 618 return true;
613 } 619 }
614 620
615 621
616 void Assembler::addrmod1(Instr instr, 622 void Assembler::addrmod1(Instr instr,
617 Register rn, 623 Register rn,
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1362
1357 1363
1358 void Assembler::stc2(Coprocessor coproc, 1364 void Assembler::stc2(Coprocessor coproc,
1359 CRegister crd, 1365 CRegister crd,
1360 Register rn, 1366 Register rn,
1361 int option, 1367 int option,
1362 LFlag l) { // v5 and above 1368 LFlag l) { // v5 and above
1363 stc(coproc, crd, rn, option, l, static_cast<Condition>(nv)); 1369 stc(coproc, crd, rn, option, l, static_cast<Condition>(nv));
1364 } 1370 }
1365 1371
1372
1366 // Support for VFP. 1373 // Support for VFP.
1367 void Assembler::fmdrr(const Register dst, 1374 void Assembler::fmdrr(const Register dst,
1368 const Register src1, 1375 const Register src1,
1369 const Register src2, 1376 const Register src2,
1370 const SBit s, 1377 const SBit s,
1371 const Condition cond) { 1378 const Condition cond) {
1372 // Dm = <Rt,Rt2>. 1379 // Dm = <Rt,Rt2>.
1373 // Instruction details available in ARM DDI 0406A, A8-646. 1380 // Instruction details available in ARM DDI 0406A, A8-646.
1374 // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) | 1381 // cond(31-28) | 1100(27-24)| 010(23-21) | op=0(20) | Rt2(19-16) |
1375 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm 1382 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm
1376 1383 ASSERT(CpuFeatures::IsEnabled(VFP3));
1377 ASSERT(!src1.is(pc) && !src2.is(pc)); 1384 ASSERT(!src1.is(pc) && !src2.is(pc));
1378 emit(cond | 0xC*B24 | B22 | src2.code()*B16 | 1385 emit(cond | 0xC*B24 | B22 | src2.code()*B16 |
1379 src1.code()*B12 | 0xB*B8 | B4 | dst.code()); 1386 src1.code()*B12 | 0xB*B8 | B4 | dst.code());
1380 } 1387 }
1381 1388
1382 1389
1383 void Assembler::fmrrd(const Register dst1, 1390 void Assembler::fmrrd(const Register dst1,
1384 const Register dst2, 1391 const Register dst2,
1385 const Register src, 1392 const Register src,
1386 const SBit s, 1393 const SBit s,
1387 const Condition cond) { 1394 const Condition cond) {
1388 // <Rt,Rt2> = Dm. 1395 // <Rt,Rt2> = Dm.
1389 // Instruction details available in ARM DDI 0406A, A8-646. 1396 // Instruction details available in ARM DDI 0406A, A8-646.
1390 // cond(31-28) | 1100(27-24)| 010(23-21) | op=1(20) | Rt2(19-16) | 1397 // cond(31-28) | 1100(27-24)| 010(23-21) | op=1(20) | Rt2(19-16) |
1391 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm 1398 // Rt(15-12) | 1011(11-8) | 00(7-6) | M(5) | 1(4) | Vm
1392 1399 ASSERT(CpuFeatures::IsEnabled(VFP3));
1393 ASSERT(!dst1.is(pc) && !dst2.is(pc)); 1400 ASSERT(!dst1.is(pc) && !dst2.is(pc));
1394 emit(cond | 0xC*B24 | B22 | B20 | dst2.code()*B16 | 1401 emit(cond | 0xC*B24 | B22 | B20 | dst2.code()*B16 |
1395 dst1.code()*B12 | 0xB*B8 | B4 | src.code()); 1402 dst1.code()*B12 | 0xB*B8 | B4 | src.code());
1396 } 1403 }
1397 1404
1398 1405
1399 void Assembler::fmsr(const Register dst, 1406 void Assembler::fmsr(const Register dst,
1400 const Register src, 1407 const Register src,
1401 const SBit s, 1408 const SBit s,
1402 const Condition cond) { 1409 const Condition cond) {
1403 // Sn = Rt. 1410 // Sn = Rt.
1404 // Instruction details available in ARM DDI 0406A, A8-642. 1411 // Instruction details available in ARM DDI 0406A, A8-642.
1405 // cond(31-28) | 1110(27-24)| 000(23-21) | op=0(20) | Vn(19-16) | 1412 // cond(31-28) | 1110(27-24)| 000(23-21) | op=0(20) | Vn(19-16) |
1406 // Rt(15-12) | 1010(11-8) | N(7)=0 | 00(6-5) | 1(4) | 0000(3-0) 1413 // Rt(15-12) | 1010(11-8) | N(7)=0 | 00(6-5) | 1(4) | 0000(3-0)
1407 1414 ASSERT(CpuFeatures::IsEnabled(VFP3));
1408 ASSERT(!src.is(pc)); 1415 ASSERT(!src.is(pc));
1409 emit(cond | 0xE*B24 | (dst.code() >> 1)*B16 | 1416 emit(cond | 0xE*B24 | (dst.code() >> 1)*B16 |
1410 src.code()*B12 | 0xA*B8 | (0x1 & dst.code())*B7 | B4); 1417 src.code()*B12 | 0xA*B8 | (0x1 & dst.code())*B7 | B4);
1411 } 1418 }
1412 1419
1413 1420
1414 void Assembler::fmrs(const Register dst, 1421 void Assembler::fmrs(const Register dst,
1415 const Register src, 1422 const Register src,
1416 const SBit s, 1423 const SBit s,
1417 const Condition cond) { 1424 const Condition cond) {
1418 // Rt = Sn. 1425 // Rt = Sn.
1419 // Instruction details available in ARM DDI 0406A, A8-642. 1426 // Instruction details available in ARM DDI 0406A, A8-642.
1420 // cond(31-28) | 1110(27-24)| 000(23-21) | op=1(20) | Vn(19-16) | 1427 // cond(31-28) | 1110(27-24)| 000(23-21) | op=1(20) | Vn(19-16) |
1421 // Rt(15-12) | 1010(11-8) | N(7)=0 | 00(6-5) | 1(4) | 0000(3-0) 1428 // Rt(15-12) | 1010(11-8) | N(7)=0 | 00(6-5) | 1(4) | 0000(3-0)
1422 1429 ASSERT(CpuFeatures::IsEnabled(VFP3));
1423 ASSERT(!dst.is(pc)); 1430 ASSERT(!dst.is(pc));
1424 emit(cond | 0xE*B24 | B20 | (src.code() >> 1)*B16 | 1431 emit(cond | 0xE*B24 | B20 | (src.code() >> 1)*B16 |
1425 dst.code()*B12 | 0xA*B8 | (0x1 & src.code())*B7 | B4); 1432 dst.code()*B12 | 0xA*B8 | (0x1 & src.code())*B7 | B4);
1426 } 1433 }
1427 1434
1428 1435
1429 void Assembler::fsitod(const Register dst, 1436 void Assembler::fsitod(const Register dst,
1430 const Register src, 1437 const Register src,
1431 const SBit s, 1438 const SBit s,
1432 const Condition cond) { 1439 const Condition cond) {
1433 // Dd = Sm (integer in Sm converted to IEEE 64-bit doubles in Dd). 1440 // Dd = Sm (integer in Sm converted to IEEE 64-bit doubles in Dd).
1434 // Instruction details available in ARM DDI 0406A, A8-576. 1441 // Instruction details available in ARM DDI 0406A, A8-576.
1435 // cond(31-28) | 11101(27-23)| D=?(22) | 11(21-20) | 1(19) |opc2=000(18-16) | 1442 // cond(31-28) | 11101(27-23)| D=?(22) | 11(21-20) | 1(19) |opc2=000(18-16) |
1436 // Vd(15-12) | 101(11-9) | sz(8)=1 | op(7)=1 | 1(6) | M=?(5) | 0(4) | Vm(3-0) 1443 // Vd(15-12) | 101(11-9) | sz(8)=1 | op(7)=1 | 1(6) | M=?(5) | 0(4) | Vm(3-0)
1437 1444 ASSERT(CpuFeatures::IsEnabled(VFP3));
1438 emit(cond | 0xE*B24 | B23 | 0x3*B20 | B19 | 1445 emit(cond | 0xE*B24 | B23 | 0x3*B20 | B19 |
1439 dst.code()*B12 | 0x5*B9 | B8 | B7 | B6 | 1446 dst.code()*B12 | 0x5*B9 | B8 | B7 | B6 |
1440 (0x1 & src.code())*B5 | (src.code() >> 1)); 1447 (0x1 & src.code())*B5 | (src.code() >> 1));
1441 } 1448 }
1442 1449
1443 1450
1444 void Assembler::ftosid(const Register dst, 1451 void Assembler::ftosid(const Register dst,
1445 const Register src, 1452 const Register src,
1446 const SBit s, 1453 const SBit s,
1447 const Condition cond) { 1454 const Condition cond) {
1448 // Sd = Dm (IEEE 64-bit doubles in Dm converted to 32 bit integer in Sd). 1455 // Sd = Dm (IEEE 64-bit doubles in Dm converted to 32 bit integer in Sd).
1449 // Instruction details available in ARM DDI 0406A, A8-576. 1456 // Instruction details available in ARM DDI 0406A, A8-576.
1450 // cond(31-28) | 11101(27-23)| D=?(22) | 11(21-20) | 1(19) | opc2=101(18-16)| 1457 // cond(31-28) | 11101(27-23)| D=?(22) | 11(21-20) | 1(19) | opc2=101(18-16)|
1451 // Vd(15-12) | 101(11-9) | sz(8)=1 | op(7)=? | 1(6) | M=?(5) | 0(4) | Vm(3-0) 1458 // Vd(15-12) | 101(11-9) | sz(8)=1 | op(7)=? | 1(6) | M=?(5) | 0(4) | Vm(3-0)
1452 1459 ASSERT(CpuFeatures::IsEnabled(VFP3));
1453 emit(cond | 0xE*B24 | B23 |(0x1 & dst.code())*B22 | 1460 emit(cond | 0xE*B24 | B23 |(0x1 & dst.code())*B22 |
1454 0x3*B20 | B19 | 0x5*B16 | (dst.code() >> 1)*B12 | 1461 0x3*B20 | B19 | 0x5*B16 | (dst.code() >> 1)*B12 |
1455 0x5*B9 | B8 | B7 | B6 | src.code()); 1462 0x5*B9 | B8 | B7 | B6 | src.code());
1456 } 1463 }
1457 1464
1458 1465
1459 void Assembler::faddd(const Register dst, 1466 void Assembler::faddd(const Register dst,
1460 const Register src1, 1467 const Register src1,
1461 const Register src2, 1468 const Register src2,
1462 const SBit s, 1469 const SBit s,
1463 const Condition cond) { 1470 const Condition cond) {
1464 // Dd = faddd(Dn, Dm) double precision floating point addition. 1471 // Dd = faddd(Dn, Dm) double precision floating point addition.
1465 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 1472 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
1466 // Instruction details available in ARM DDI 0406A, A8-536. 1473 // Instruction details available in ARM DDI 0406A, A8-536.
1467 // cond(31-28) | 11100(27-23)| D=?(22) | 11(21-20) | Vn(19-16) | 1474 // cond(31-28) | 11100(27-23)| D=?(22) | 11(21-20) | Vn(19-16) |
1468 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 0(6) | M=?(5) | 0(4) | Vm(3-0) 1475 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 0(6) | M=?(5) | 0(4) | Vm(3-0)
1469 1476 ASSERT(CpuFeatures::IsEnabled(VFP3));
1470 emit(cond | 0xE*B24 | 0x3*B20 | src1.code()*B16 | 1477 emit(cond | 0xE*B24 | 0x3*B20 | src1.code()*B16 |
1471 dst.code()*B12 | 0x5*B9 | B8 | src2.code()); 1478 dst.code()*B12 | 0x5*B9 | B8 | src2.code());
1472 } 1479 }
1473 1480
1474 1481
1475 void Assembler::fsubd(const Register dst, 1482 void Assembler::fsubd(const Register dst,
1476 const Register src1, 1483 const Register src1,
1477 const Register src2, 1484 const Register src2,
1478 const SBit s, 1485 const SBit s,
1479 const Condition cond) { 1486 const Condition cond) {
1480 // Dd = fsubd(Dn, Dm) double precision floating point subtraction. 1487 // Dd = fsubd(Dn, Dm) double precision floating point subtraction.
1481 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 1488 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
1482 // Instruction details available in ARM DDI 0406A, A8-784. 1489 // Instruction details available in ARM DDI 0406A, A8-784.
1483 // cond(31-28) | 11100(27-23)| D=?(22) | 11(21-20) | Vn(19-16) | 1490 // cond(31-28) | 11100(27-23)| D=?(22) | 11(21-20) | Vn(19-16) |
1484 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 1(6) | M=?(5) | 0(4) | Vm(3-0) 1491 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 1(6) | M=?(5) | 0(4) | Vm(3-0)
1485 1492 ASSERT(CpuFeatures::IsEnabled(VFP3));
1486 emit(cond | 0xE*B24 | 0x3*B20 | src1.code()*B16 | 1493 emit(cond | 0xE*B24 | 0x3*B20 | src1.code()*B16 |
1487 dst.code()*B12 | 0x5*B9 | B8 | B6 | src2.code()); 1494 dst.code()*B12 | 0x5*B9 | B8 | B6 | src2.code());
1488 } 1495 }
1489 1496
1490 1497
1491 void Assembler::fmuld(const Register dst, 1498 void Assembler::fmuld(const Register dst,
1492 const Register src1, 1499 const Register src1,
1493 const Register src2, 1500 const Register src2,
1494 const SBit s, 1501 const SBit s,
1495 const Condition cond) { 1502 const Condition cond) {
1496 // Dd = fmuld(Dn, Dm) double precision floating point multiplication. 1503 // Dd = fmuld(Dn, Dm) double precision floating point multiplication.
1497 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 1504 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
1498 // Instruction details available in ARM DDI 0406A, A8-784. 1505 // Instruction details available in ARM DDI 0406A, A8-784.
1499 // cond(31-28) | 11100(27-23)| D=?(22) | 10(21-20) | Vn(19-16) | 1506 // cond(31-28) | 11100(27-23)| D=?(22) | 10(21-20) | Vn(19-16) |
1500 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 0(6) | M=?(5) | 0(4) | Vm(3-0) 1507 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=0 | 0(6) | M=?(5) | 0(4) | Vm(3-0)
1501 1508 ASSERT(CpuFeatures::IsEnabled(VFP3));
1502 emit(cond | 0xE*B24 | 0x2*B20 | src1.code()*B16 | 1509 emit(cond | 0xE*B24 | 0x2*B20 | src1.code()*B16 |
1503 dst.code()*B12 | 0x5*B9 | B8 | src2.code()); 1510 dst.code()*B12 | 0x5*B9 | B8 | src2.code());
1504 } 1511 }
1505 1512
1506 1513
1507 void Assembler::fdivd(const Register dst, 1514 void Assembler::fdivd(const Register dst,
1508 const Register src1, 1515 const Register src1,
1509 const Register src2, 1516 const Register src2,
1510 const SBit s, 1517 const SBit s,
1511 const Condition cond) { 1518 const Condition cond) {
1512 // Dd = fdivd(Dn, Dm) double precision floating point division. 1519 // Dd = fdivd(Dn, Dm) double precision floating point division.
1513 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm. 1520 // Dd = D:Vd; Dm=M:Vm; Dn=N:Vm.
1514 // Instruction details available in ARM DDI 0406A, A8-584. 1521 // Instruction details available in ARM DDI 0406A, A8-584.
1515 // cond(31-28) | 11101(27-23)| D=?(22) | 00(21-20) | Vn(19-16) | 1522 // cond(31-28) | 11101(27-23)| D=?(22) | 00(21-20) | Vn(19-16) |
1516 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=? | 0(6) | M=?(5) | 0(4) | Vm(3-0) 1523 // Vd(15-12) | 101(11-9) | sz(8)=1 | N(7)=? | 0(6) | M=?(5) | 0(4) | Vm(3-0)
1517 1524 ASSERT(CpuFeatures::IsEnabled(VFP3));
1518 emit(cond | 0xE*B24 | B23 | src1.code()*B16 | 1525 emit(cond | 0xE*B24 | B23 | src1.code()*B16 |
1519 dst.code()*B12 | 0x5*B9 | B8 | src2.code()); 1526 dst.code()*B12 | 0x5*B9 | B8 | src2.code());
1520 } 1527 }
1521 1528
1522 1529
1523 void Assembler::fcmp(const Register src1, 1530 void Assembler::fcmp(const Register src1,
1524 const Register src2, 1531 const Register src2,
1525 const SBit s, 1532 const SBit s,
1526 const Condition cond) { 1533 const Condition cond) {
1527 // vcmp(Dd, Dm) double precision floating point comparison. 1534 // vcmp(Dd, Dm) double precision floating point comparison.
1528 // Instruction details available in ARM DDI 0406A, A8-570. 1535 // Instruction details available in ARM DDI 0406A, A8-570.
1529 // cond(31-28) | 11101 (27-23)| D=?(22) | 11 (21-20) | 0100 (19-16) | 1536 // cond(31-28) | 11101 (27-23)| D=?(22) | 11 (21-20) | 0100 (19-16) |
1530 // Vd(15-12) | 101(11-9) | sz(8)=1 | E(7)=? | 1(6) | M(5)=? | 0(4) | Vm(3-0) 1537 // Vd(15-12) | 101(11-9) | sz(8)=1 | E(7)=? | 1(6) | M(5)=? | 0(4) | Vm(3-0)
1531 1538 ASSERT(CpuFeatures::IsEnabled(VFP3));
1532 emit(cond | 0xE*B24 |B23 | 0x3*B20 | B18 | 1539 emit(cond | 0xE*B24 |B23 | 0x3*B20 | B18 |
1533 src1.code()*B12 | 0x5*B9 | B8 | B6 | src2.code()); 1540 src1.code()*B12 | 0x5*B9 | B8 | B6 | src2.code());
1534 } 1541 }
1535 1542
1536 1543
1537 void Assembler::vmrs(Register dst, Condition cond) { 1544 void Assembler::vmrs(Register dst, Condition cond) {
1538 // Instruction details available in ARM DDI 0406A, A8-652. 1545 // Instruction details available in ARM DDI 0406A, A8-652.
1539 // cond(31-28) | 1110 (27-24) | 1111(23-20)| 0001 (19-16) | 1546 // cond(31-28) | 1110 (27-24) | 1111(23-20)| 0001 (19-16) |
1540 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0) 1547 // Rt(15-12) | 1010 (11-8) | 0(7) | 00 (6-5) | 1(4) | 0000(3-0)
1541 1548 ASSERT(CpuFeatures::IsEnabled(VFP3));
1542 emit(cond | 0xE*B24 | 0xF*B20 | B16 | 1549 emit(cond | 0xE*B24 | 0xF*B20 | B16 |
1543 dst.code()*B12 | 0xA*B8 | B4); 1550 dst.code()*B12 | 0xA*B8 | B4);
1544 } 1551 }
1545 1552
1546 1553
1547 // Pseudo instructions 1554 // Pseudo instructions
1548 void Assembler::lea(Register dst, 1555 void Assembler::lea(Register dst,
1549 const MemOperand& x, 1556 const MemOperand& x,
1550 SBit s, 1557 SBit s,
1551 Condition cond) { 1558 Condition cond) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 // these modes do not need an entry in the constant pool 1703 // these modes do not need an entry in the constant pool
1697 } else { 1704 } else {
1698 ASSERT(num_prinfo_ < kMaxNumPRInfo); 1705 ASSERT(num_prinfo_ < kMaxNumPRInfo);
1699 prinfo_[num_prinfo_++] = rinfo; 1706 prinfo_[num_prinfo_++] = rinfo;
1700 // Make sure the constant pool is not emitted in place of the next 1707 // Make sure the constant pool is not emitted in place of the next
1701 // instruction for which we just recorded relocation info 1708 // instruction for which we just recorded relocation info
1702 BlockConstPoolBefore(pc_offset() + kInstrSize); 1709 BlockConstPoolBefore(pc_offset() + kInstrSize);
1703 } 1710 }
1704 if (rinfo.rmode() != RelocInfo::NONE) { 1711 if (rinfo.rmode() != RelocInfo::NONE) {
1705 // Don't record external references unless the heap will be serialized. 1712 // Don't record external references unless the heap will be serialized.
1706 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 1713 if (rmode == RelocInfo::EXTERNAL_REFERENCE) {
1707 !Serializer::enabled() && 1714 #ifdef DEBUG
1708 !FLAG_debug_code) { 1715 if (!Serializer::enabled()) {
1709 return; 1716 Serializer::TooLateToEnableNow();
1717 }
1718 #endif
1719 if (!Serializer::enabled() && !FLAG_debug_code) {
1720 return;
1721 }
1710 } 1722 }
1711 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here 1723 ASSERT(buffer_space() >= kMaxRelocSize); // too late to grow buffer here
1712 reloc_info_writer.Write(&rinfo); 1724 reloc_info_writer.Write(&rinfo);
1713 } 1725 }
1714 } 1726 }
1715 1727
1716 1728
1717 void Assembler::CheckConstPool(bool force_emit, bool require_jump) { 1729 void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
1718 // Calculate the offset of the next check. It will be overwritten 1730 // Calculate the offset of the next check. It will be overwritten
1719 // when a const pool is generated or when const pools are being 1731 // when a const pool is generated or when const pools are being
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1810 bind(&after_pool); 1822 bind(&after_pool);
1811 } 1823 }
1812 1824
1813 // Since a constant pool was just emitted, move the check offset forward by 1825 // Since a constant pool was just emitted, move the check offset forward by
1814 // the standard interval. 1826 // the standard interval.
1815 next_buffer_check_ = pc_offset() + kCheckConstInterval; 1827 next_buffer_check_ = pc_offset() + kCheckConstInterval;
1816 } 1828 }
1817 1829
1818 1830
1819 } } // namespace v8::internal 1831 } } // namespace v8::internal
OLDNEW
« src/arm/assembler-arm.h ('K') | « src/arm/assembler-arm.h ('k') | src/arm/codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698