Makefile.mingw corrections and made the code pass much stricter checks (now mandated by Makefile.mignw) to ensure GCC 14 readiness.
This commit is contained in:
@@ -58,12 +58,12 @@ int has_ea;
|
||||
codeblock_t *codeblock;
|
||||
uint16_t *codeblock_hash;
|
||||
|
||||
void (*codegen_timing_start)();
|
||||
void (*codegen_timing_start)(void);
|
||||
void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*codegen_timing_block_start)();
|
||||
void (*codegen_timing_block_end)();
|
||||
int (*codegen_timing_jump_cycles)();
|
||||
void (*codegen_timing_block_start)(void);
|
||||
void (*codegen_timing_block_end)(void);
|
||||
int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
void codegen_timing_set(codegen_timing_t *timing)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ static int last_op_ssegs;
|
||||
static x86seg *last_op_ea_seg;
|
||||
static uint32_t last_op_32;
|
||||
|
||||
void codegen_generate_reset()
|
||||
void codegen_generate_reset(void)
|
||||
{
|
||||
last_op_ssegs = -1;
|
||||
last_op_ea_seg = NULL;
|
||||
|
||||
@@ -314,29 +314,29 @@ static inline void codegen_mark_code_present(codeblock_t *block, uint32_t start_
|
||||
codegen_mark_code_present_multibyte(block, start_pc, len);
|
||||
}
|
||||
|
||||
void codegen_init();
|
||||
void codegen_close();
|
||||
void codegen_reset();
|
||||
void codegen_block_init(uint32_t phys_addr);
|
||||
void codegen_block_remove();
|
||||
void codegen_block_start_recompile(codeblock_t *block);
|
||||
void codegen_block_end_recompile(codeblock_t *block);
|
||||
void codegen_block_end();
|
||||
void codegen_delete_block(codeblock_t *block);
|
||||
void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
void codegen_generate_seg_restore();
|
||||
void codegen_set_op32();
|
||||
void codegen_flush();
|
||||
void codegen_check_flush(struct page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
extern void codegen_init(void);
|
||||
extern void codegen_close(void);
|
||||
extern void codegen_reset(void);
|
||||
extern void codegen_block_init(uint32_t phys_addr);
|
||||
extern void codegen_block_remove(void);
|
||||
extern void codegen_block_start_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end_recompile(codeblock_t *block);
|
||||
extern void codegen_block_end(void);
|
||||
extern void codegen_delete_block(codeblock_t *block);
|
||||
extern void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc);
|
||||
extern void codegen_generate_seg_restore(void);
|
||||
extern void codegen_set_op32(void);
|
||||
extern void codegen_flush(void);
|
||||
extern void codegen_check_flush(struct page_t *page, uint64_t mask, uint32_t phys_addr);
|
||||
struct ir_data_t;
|
||||
x86seg *codegen_generate_ea(struct ir_data_t *ir, x86seg *op_ea_seg, uint32_t fetchdat, int op_ssegs, uint32_t *op_pc, uint32_t op_32, int stack_offset);
|
||||
void codegen_check_seg_read(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
void codegen_check_seg_write(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
extern void codegen_check_seg_read(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
extern void codegen_check_seg_write(codeblock_t *block, struct ir_data_t *ir, x86seg *seg);
|
||||
|
||||
int codegen_purge_purgable_list();
|
||||
extern int codegen_purge_purgable_list(void);
|
||||
/*Delete a random code block to free memory. This is obviously quite expensive, and
|
||||
will only be called when the allocator is out of memory*/
|
||||
void codegen_delete_random_block(int required_mem_block);
|
||||
extern void codegen_delete_random_block(int required_mem_block);
|
||||
|
||||
extern int cpu_block_end;
|
||||
extern uint32_t codegen_endpc;
|
||||
@@ -346,21 +346,21 @@ extern int cpu_notreps;
|
||||
|
||||
extern int codegen_block_cycles;
|
||||
|
||||
extern void (*codegen_timing_start)();
|
||||
extern void (*codegen_timing_start)(void);
|
||||
extern void (*codegen_timing_prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
extern void (*codegen_timing_opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
extern void (*codegen_timing_block_start)();
|
||||
extern void (*codegen_timing_block_end)();
|
||||
extern int (*codegen_timing_jump_cycles)();
|
||||
extern void (*codegen_timing_block_start)(void);
|
||||
extern void (*codegen_timing_block_end)(void);
|
||||
extern int (*codegen_timing_jump_cycles)(void);
|
||||
|
||||
typedef struct codegen_timing_t
|
||||
{
|
||||
void (*start)();
|
||||
void (*start)(void);
|
||||
void (*prefix)(uint8_t prefix, uint32_t fetchdat);
|
||||
void (*opcode)(uint8_t opcode, uint32_t fetchdat, int op_32, uint32_t op_pc);
|
||||
void (*block_start)();
|
||||
void (*block_end)();
|
||||
int (*jump_cycles)();
|
||||
void (*block_start)(void);
|
||||
void (*block_end)(void);
|
||||
int (*jump_cycles)(void);
|
||||
} codegen_timing_t;
|
||||
|
||||
extern codegen_timing_t codegen_timing_pentium;
|
||||
@@ -398,7 +398,7 @@ extern int codegen_reg_loaded[8];
|
||||
|
||||
extern int codegen_in_recompile;
|
||||
|
||||
void codegen_generate_reset();
|
||||
void codegen_generate_reset(void);
|
||||
|
||||
int codegen_get_instruction_uop(codeblock_t *block, uint32_t pc, int *first_instruction, int *TOP);
|
||||
void codegen_set_loop_start(struct ir_data_t *ir, int first_instruction);
|
||||
|
||||
@@ -36,7 +36,7 @@ void codegen_accumulate_flush(ir_data_t *ir)
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
void codegen_accumulate_reset()
|
||||
void codegen_accumulate_reset(void)
|
||||
{
|
||||
acc_regs[0].count = 0;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ struct ir_data_t;
|
||||
|
||||
void codegen_accumulate(struct ir_data_t *ir, int acc_reg, int delta);
|
||||
void codegen_accumulate_flush(struct ir_data_t *ir);
|
||||
void codegen_accumulate_reset();
|
||||
void codegen_accumulate_reset(void);
|
||||
|
||||
@@ -30,7 +30,7 @@ static uint8_t *mem_block_alloc = NULL;
|
||||
|
||||
int codegen_allocator_usage = 0;
|
||||
|
||||
void codegen_allocator_init()
|
||||
void codegen_allocator_init(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define MEM_BLOCK_MASK (MEM_BLOCK_NR-1)
|
||||
#define MEM_BLOCK_SIZE 0x3c0
|
||||
|
||||
void codegen_allocator_init();
|
||||
void codegen_allocator_init(void);
|
||||
/*Allocate a mem_block_t, and the associated backing memory.
|
||||
If parent is non-NULL, then the new block will be added to the list in
|
||||
parent->next*/
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
#error Dynamic recompiler not implemented on your platform
|
||||
#endif
|
||||
|
||||
void codegen_backend_init();
|
||||
void codegen_backend_init(void);
|
||||
void codegen_backend_prologue(codeblock_t *block);
|
||||
void codegen_backend_epilogue(codeblock_t *block);
|
||||
|
||||
struct ir_data_t;
|
||||
struct uop_t;
|
||||
|
||||
struct ir_data_t *codegen_get_ir_data();
|
||||
struct ir_data_t *codegen_get_ir_data(void);
|
||||
|
||||
typedef int (*uOpFn)(codeblock_t *codeblock, struct uop_t *uop);
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ static void build_fp_round_routine(codeblock_t *block)
|
||||
host_arm_MOV_REG(block, REG_PC, REG_LR);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -277,7 +277,7 @@ static void build_fp_round_routine(codeblock_t *block, int is_quad)
|
||||
host_arm64_RET(block, REG_X30);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -290,7 +290,7 @@ static void build_loadstore_routines(codeblock_t *block)
|
||||
build_store_routine(block, 8, 1);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -264,7 +264,7 @@ static void build_loadstore_routines(codeblock_t *block)
|
||||
build_store_routine(block, 8, 1);
|
||||
}
|
||||
|
||||
void codegen_backend_init()
|
||||
void codegen_backend_init(void)
|
||||
{
|
||||
codeblock_t *block;
|
||||
int c;
|
||||
|
||||
@@ -154,7 +154,7 @@ static void block_dirty_list_remove(codeblock_t *block)
|
||||
block->flags &= ~CODEBLOCK_IN_DIRTY_LIST;
|
||||
}
|
||||
|
||||
int codegen_purge_purgable_list()
|
||||
int codegen_purge_purgable_list(void)
|
||||
{
|
||||
if (purgable_page_list_head)
|
||||
{
|
||||
@@ -171,7 +171,7 @@ int codegen_purge_purgable_list()
|
||||
return 0;
|
||||
}
|
||||
|
||||
static codeblock_t *block_free_list_get()
|
||||
static codeblock_t *block_free_list_get(void)
|
||||
{
|
||||
codeblock_t *block = NULL;
|
||||
|
||||
@@ -210,7 +210,7 @@ static codeblock_t *block_free_list_get()
|
||||
return block;
|
||||
}
|
||||
|
||||
void codegen_init()
|
||||
void codegen_init(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -227,7 +227,7 @@ void codegen_init()
|
||||
#endif
|
||||
}
|
||||
|
||||
void codegen_close()
|
||||
void codegen_close(void)
|
||||
{
|
||||
#ifdef DEBUG_EXTRA
|
||||
pclog("Instruction counts :\n");
|
||||
@@ -256,7 +256,7 @@ void codegen_close()
|
||||
#endif
|
||||
}
|
||||
|
||||
void codegen_reset()
|
||||
void codegen_reset(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
@@ -284,7 +284,7 @@ void codegen_reset()
|
||||
}
|
||||
}
|
||||
|
||||
void dump_block()
|
||||
void dump_block(void)
|
||||
{
|
||||
/* codeblock_t *block = pages[0x119000 >> 12].block;
|
||||
|
||||
@@ -574,7 +574,7 @@ void codegen_block_init(uint32_t phys_addr)
|
||||
|
||||
static ir_data_t *ir_data;
|
||||
|
||||
ir_data_t *codegen_get_ir_data()
|
||||
ir_data_t *codegen_get_ir_data(void)
|
||||
{
|
||||
return ir_data;
|
||||
}
|
||||
@@ -645,7 +645,7 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
}
|
||||
|
||||
|
||||
void codegen_block_remove()
|
||||
void codegen_block_remove(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -654,7 +654,7 @@ void codegen_block_remove()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask_recompile()
|
||||
void codegen_block_generate_end_mask_recompile(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
page_t *p;
|
||||
@@ -721,7 +721,7 @@ void codegen_block_generate_end_mask_recompile()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_generate_end_mask_mark()
|
||||
void codegen_block_generate_end_mask_mark(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
uint32_t start_pc;
|
||||
@@ -799,7 +799,7 @@ void codegen_block_generate_end_mask_mark()
|
||||
recomp_page = -1;
|
||||
}
|
||||
|
||||
void codegen_block_end()
|
||||
void codegen_block_end(void)
|
||||
{
|
||||
codeblock_t *block = &codeblock[block_current];
|
||||
|
||||
@@ -828,7 +828,7 @@ void codegen_block_end_recompile(codeblock_t *block)
|
||||
codegen_ir_compile(ir_data, block);
|
||||
}
|
||||
|
||||
void codegen_flush()
|
||||
void codegen_flush(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ static ir_data_t ir_block;
|
||||
static int codegen_unroll_start, codegen_unroll_count;
|
||||
static int codegen_unroll_first_instruction;
|
||||
|
||||
ir_data_t *codegen_ir_init()
|
||||
ir_data_t *codegen_ir_init(void)
|
||||
{
|
||||
ir_block.wr_pos = 0;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "codegen_ir_defs.h"
|
||||
|
||||
ir_data_t *codegen_ir_init();
|
||||
ir_data_t *codegen_ir_init(void);
|
||||
|
||||
void codegen_ir_set_unroll(int count, int start, int first_instruction);
|
||||
void codegen_ir_compile(ir_data_t *ir, codeblock_t *block);
|
||||
|
||||
@@ -13,11 +13,11 @@
|
||||
#include "codegen_ops_helpers.h"
|
||||
#include "codegen_ops_mov.h"
|
||||
|
||||
static int NF_SET_01()
|
||||
static int NF_SET_01(void)
|
||||
{
|
||||
return NF_SET() ? 1 : 0;
|
||||
}
|
||||
static int VF_SET_01()
|
||||
static int VF_SET_01(void)
|
||||
{
|
||||
return VF_SET() ? 1 : 0;
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ struct
|
||||
[IREG_temp1d] = {REG_DOUBLE, (void *)48, REG_FP, REG_VOLATILE},
|
||||
};
|
||||
|
||||
void codegen_reg_mark_as_required()
|
||||
void codegen_reg_mark_as_required(void)
|
||||
{
|
||||
int reg;
|
||||
|
||||
@@ -224,7 +224,7 @@ int reg_is_native_size(ir_reg_t ir_reg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void codegen_reg_reset()
|
||||
void codegen_reg_reset(void)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ static inline int ir_reg_is_invalid(ir_reg_t ir_reg)
|
||||
|
||||
struct ir_data_t;
|
||||
|
||||
void codegen_reg_reset();
|
||||
void codegen_reg_reset(void);
|
||||
/*Write back all dirty registers*/
|
||||
void codegen_reg_flush(struct ir_data_t *ir, codeblock_t *block);
|
||||
/*Write back and evict all registers*/
|
||||
@@ -414,6 +414,6 @@ ir_host_reg_t codegen_reg_alloc_write_reg(codeblock_t *block, ir_reg_t ir_reg);
|
||||
|
||||
void codegen_reg_rename(codeblock_t *block, ir_reg_t src, ir_reg_t dst);
|
||||
|
||||
void codegen_reg_mark_as_required();
|
||||
void codegen_reg_mark_as_required(void);
|
||||
void codegen_reg_process_dead_list(struct ir_data_t *ir);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user