[llvm] [LLVM][MC] Introduce `OrFail` variants of MCD ops (PR #138614)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 07:31:23 PDT 2025
================
@@ -10,24 +10,29 @@
#ifndef LLVM_MC_MCDECODEROPS_H
#define LLVM_MC_MCDECODEROPS_H
-namespace llvm {
+namespace llvm::MCD {
-namespace MCD {
// Disassembler state machine opcodes.
+// nts_t is either uint16_t or uint24_t based on whether large decoder table is
+// enabled.
enum DecoderOps {
- OPC_ExtractField = 1, // OPC_ExtractField(uleb128 Start, uint8_t Len)
- OPC_FilterValue, // OPC_FilterValue(uleb128 Val, uint16_t NumToSkip)
- OPC_CheckField, // OPC_CheckField(uleb128 Start, uint8_t Len,
- // uleb128 Val, uint16_t NumToSkip)
- OPC_CheckPredicate, // OPC_CheckPredicate(uleb128 PIdx, uint16_t NumToSkip)
- OPC_Decode, // OPC_Decode(uleb128 Opcode, uleb128 DIdx)
- OPC_TryDecode, // OPC_TryDecode(uleb128 Opcode, uleb128 DIdx,
- // uint16_t NumToSkip)
- OPC_SoftFail, // OPC_SoftFail(uleb128 PMask, uleb128 NMask)
- OPC_Fail // OPC_Fail()
+ OPC_ExtractField = 1, // OPC_ExtractField(uleb128 Start, uint8_t Len)
+ OPC_FilterValue, // OPC_FilterValue(uleb128 Val, nts_t NumToSkip)
+ OPC_FilterValueOrFail, // OPC_FilterValueOrFail(uleb128 Val)
+ OPC_CheckField, // OPC_CheckField(uleb128 Start, uint8_t Len,
+ // uleb128 Val, nts_t NumToSkip)
+ OPC_CheckFieldOrFail, // OPC_ChecFieldOrFail(uleb128 Start, uint8_t Len,
----------------
jurahul wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/138614
More information about the llvm-commits
mailing list