#include "register.h"

const struct reg RAX = {
    .qword = "rax",
    .dword = "eax",
    .word = "ax",
    .byte = "al",
};
const struct reg RDI = {
    .qword = "rdi",
    .dword = "edi",
    .word = "di",
    .byte = "dil",
};
const struct reg RSI = {
    .qword = "rsi",
    .dword = "esi",
    .word = "si",
    .byte = "sil",
};
const struct reg RDX = {
    .qword = "rdx",
    .dword = "edx",
    .word = "dx",
    .byte = "dl",
};
const struct reg R10 = {
    .qword = "r10",
    .dword = "r10d",
    .word = "r10w",
    .byte = "r10b",
};
const struct reg R9 = {
    .qword = "r9",
    .dword = "r9d",
    .word = "r9w",
    .byte = "r9b",
};
const struct reg R8 = {
    .qword = "r8",
    .dword = "r8d",
    .word = "r8w",
    .byte = "r8b",
};

const struct reg* const CALLING_CONV[] = {&RDI, &RSI, &RDX, &R10, &R9, &R8};
const unsigned char CC_N_REGS =
    sizeof(CALLING_CONV) / sizeof(const struct reg* const);
