Lines Matching refs:this
2 // Use of this source code is governed by a BSD-style license that can be
1114 // On RISC-V we use this enum to abstract from conditional branch instructions.
1151 // for condition < 0, this will work as expected.
1376 uint16_t FirstHalfWord = *reinterpret_cast<const uint16_t*>(this);
1381 uint8_t FirstByte = *reinterpret_cast<const uint8_t*>(this);
1386 return (FLAG_riscv_c_extension && this->IsShortInstruction())
1393 if (FLAG_riscv_c_extension && this->IsShortInstruction()) {
1394 return 0x0000FFFF & (*reinterpret_cast<const ShortInstr*>(this));
1396 return *reinterpret_cast<const Instr*>(this);
1401 *reinterpret_cast<Instr*>(this) = value;
1465 return this->InstructionBits() & kBaseOpcodeMask;
1469 DCHECK(this->IsShortInstruction());
1470 return this->InstructionBits() & kRvcOpcodeMask;
1474 DCHECK(this->InstructionType() == InstructionBase::kRType ||
1475 this->InstructionType() == InstructionBase::kR4Type ||
1476 this->InstructionType() == InstructionBase::kIType ||
1477 this->InstructionType() == InstructionBase::kSType ||
1478 this->InstructionType() == InstructionBase::kBType ||
1479 this->InstructionType() == InstructionBase::kIType ||
1480 this->InstructionType() == InstructionBase::kVType);
1481 return this->Bits(kRs1Shift + kRs1Bits - 1, kRs1Shift);
1485 DCHECK(this->InstructionType() == InstructionBase::kRType ||
1486 this->InstructionType() == InstructionBase::kR4Type ||
1487 this->InstructionType() == InstructionBase::kSType ||
1488 this->InstructionType() == InstructionBase::kBType ||
1489 this->InstructionType() == InstructionBase::kIType ||
1490 this->InstructionType() == InstructionBase::kVType);
1491 return this->Bits(kRs2Shift + kRs2Bits - 1, kRs2Shift);
1495 DCHECK(this->InstructionType() == InstructionBase::kR4Type);
1496 return this->Bits(kRs3Shift + kRs3Bits - 1, kRs3Shift);
1500 DCHECK(this->InstructionType() == InstructionBase::kVType ||
1501 this->InstructionType() == InstructionBase::kIType ||
1502 this->InstructionType() == InstructionBase::kSType);
1503 return this->Bits(kVs1Shift + kVs1Bits - 1, kVs1Shift);
1507 DCHECK(this->InstructionType() == InstructionBase::kVType ||
1508 this->InstructionType() == InstructionBase::kIType ||
1509 this->InstructionType() == InstructionBase::kSType);
1510 return this->Bits(kVs2Shift + kVs2Bits - 1, kVs2Shift);
1514 DCHECK(this->InstructionType() == InstructionBase::kVType ||
1515 this->InstructionType() == InstructionBase::kIType ||
1516 this->InstructionType() == InstructionBase::kSType);
1517 return this->Bits(kVdShift + kVdBits - 1, kVdShift);
1521 DCHECK(this->InstructionType() == InstructionBase::kRType ||
1522 this->InstructionType() == InstructionBase::kR4Type ||
1523 this->InstructionType() == InstructionBase::kIType ||
1524 this->InstructionType() == InstructionBase::kSType ||
1525 this->InstructionType() == InstructionBase::kUType ||
1526 this->InstructionType() == InstructionBase::kJType ||
1527 this->InstructionType() == InstructionBase::kVType);
1528 return this->Bits(kRdShift + kRdBits - 1, kRdShift);
1532 DCHECK(this->IsShortInstruction());
1533 return this->Bits(kRvcRdShift + kRvcRdBits - 1, kRvcRdShift);
1536 inline int RvcRs1Value() const { return this->RvcRdValue(); }
1539 DCHECK(this->IsShortInstruction());
1540 return this->Bits(kRvcRs2Shift + kRvcRs2Bits - 1, kRvcRs2Shift);
1544 DCHECK(this->IsShortInstruction());
1545 return 0b1000 + this->Bits(kRvcRs1sShift + kRvcRs1sBits - 1, kRvcRs1sShift);
1549 DCHECK(this->IsShortInstruction());
1550 return 0b1000 + this->Bits(kRvcRs2sShift + kRvcRs2sBits - 1, kRvcRs2sShift);
1554 DCHECK(this->InstructionType() == InstructionBase::kRType);
1555 return this->Bits(kFunct7Shift + kFunct7Bits - 1, kFunct7Shift);
1559 DCHECK(this->InstructionType() == InstructionBase::kRType ||
1560 this->InstructionType() == InstructionBase::kIType ||
1561 this->InstructionType() == InstructionBase::kSType ||
1562 this->InstructionType() == InstructionBase::kBType);
1563 return this->Bits(kFunct3Shift + kFunct3Bits - 1, kFunct3Shift);
1567 DCHECK(this->InstructionType() == InstructionBase::kRType &&
1568 this->BaseOpcode() == OP_FP);
1569 return this->Bits(kFunct5Shift + kFunct5Bits - 1, kFunct5Shift);
1573 DCHECK(this->IsShortInstruction());
1574 return this->Bits(kRvcFunct6Shift + kRvcFunct6Bits - 1, kRvcFunct6Shift);
1578 DCHECK(this->IsShortInstruction());
1579 return this->Bits(kRvcFunct4Shift + kRvcFunct4Bits - 1, kRvcFunct4Shift);
1583 DCHECK(this->IsShortInstruction());
1584 return this->Bits(kRvcFunct3Shift + kRvcFunct3Bits - 1, kRvcFunct3Shift);
1588 DCHECK(this->IsShortInstruction());
1589 return this->Bits(kRvcFunct2Shift + kRvcFunct2Bits - 1, kRvcFunct2Shift);
1593 DCHECK(this->IsShortInstruction());
1594 return this->Bits(kRvcFunct2BShift + kRvcFunct2Bits - 1, kRvcFunct2BShift);
1598 DCHECK(this->InstructionType() == InstructionBase::kIType &&
1599 this->BaseOpcode() == SYSTEM);
1600 return (this->Bits(kCsrShift + kCsrBits - 1, kCsrShift));
1604 DCHECK((this->InstructionType() == InstructionBase::kRType ||
1605 this->InstructionType() == InstructionBase::kR4Type) &&
1606 this->BaseOpcode() == OP_FP);
1607 return this->Bits(kFunct3Shift + kFunct3Bits - 1, kFunct3Shift);
1611 DCHECK((this->InstructionType() == InstructionBase::kIType &&
1612 this->BaseOpcode() == MISC_MEM));
1614 return this->Bits(kPredOrderShift + kMemOrderBits - 1, kPredOrderShift);
1616 return this->Bits(kSuccOrderShift + kMemOrderBits - 1, kSuccOrderShift);
1621 DCHECK(this->InstructionType() == InstructionBase::kIType);
1622 int Value = this->Bits(kImm12Shift + kImm12Bits - 1, kImm12Shift);
1627 int32_t Value = this->Imm12Value() << 20 >> 20;
1632 DCHECK(this->InstructionType() == InstructionBase::kBType);
1635 uint32_t Bits = this->InstructionBits();
1642 DCHECK(this->InstructionType() == InstructionBase::kSType);
1645 uint32_t Bits = this->InstructionBits();
1651 DCHECK(this->InstructionType() == InstructionBase::kUType);
1654 int32_t Bits = this->InstructionBits();
1659 DCHECK(this->InstructionType() == InstructionBase::kJType);
1662 uint32_t Bits = this->InstructionBits();
1670 DCHECK((this->BaseOpcode() == OP || this->BaseOpcode() == OP_32 ||
1671 this->BaseOpcode() == OP_IMM || this->BaseOpcode() == OP_IMM_32) &&
1672 this->Funct3Value() == 0b101);
1673 return this->InstructionBits() & 0x40000000;
1678 DCHECK((this->InstructionBits() & kBaseOpcodeMask) == OP_IMM &&
1679 (this->Funct3Value() == 0b001 || this->Funct3Value() == 0b101));
1682 return this->Bits(kImm12Shift + 5, kImm12Shift);
1687 DCHECK((this->InstructionBits() & kBaseOpcodeMask) == OP_IMM_32 &&
1688 (this->Funct3Value() == 0b001 || this->Funct3Value() == 0b101));
1691 return this->Bits(kImm12Shift + 4, kImm12Shift);
1695 DCHECK(this->IsShortInstruction());
1698 uint32_t Bits = this->InstructionBits();
1704 DCHECK(this->IsShortInstruction());
1707 uint32_t Bits = this->InstructionBits();
1716 DCHECK(this->IsShortInstruction());
1719 uint32_t Bits = this->InstructionBits();
1727 DCHECK(this->IsShortInstruction());
1730 int32_t imm6 = this->RvcImm6Value();
1735 DCHECK(this->IsShortInstruction());
1738 uint32_t Bits = this->InstructionBits();
1745 DCHECK(this->IsShortInstruction());
1748 uint32_t Bits = this->InstructionBits();
1755 DCHECK(this->IsShortInstruction());
1758 uint32_t Bits = this->InstructionBits();
1764 DCHECK(this->IsShortInstruction());
1767 uint32_t Bits = this->InstructionBits();
1773 DCHECK(this->IsShortInstruction());
1776 uint32_t Bits = this->InstructionBits();
1783 DCHECK(this->IsShortInstruction());
1786 uint32_t Bits = this->InstructionBits();
1792 DCHECK(this->IsShortInstruction());
1795 uint32_t Bits = this->InstructionBits();
1804 DCHECK(this->IsShortInstruction());
1807 uint32_t Bits = this->InstructionBits();
1816 if ((this->InstructionBits() & kBaseOpcodeMask) != LOAD_FP &&
1817 (this->InstructionBits() & kBaseOpcodeMask) != STORE_FP)
1819 switch (this->InstructionBits() & (kRvvWidthMask | kRvvMewMask)) {
1852 if ((this->InstructionBits() &
1854 uint32_t Bits = this->InstructionBits();
1858 DCHECK_EQ(this->InstructionBits() &
1861 uint32_t Bits = this->InstructionBits();
1869 this->InstructionBits() & (kBaseOpcodeMask | kFunct3Mask | 0xC0000000),
1871 uint32_t Bits = this->InstructionBits();
1877 uint32_t zimm = this->Rvvzimm();
1883 uint32_t zimm = this->Rvvzimm();
1889 DCHECK(this->InstructionType() == InstructionBase::kVType ||
1890 this->InstructionType() == InstructionBase::kIType ||
1891 this->InstructionType() == InstructionBase::kSType);
1892 return this->Bits(kRvvVmShift + kRvvVmBits - 1, kRvvVmShift);
1896 uint32_t vsew = this->RvvVsew();
1909 uint32_t vlmul = this->RvvVlmul();
1925 DCHECK(this->InstructionType() == InstructionBase::kVType);
1926 return sext(this->Bits(kRvvImm5Shift + kRvvImm5Bits - 1, kRvvImm5Shift),
1931 DCHECK(this->InstructionType() == InstructionBase::kVType);
1932 uint32_t imm = this->Bits(kRvvImm5Shift + kRvvImm5Bits - 1, kRvvImm5Shift);
1937 inline bool AqValue() const { return this->Bits(kAqShift, kAqShift); }
1939 inline bool RlValue() const { return this->Bits(kRlShift, kRlShift); }
1980 return (this->InstructionBits() == kBreakInstr);