/**
 * @file
 * @brief Contains additional external requirements defs for external includes.
 * @note   DO NOT EDIT THIS FILE, your changes will be lost.
 *         Edit ./ir/be/sparc/sparc_spec.pl instead.
 *         created by: ./ir/be/scripts/generate_regalloc_if.pl ./ir/be/sparc/sparc_spec.pl build/gen/ir/be/sparc
 * @date   Tue Jul  7 23:51:18 2026
 */
#ifndef FIRM_BE_SPARC_GEN_SPARC_REGALLOC_IF_H
#define FIRM_BE_SPARC_GEN_SPARC_REGALLOC_IF_H

#include "bearch.h"

/** global register indices for sparc registers */
enum reg_indices {
	REG_PSR,
	REG_F0,
	REG_F1,
	REG_F2,
	REG_F3,
	REG_F4,
	REG_F5,
	REG_F6,
	REG_F7,
	REG_F8,
	REG_F9,
	REG_F10,
	REG_F11,
	REG_F12,
	REG_F13,
	REG_F14,
	REG_F15,
	REG_F16,
	REG_F17,
	REG_F18,
	REG_F19,
	REG_F20,
	REG_F21,
	REG_F22,
	REG_F23,
	REG_F24,
	REG_F25,
	REG_F26,
	REG_F27,
	REG_F28,
	REG_F29,
	REG_F30,
	REG_F31,
	REG_FSR,
	REG_L0,
	REG_L1,
	REG_L2,
	REG_L3,
	REG_L4,
	REG_L5,
	REG_L6,
	REG_L7,
	REG_G0,
	REG_G1,
	REG_G2,
	REG_G3,
	REG_G4,
	REG_G5,
	REG_G6,
	REG_G7,
	REG_O0,
	REG_O1,
	REG_O2,
	REG_O3,
	REG_O4,
	REG_O5,
	REG_SP,
	REG_O7,
	REG_I0,
	REG_I1,
	REG_I2,
	REG_I3,
	REG_I4,
	REG_I5,
	REG_FP,
	REG_I7,
	REG_Y,

	N_SPARC_REGISTERS
};

/** local register indices for sparc registers */
enum {
	REG_FLAGS_PSR,
};

enum {
	REG_FP_F0,
	REG_FP_F1,
	REG_FP_F2,
	REG_FP_F3,
	REG_FP_F4,
	REG_FP_F5,
	REG_FP_F6,
	REG_FP_F7,
	REG_FP_F8,
	REG_FP_F9,
	REG_FP_F10,
	REG_FP_F11,
	REG_FP_F12,
	REG_FP_F13,
	REG_FP_F14,
	REG_FP_F15,
	REG_FP_F16,
	REG_FP_F17,
	REG_FP_F18,
	REG_FP_F19,
	REG_FP_F20,
	REG_FP_F21,
	REG_FP_F22,
	REG_FP_F23,
	REG_FP_F24,
	REG_FP_F25,
	REG_FP_F26,
	REG_FP_F27,
	REG_FP_F28,
	REG_FP_F29,
	REG_FP_F30,
	REG_FP_F31,
};

enum {
	REG_FPFLAGS_FSR,
};

enum {
	REG_GP_L0,
	REG_GP_L1,
	REG_GP_L2,
	REG_GP_L3,
	REG_GP_L4,
	REG_GP_L5,
	REG_GP_L6,
	REG_GP_L7,
	REG_GP_G0,
	REG_GP_G1,
	REG_GP_G2,
	REG_GP_G3,
	REG_GP_G4,
	REG_GP_G5,
	REG_GP_G6,
	REG_GP_G7,
	REG_GP_O0,
	REG_GP_O1,
	REG_GP_O2,
	REG_GP_O3,
	REG_GP_O4,
	REG_GP_O5,
	REG_GP_SP,
	REG_GP_O7,
	REG_GP_I0,
	REG_GP_I1,
	REG_GP_I2,
	REG_GP_I3,
	REG_GP_I4,
	REG_GP_I5,
	REG_GP_FP,
	REG_GP_I7,
};

enum {
	REG_MUL_DIV_HIGH_RES_Y,
};


/** number of registers in sparc register classes. */
enum {
	N_sparc_flags_REGS = 1,
	N_sparc_fp_REGS = 32,
	N_sparc_fpflags_REGS = 1,
	N_sparc_gp_REGS = 32,
	N_sparc_mul_div_high_res_REGS = 1,

};

enum {
	CLASS_sparc_flags,
	CLASS_sparc_fp,
	CLASS_sparc_fpflags,
	CLASS_sparc_gp,
	CLASS_sparc_mul_div_high_res,
	N_SPARC_CLASSES = 5
};

extern const arch_register_req_t sparc_class_reg_req_flags;
extern const arch_register_req_t sparc_single_reg_req_flags_psr;
extern const arch_register_req_t sparc_class_reg_req_fp;
extern const arch_register_req_t sparc_single_reg_req_fp_f0;
extern const arch_register_req_t sparc_single_reg_req_fp_f1;
extern const arch_register_req_t sparc_single_reg_req_fp_f2;
extern const arch_register_req_t sparc_single_reg_req_fp_f3;
extern const arch_register_req_t sparc_single_reg_req_fp_f4;
extern const arch_register_req_t sparc_single_reg_req_fp_f5;
extern const arch_register_req_t sparc_single_reg_req_fp_f6;
extern const arch_register_req_t sparc_single_reg_req_fp_f7;
extern const arch_register_req_t sparc_single_reg_req_fp_f8;
extern const arch_register_req_t sparc_single_reg_req_fp_f9;
extern const arch_register_req_t sparc_single_reg_req_fp_f10;
extern const arch_register_req_t sparc_single_reg_req_fp_f11;
extern const arch_register_req_t sparc_single_reg_req_fp_f12;
extern const arch_register_req_t sparc_single_reg_req_fp_f13;
extern const arch_register_req_t sparc_single_reg_req_fp_f14;
extern const arch_register_req_t sparc_single_reg_req_fp_f15;
extern const arch_register_req_t sparc_single_reg_req_fp_f16;
extern const arch_register_req_t sparc_single_reg_req_fp_f17;
extern const arch_register_req_t sparc_single_reg_req_fp_f18;
extern const arch_register_req_t sparc_single_reg_req_fp_f19;
extern const arch_register_req_t sparc_single_reg_req_fp_f20;
extern const arch_register_req_t sparc_single_reg_req_fp_f21;
extern const arch_register_req_t sparc_single_reg_req_fp_f22;
extern const arch_register_req_t sparc_single_reg_req_fp_f23;
extern const arch_register_req_t sparc_single_reg_req_fp_f24;
extern const arch_register_req_t sparc_single_reg_req_fp_f25;
extern const arch_register_req_t sparc_single_reg_req_fp_f26;
extern const arch_register_req_t sparc_single_reg_req_fp_f27;
extern const arch_register_req_t sparc_single_reg_req_fp_f28;
extern const arch_register_req_t sparc_single_reg_req_fp_f29;
extern const arch_register_req_t sparc_single_reg_req_fp_f30;
extern const arch_register_req_t sparc_single_reg_req_fp_f31;
extern const arch_register_req_t sparc_class_reg_req_fpflags;
extern const arch_register_req_t sparc_single_reg_req_fpflags_fsr;
extern const arch_register_req_t sparc_class_reg_req_gp;
extern const arch_register_req_t sparc_single_reg_req_gp_l0;
extern const arch_register_req_t sparc_single_reg_req_gp_l1;
extern const arch_register_req_t sparc_single_reg_req_gp_l2;
extern const arch_register_req_t sparc_single_reg_req_gp_l3;
extern const arch_register_req_t sparc_single_reg_req_gp_l4;
extern const arch_register_req_t sparc_single_reg_req_gp_l5;
extern const arch_register_req_t sparc_single_reg_req_gp_l6;
extern const arch_register_req_t sparc_single_reg_req_gp_l7;
extern const arch_register_req_t sparc_single_reg_req_gp_g0;
extern const arch_register_req_t sparc_single_reg_req_gp_g1;
extern const arch_register_req_t sparc_single_reg_req_gp_g2;
extern const arch_register_req_t sparc_single_reg_req_gp_g3;
extern const arch_register_req_t sparc_single_reg_req_gp_g4;
extern const arch_register_req_t sparc_single_reg_req_gp_g5;
extern const arch_register_req_t sparc_single_reg_req_gp_g6;
extern const arch_register_req_t sparc_single_reg_req_gp_g7;
extern const arch_register_req_t sparc_single_reg_req_gp_o0;
extern const arch_register_req_t sparc_single_reg_req_gp_o1;
extern const arch_register_req_t sparc_single_reg_req_gp_o2;
extern const arch_register_req_t sparc_single_reg_req_gp_o3;
extern const arch_register_req_t sparc_single_reg_req_gp_o4;
extern const arch_register_req_t sparc_single_reg_req_gp_o5;
extern const arch_register_req_t sparc_single_reg_req_gp_sp;
extern const arch_register_req_t sparc_single_reg_req_gp_o7;
extern const arch_register_req_t sparc_single_reg_req_gp_i0;
extern const arch_register_req_t sparc_single_reg_req_gp_i1;
extern const arch_register_req_t sparc_single_reg_req_gp_i2;
extern const arch_register_req_t sparc_single_reg_req_gp_i3;
extern const arch_register_req_t sparc_single_reg_req_gp_i4;
extern const arch_register_req_t sparc_single_reg_req_gp_i5;
extern const arch_register_req_t sparc_single_reg_req_gp_fp;
extern const arch_register_req_t sparc_single_reg_req_gp_i7;
extern const arch_register_req_t sparc_class_reg_req_mul_div_high_res;
extern const arch_register_req_t sparc_single_reg_req_mul_div_high_res_y;


extern const arch_register_t sparc_registers[N_SPARC_REGISTERS];

extern arch_register_class_t sparc_reg_classes[N_SPARC_CLASSES];

void sparc_register_init(void);

#endif
