Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/test/Driver/print-supported-extensions-riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@
// CHECK-NEXT: xqcics 0.2 'Xqcics' (Qualcomm uC Conditional Select Extension)
// CHECK-NEXT: xqcicsr 0.2 'Xqcicsr' (Qualcomm uC CSR Extension)
// CHECK-NEXT: xqciint 0.2 'Xqciint' (Qualcomm uC Interrupts Extension)
// CHECK-NEXT: xqcilia 0.2 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
// CHECK-NEXT: xqcilo 0.2 'Xqcilo' (Qualcomm uC Large Offset Load Store Extension)
// CHECK-NEXT: xqcilsm 0.2 'Xqcilsm' (Qualcomm uC Load Store Multiple Extension)
// CHECK-NEXT: xqcisls 0.2 'Xqcisls' (Qualcomm uC Scaled Load Store Extension)
Expand Down
3 changes: 3 additions & 0 deletions llvm/docs/RISCVUsage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ The current vendor extensions supported are:
``experimental-Xqciint``
LLVM implements `version 0.2 of the Qualcomm uC Interrupts extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.

``experimental-Xqcilia``
LLVM implements `version 0.2 of the Qualcomm uC Large Immediate Arithmetic extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.

``experimental-Xqcilo``
LLVM implements `version 0.2 of the Qualcomm uC Large Offset Load Store extension specification <https://github.com/quic/riscv-unified-db/releases/latest>`__ by Qualcomm. All instructions are prefixed with `qc.` as described in the specification. These instructions are only available for riscv32.

Expand Down
3 changes: 3 additions & 0 deletions llvm/docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ Changes to the PowerPC Backend
Changes to the RISC-V Backend
-----------------------------

* Adds experimental assembler support for the Qualcomm uC 'Xqcilia` (Large Immediate Arithmetic)
extension.

Changes to the WebAssembly Backend
----------------------------------

Expand Down
13 changes: 13 additions & 0 deletions llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,15 @@ struct RISCVOperand final : public MCParsedAsmOperand {
isInt<26>(fixImmediateForRV32(Imm, isRV64Imm()));
}

bool isSImm32() const {
int64_t Imm;
RISCVMCExpr::VariantKind VK = RISCVMCExpr::VK_RISCV_None;
if (!isImm())
return false;
bool IsConstantImm = evaluateConstantImm(getImm(), Imm, VK);
return IsConstantImm && isInt<32>(Imm) && VK == RISCVMCExpr::VK_RISCV_None;
}

/// getStartLoc - Gets location of the first token of this operand
SMLoc getStartLoc() const override { return StartLoc; }
/// getEndLoc - Gets location of the last token of this operand
Expand Down Expand Up @@ -1665,6 +1674,10 @@ bool RISCVAsmParser::matchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
case Match_InvalidSImm26:
return generateImmOutOfRangeError(Operands, ErrorInfo, -(1 << 25),
(1 << 25) - 1);
case Match_InvalidSImm32:
return generateImmOutOfRangeError(Operands, ErrorInfo,
std::numeric_limits<int32_t>::min(),
std::numeric_limits<int32_t>::max());
case Match_InvalidRnumArg: {
return generateImmOutOfRangeError(Operands, ErrorInfo, 0, 10);
}
Expand Down
4 changes: 3 additions & 1 deletion llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,9 @@ DecodeStatus RISCVDisassembler::getInstruction48(MCInst &MI, uint64_t &Size,
TRY_TO_DECODE_FEATURE(
RISCV::FeatureVendorXqcilo, DecoderTableXqcilo48,
"Qualcomm uC Large Offset Load Store custom 48bit opcode table");

TRY_TO_DECODE_FEATURE(
RISCV::FeatureVendorXqcilia, DecoderTableXqcilia48,
"Qualcomm uC Large Immediate Arithmetic custom 48bit opcode table");
return MCDisassembler::Fail;
}

Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ enum OperandType : unsigned {
OPERAND_SIMM12,
OPERAND_SIMM12_LSB00000,
OPERAND_SIMM26,
OPERAND_SIMM32,
OPERAND_CLUI_IMM,
OPERAND_VTYPEI10,
OPERAND_VTYPEI11,
Expand Down
8 changes: 8 additions & 0 deletions llvm/lib/Target/RISCV/RISCVFeatures.td
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,14 @@ def HasVendorXqciint
AssemblerPredicate<(all_of FeatureVendorXqciint),
"'Xqciint' (Qualcomm uC Interrupts Extension)">;

def FeatureVendorXqcilia
: RISCVExperimentalExtension<0, 2, "Qualcomm uC Large Immediate Arithmetic Extension",
[FeatureStdExtZca]>;
def HasVendorXqcilia
: Predicate<"Subtarget->hasVendorXqcilia()">,
AssemblerPredicate<(all_of FeatureVendorXqcilia),
"'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)">;

def FeatureVendorXqcilo
: RISCVExperimentalExtension<0, 2, "Qualcomm uC Large Offset Load Store Extension",
[FeatureStdExtZca]>;
Expand Down
48 changes: 48 additions & 0 deletions llvm/lib/Target/RISCV/RISCVInstrInfoXqci.td
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ def uimm11 : RISCVUImmLeafOp<11>;

def simm26 : RISCVSImmLeafOp<26>;

// 32-bit Immediate, used by RV32 Instructions in 32-bit operations, so no
// sign-/zero-extension. This is represented internally as a signed 32-bit value.
def simm32 : RISCVOp<XLenVT> {
let ParserMatchClass = SImmAsmOperand<32, "">;
let EncoderMethod = "getImmOpValue";
let DecoderMethod = "decodeSImmOperand<32>";
let OperandType = "OPERAND_SIMM32";
let MCOperandPredicate = [{
int64_t Imm;
if (MCOp.evaluateAsConstantImm(Imm))
return isInt<32>(Imm);
return false;
}];
}

//===----------------------------------------------------------------------===//
// Instruction Formats
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -245,6 +260,25 @@ class QCIRVInstESStore<bits<3> funct3, bits<2> funct2, string opcodestr>
(ins GPRMem:$rs2, GPR:$rs1, simm26:$imm),
opcodestr, "$rs2, ${imm}(${rs1})">;

class QCIRVInstEAI<bits<3> funct3, bits<1> funct1, string opcodestr>
: RVInst48<(outs GPRNoX0:$rd_wb), (ins GPRNoX0:$rd, simm32:$imm),
opcodestr, "$rd, $imm", [], InstFormatOther> {
bits<5> rd;
bits<32> imm;

let Constraints = "$rd = $rd_wb";
let Inst{47-16} = imm{31-0};
let Inst{15} = funct1;
let Inst{14-12} = funct3;
let Inst{11-7} = rd;
let Inst{6-0} = 0b0011111;
}

class QCIRVInstEI<bits<3> funct3, bits<2> funct2, string opcodestr>
: QCIRVInstEIBase<funct3, funct2, (outs GPRNoX0:$rd),
(ins GPRNoX0:$rs1, simm26:$imm), opcodestr,
"$rd, $rs1, $imm">;

//===----------------------------------------------------------------------===//
// Instructions
//===----------------------------------------------------------------------===//
Expand Down Expand Up @@ -435,6 +469,20 @@ let Predicates = [HasVendorXqcilo, IsRV32], DecoderNamespace = "Xqcilo" in {
def QC_E_SW : QCIRVInstESStore<0b110, 0b11, "qc.e.sw">;
} // Predicates = [HasVendorXqcilo, IsRV32], DecoderNamespace = "Xqcilo"

let Predicates = [HasVendorXqcilia, IsRV32], DecoderNamespace = "Xqcilia" in {
let hasSideEffects = 0, mayLoad = 0, mayStore = 0 in {
def QC_E_XORAI : QCIRVInstEAI<0b001, 0b0, "qc.e.xorai">;
def QC_E_ORAI : QCIRVInstEAI<0b001, 0b1, "qc.e.orai" >;
def QC_E_ADDAI : QCIRVInstEAI<0b010, 0b0, "qc.e.addai">;
def QC_E_ANDAI : QCIRVInstEAI<0b010, 0b1, "qc.e.andai">;

def QC_E_XORI : QCIRVInstEI<0b011, 0b00, "qc.e.xori">;
def QC_E_ORI : QCIRVInstEI<0b011, 0b01, "qc.e.ori" >;
def QC_E_ADDI : QCIRVInstEI<0b011, 0b10, "qc.e.addi">;
def QC_E_ANDI : QCIRVInstEI<0b011, 0b11, "qc.e.andi">;
} // hasSideEffects = 0, mayLoad = 0, mayStore = 0
} // Predicates = [HasVendorXqcilia, IsRV32], DecoderNamespace = "Xqcilia"

//===----------------------------------------------------------------------===//
// Aliases
//===----------------------------------------------------------------------===//
Expand Down
5 changes: 3 additions & 2 deletions llvm/lib/TargetParser/RISCVISAInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,8 +742,9 @@ Error RISCVISAInfo::checkDependency() {
bool HasZvl = MinVLen != 0;
bool HasZcmt = Exts.count("zcmt") != 0;
static constexpr StringLiteral XqciExts[] = {
{"xqcia"}, {"xqciac"}, {"xqcicli"}, {"xqcicm"}, {"xqcics"},
{"xqcicsr"}, {"xqciint"}, {"xqcilo"}, {"xqcilsm"}, {"xqcisls"}};
{"xqcia"}, {"xqciac"}, {"xqcicli"}, {"xqcicm"},
{"xqcics"}, {"xqcicsr"}, {"xqciint"}, {"xqcilia"},
{"xqcilo"}, {"xqcilsm"}, {"xqcisls"}};

if (HasI && HasE)
return getIncompatibleError("i", "e");
Expand Down
2 changes: 2 additions & 0 deletions llvm/test/CodeGen/RISCV/attributes.ll
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcics %s -o - | FileCheck --check-prefix=RV32XQCICS %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcicsr %s -o - | FileCheck --check-prefix=RV32XQCICSR %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqciint %s -o - | FileCheck --check-prefix=RV32XQCIINT %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcilia %s -o - | FileCheck --check-prefix=RV32XQCILIA %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcilo %s -o - | FileCheck --check-prefix=RV32XQCILO %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcilsm %s -o - | FileCheck --check-prefix=RV32XQCILSM %s
; RUN: llc -mtriple=riscv32 -mattr=+experimental-xqcisls %s -o - | FileCheck --check-prefix=RV32XQCISLS %s
Expand Down Expand Up @@ -404,6 +405,7 @@
; RV32XQCICS: .attribute 5, "rv32i2p1_xqcics0p2"
; RV32XQCICSR: .attribute 5, "rv32i2p1_xqcicsr0p2"
; RV32XQCIINT: .attribute 5, "rv32i2p1_zca1p0_xqciint0p2"
; RV32XQCILIA: .attribute 5, "rv32i2p1_zca1p0_xqcilia0p2"
; RV32XQCILO: .attribute 5, "rv32i2p1_zca1p0_xqcilo0p2"
; RV32XQCILSM: .attribute 5, "rv32i2p1_xqcilsm0p2"
; RV32XQCISLS: .attribute 5, "rv32i2p1_xqcisls0p2"
Expand Down
117 changes: 117 additions & 0 deletions llvm/test/MC/RISCV/xqcilia-invalid.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Xqcilia - Qualcomm uC Large Immediate Arithmetic extension
# RUN: not llvm-mc -triple riscv32 -mattr=+experimental-xqcilia < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-PLUS,CHECK-IMM %s
# RUN: not llvm-mc -triple riscv32 -mattr=-experimental-xqcilia < %s 2>&1 \
# RUN: | FileCheck -check-prefixes=CHECK,CHECK-MINUS,CHECK-EXT %s

# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lenary I just noticed this error isn't worded well when the user didn't provide a register. Maybe we "operand must a GPR register excluding zero (x0)" would be better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the reasons I intend to work on the DiagnosticPredicate use in RISC-V, but I haven't yet got back to it.

AArch64, where they use diagnosticpredicates, they will give you guidance if you're a register, or say "invalid operand for instruction" if you give an immediate where only a register is allowed.

My work on this has slowed as we're doing our own release work, but I hope to get back to it.

# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
qc.e.addai 9, 33554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.addai x9

# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 2147483647]
qc.e.addai x9, 20485546494

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.addai x9, 33554432


# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
qc.e.addi x10, 9, 554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.addi x10, x9

# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
qc.e.addi x10, x9, 335544312

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.addi x10, x9, 554432


# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
qc.e.andai 9, 33554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.andai x9

# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 2147483647]
qc.e.andai x9, 20494437494

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.andai x9, 33554432


# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
qc.e.andi x10, 9, 554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.andi x10, x9

# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
qc.e.andi x10, x9, 335544312

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.andi x10, x9, 554432


# CHECK-PLUS: :[[@LINE+2]]:11: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:11: error: invalid operand for instruction
qc.e.orai 9, 33554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.orai x9

# CHECK-IMM: :[[@LINE+1]]:15: error: immediate must be an integer in the range [-2147483648, 2147483647]
qc.e.orai x9, 20494437494

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.orai x9, 33554432


# CHECK-PLUS: :[[@LINE+2]]:15: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:15: error: invalid operand for instruction
qc.e.ori x10, 9, 554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.ori x10, x9

# CHECK-IMM: :[[@LINE+1]]:19: error: immediate must be an integer in the range [-33554432, 33554431]
qc.e.ori x10, x9, 335544312

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.ori x10, x9, 554432



# CHECK-PLUS: :[[@LINE+2]]:12: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:12: error: invalid operand for instruction
qc.e.xorai 9, 33554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.xorai x9

# CHECK-IMM: :[[@LINE+1]]:16: error: immediate must be an integer in the range [-2147483648, 2147483647]
qc.e.xorai x9, 20494437494

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.xorai x9, 33554432


# CHECK-PLUS: :[[@LINE+2]]:16: error: register must be a GPR excluding zero (x0)
# CHECK-MINUS: :[[@LINE+1]]:16: error: invalid operand for instruction
qc.e.xori x10, 9, 554432

# CHECK: :[[@LINE+1]]:1: error: too few operands for instruction
qc.e.xori x10, x9

# CHECK-IMM: :[[@LINE+1]]:20: error: immediate must be an integer in the range [-33554432, 33554431]
qc.e.xori x10, x9, 335544312

# CHECK-EXT: :[[@LINE+1]]:1: error: instruction requires the following: 'Xqcilia' (Qualcomm uC Large Immediate Arithmetic Extension)
qc.e.xori x10, x9, 554432
82 changes: 82 additions & 0 deletions llvm/test/MC/RISCV/xqcilia-valid.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Xqcilia - Qualcomm uC Large Immediate Arithmetic extension
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcilia -riscv-no-aliases -show-encoding \
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcilia < %s \
# RUN: | llvm-objdump --mattr=+experimental-xqcilia -M no-aliases --no-print-imm-hex -d - \
# RUN: | FileCheck -check-prefix=CHECK-INST %s
# RUN: llvm-mc %s -triple=riscv32 -mattr=+experimental-xqcilia -show-encoding \
# RUN: | FileCheck -check-prefixes=CHECK-ENC,CHECK-INST %s
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+experimental-xqcilia < %s \
# RUN: | llvm-objdump --mattr=+experimental-xqcilia --no-print-imm-hex -d - \
# RUN: | FileCheck -check-prefix=CHECK-INST %s

# CHECK-INST: qc.e.addai s1, 2147483647
# CHECK-ENC: encoding: [0x9f,0x24,0xff,0xff,0xff,0x7f]
qc.e.addai x9, 2147483647

# CHECK-INST: qc.e.addai s1, -2147483648
# CHECK-ENC: encoding: [0x9f,0x24,0x00,0x00,0x00,0x80]
qc.e.addai x9, -2147483648


# CHECK-INST: qc.e.addi a0, s1, -33554432
# CHECK-ENC: encoding: [0x1f,0xb5,0x04,0x80,0x00,0x80]
qc.e.addi x10, x9, -33554432

# CHECK-INST: qc.e.addi a0, s1, 33554431
# CHECK-ENC: encoding: [0x1f,0xb5,0xf4,0xbf,0xff,0x7f]
qc.e.addi x10, x9, 33554431


# CHECK-INST: qc.e.andai s1, 2147483647
# CHECK-ENC: encoding: [0x9f,0xa4,0xff,0xff,0xff,0x7f]
qc.e.andai x9, 2147483647

# CHECK-INST: qc.e.andai s1, -2147483648
# CHECK-ENC: encoding: [0x9f,0xa4,0x00,0x00,0x00,0x80]
qc.e.andai x9, -2147483648


# CHECK-INST: qc.e.andi a0, s1, -33554432
# CHECK-ENC: encoding: [0x1f,0xb5,0x04,0xc0,0x00,0x80]
qc.e.andi x10, x9, -33554432

# CHECK-INST: qc.e.andi a0, s1, 33554431
# CHECK-ENC: encoding: [0x1f,0xb5,0xf4,0xff,0xff,0x7f]
qc.e.andi x10, x9, 33554431


# CHECK-INST: qc.e.orai s1, 2147483647
# CHECK-ENC: encoding: [0x9f,0x94,0xff,0xff,0xff,0x7f]
qc.e.orai x9, 2147483647

# CHECK-INST: qc.e.orai s1, -2147483648
# CHECK-ENC: encoding: [0x9f,0x94,0x00,0x00,0x00,0x80]
qc.e.orai x9, -2147483648


# CHECK-INST: qc.e.ori a0, s1, -33554432
# CHECK-ENC: encoding: [0x1f,0xb5,0x04,0x40,0x00,0x80]
qc.e.ori x10, x9, -33554432

# CHECK-INST: qc.e.ori a0, s1, 33554431
# CHECK-ENC: encoding: [0x1f,0xb5,0xf4,0x7f,0xff,0x7f]
qc.e.ori x10, x9, 33554431


# CHECK-INST: qc.e.xorai s1, 2147483647
# CHECK-ENC: encoding: [0x9f,0x14,0xff,0xff,0xff,0x7f]
qc.e.xorai x9, 2147483647

# CHECK-INST: qc.e.xorai s1, -2147483648
# CHECK-ENC: encoding: [0x9f,0x14,0x00,0x00,0x00,0x80]
qc.e.xorai x9, -2147483648


# CHECK-INST: qc.e.xori a0, s1, -33554432
# CHECK-ENC: encoding: [0x1f,0xb5,0x04,0x00,0x00,0x80]
qc.e.xori x10, x9, -33554432

# CHECK-INST: qc.e.xori a0, s1, 33554431
# CHECK-ENC: encoding: [0x1f,0xb5,0xf4,0x3f,0xff,0x7f]
qc.e.xori x10, x9, 33554431
Loading