-- SPDX-License-Identifier: MIT
-- Copyright (C) 2018-present iced project and contributors

-- ⚠️This file was generated by GENERATOR!🦹‍♂️

---@meta
---@diagnostic disable unused-local

---`Register` enum info, see also `RegisterExt`
---
---@class RegisterInfo
local RegisterInfo = {}

---`Register` enum info, see also `RegisterExt`
---
---@param register integer #(A `Register` enum variant) Enum value
---@return RegisterInfo
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:number() == 5)
---```
function RegisterInfo.new(register) end

---Gets the register value passed into the constructor
---
---@return integer #A `Register` enum variant
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.EAX)
---assert(info:register() == Register.EAX)
---```
function RegisterInfo:register() end

---Gets the base register, eg. `AL`, `AX`, `EAX`, `RAX`, `MM0`, `XMM0`, `YMM0`, `ZMM0`, `ES`
---
---@return integer #A `Register` enum variant
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:base() == Register.ES)
---info = RegisterInfo.new(Register.RDX)
---assert(info:base() == Register.RAX)
---info = RegisterInfo.new(Register.XMM13)
---assert(info:base() == Register.XMM0)
---info = RegisterInfo.new(Register.YMM13)
---assert(info:base() == Register.YMM0)
---info = RegisterInfo.new(Register.ZMM13)
---assert(info:base() == Register.ZMM0)
---```
function RegisterInfo:base() end

---int: The register number (index) relative to `RegisterInfo.base()`, eg. 0-15, or 0-31, or if 8-bit GPR, 0-19
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:number() == 5)
---info = RegisterInfo.new(Register.RDX)
---assert(info:number() == 2)
---info = RegisterInfo.new(Register.XMM13)
---assert(info:number() == 13)
---info = RegisterInfo.new(Register.YMM13)
---assert(info:number() == 13)
---info = RegisterInfo.new(Register.ZMM13)
---assert(info:number() == 13)
---```
function RegisterInfo:number() end

---The full register that this one is a part of, eg. `CL`/`CH`/`CX`/`ECX`/`RCX` -> `RCX`, `XMM11`/`YMM11`/`ZMM11` -> `ZMM11`
---
---@return integer #A `Register` enum variant
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:full_register() == Register.GS)
---info = RegisterInfo.new(Register.BH)
---assert(info:full_register() == Register.RBX)
---info = RegisterInfo.new(Register.DX)
---assert(info:full_register() == Register.RDX)
---info = RegisterInfo.new(Register.ESP)
---assert(info:full_register() == Register.RSP)
---info = RegisterInfo.new(Register.RCX)
---assert(info:full_register() == Register.RCX)
---info = RegisterInfo.new(Register.XMM3)
---assert(info:full_register() == Register.ZMM3)
---info = RegisterInfo.new(Register.YMM3)
---assert(info:full_register() == Register.ZMM3)
---info = RegisterInfo.new(Register.ZMM3)
---assert(info:full_register() == Register.ZMM3)
---```
function RegisterInfo:full_register() end

---Gets the full register that this one is a part of, except if it's a GPR in which case the 32-bit register is returned,
---eg. `CL`/`CH`/`CX`/`ECX`/`RCX` -> `ECX`, `XMM11`/`YMM11`/`ZMM11` -> `ZMM11`
---
---@return integer #A `Register` enum variant
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:full_register32() == Register.GS)
---info = RegisterInfo.new(Register.BH)
---assert(info:full_register32() == Register.EBX)
---info = RegisterInfo.new(Register.DX)
---assert(info:full_register32() == Register.EDX)
---info = RegisterInfo.new(Register.ESP)
---assert(info:full_register32() == Register.ESP)
---info = RegisterInfo.new(Register.RCX)
---assert(info:full_register32() == Register.ECX)
---info = RegisterInfo.new(Register.XMM3)
---assert(info:full_register32() == Register.ZMM3)
---info = RegisterInfo.new(Register.YMM3)
---assert(info:full_register32() == Register.ZMM3)
---info = RegisterInfo.new(Register.ZMM3)
---assert(info:full_register32() == Register.ZMM3)
---```
function RegisterInfo:full_register32() end

---int: Size of the register in bytes
---
---# Examples
---
---```lua
---local Register = require("iced_x86.Register")
---local RegisterInfo = require("iced_x86.RegisterInfo")
---
---local info = RegisterInfo.new(Register.GS)
---assert(info:size() == 2)
---info = RegisterInfo.new(Register.BH)
---assert(info:size() == 1)
---info = RegisterInfo.new(Register.DX)
---assert(info:size() == 2)
---info = RegisterInfo.new(Register.ESP)
---assert(info:size() == 4)
---info = RegisterInfo.new(Register.RCX)
---assert(info:size() == 8)
---info = RegisterInfo.new(Register.XMM3)
---assert(info:size() == 16)
---info = RegisterInfo.new(Register.YMM3)
---assert(info:size() == 32)
---info = RegisterInfo.new(Register.ZMM3)
---assert(info:size() == 64)
---```
function RegisterInfo:size() end

return RegisterInfo
