#pragma once

// x86_64 and x86_32 register definitions
enum class x86_register
{
    invalid = 0,
    ah,
    al,
    ax,
    bh,
    bl,
    bp,
    bpl,
    bx,
    ch,
    cl,
    cs,
    cx,
    dh,
    di,
    dil,
    dl,
    ds,
    dx,
    eax,
    ebp,
    ebx,
    ecx,
    edi,
    edx,
    eflags,
    eip,
    es = eip + 2,
    esi,
    esp,
    fpsw,
    fs,
    gs,
    ip,
    rax,
    rbp,
    rbx,
    rcx,
    rdi,
    rdx,
    rip,
    rsi = rip + 2,
    rsp,
    si,
    sil,
    sp,
    spl,
    ss,
    cr0,
    cr1,
    cr2,
    cr3,
    cr4,
    cr8 = cr4 + 4,
    dr0 = cr8 + 8,
    dr1,
    dr2,
    dr3,
    dr4,
    dr5,
    dr6,
    dr7,
    fp0 = dr7 + 9,
    fp1,
    fp2,
    fp3,
    fp4,
    fp5,
    fp6,
    fp7,
    k0,
    k1,
    k2,
    k3,
    k4,
    k5,
    k6,
    k7,
    mm0,
    mm1,
    mm2,
    mm3,
    mm4,
    mm5,
    mm6,
    mm7,
    r8,
    r9,
    r10,
    r11,
    r12,
    r13,
    r14,
    r15,
    st0,
    st1,
    st2,
    st3,
    st4,
    st5,
    st6,
    st7,
    xmm0,
    xmm1,
    xmm2,
    xmm3,
    xmm4,
    xmm5,
    xmm6,
    xmm7,
    xmm8,
    xmm9,
    xmm10,
    xmm11,
    xmm12,
    xmm13,
    xmm14,
    xmm15,
    xmm16,
    xmm17,
    xmm18,
    xmm19,
    xmm20,
    xmm21,
    xmm22,
    xmm23,
    xmm24,
    xmm25,
    xmm26,
    xmm27,
    xmm28,
    xmm29,
    xmm30,
    xmm31,
    ymm0,
    ymm1,
    ymm2,
    ymm3,
    ymm4,
    ymm5,
    ymm6,
    ymm7,
    ymm8,
    ymm9,
    ymm10,
    ymm11,
    ymm12,
    ymm13,
    ymm14,
    ymm15,
    ymm16,
    ymm17,
    ymm18,
    ymm19,
    ymm20,
    ymm21,
    ymm22,
    ymm23,
    ymm24,
    ymm25,
    ymm26,
    ymm27,
    ymm28,
    ymm29,
    ymm30,
    ymm31,
    zmm0,
    zmm1,
    zmm2,
    zmm3,
    zmm4,
    zmm5,
    zmm6,
    zmm7,
    zmm8,
    zmm9,
    zmm10,
    zmm11,
    zmm12,
    zmm13,
    zmm14,
    zmm15,
    zmm16,
    zmm17,
    zmm18,
    zmm19,
    zmm20,
    zmm21,
    zmm22,
    zmm23,
    zmm24,
    zmm25,
    zmm26,
    zmm27,
    zmm28,
    zmm29,
    zmm30,
    zmm31,
    r8b,
    r9b,
    r10b,
    r11b,
    r12b,
    r13b,
    r14b,
    r15b,
    r8d,
    r9d,
    r10d,
    r11d,
    r12d,
    r13d,
    r14d,
    r15d,
    r8w,
    r9w,
    r10w,
    r11w,
    r12w,
    r13w,
    r14w,
    r15w,
    idtr,
    gdtr,
    ldtr,
    tr,
    fpcw,
    fptag,
    msr,
    mxcsr,
    fs_base,
    gs_base,
    flags,
    rflags,
    fip,
    fcs,
    fdp,
    fds,
    fop,
    end, // Must be last
};
