 {#enum xcore_op_type as XCoreOpType {underscoreToCase}
     deriving (Show, Eq, Bounded)#}
 
+-- | XCore registers
+{#enum xcore_reg as XCoreReg {underscoreToCase}
+    deriving (Show, Eq, Bounded)#}
+
 -- | memory access operands
 -- associated with 'XcoreOpMem' operand type
 data XCoreOpMemStruct = XCoreOpMemStruct

        t <- fromIntegral <$> {#get cs_xcore_op->type#} p
        let bP = plusPtr p 4
        case toEnum t of
          XcoreOpReg -> Reg <$> peek bP
          XcoreOpImm -> Imm <$> peek bP
          XcoreOpMem -> Mem <$> peek bP
          _ -> return Undefined

           then error "operands overflew 8 elements"
           else pokeArray (plusPtr p {#offsetof cs_xcore->operands#}) o

-- | XCore instructions
{#enum xcore_insn as XCoreInsn {underscoreToCase}
    deriving (Show, Eq, Bounded)#}
