diff options
author | Twinaphex | 2014-12-20 09:14:38 +0100 |
---|---|---|
committer | Twinaphex | 2014-12-20 09:14:38 +0100 |
commit | d10c4afea252e0eb714fc5367e49bca5c6142c07 (patch) | |
tree | 5073815fb9062b2156488fa45e33da2191676c82 /x86 | |
parent | ba834beeb1550e122ecac62609f34cf7c9717139 (diff) | |
download | picogpsp-d10c4afea252e0eb714fc5367e49bca5c6142c07.tar.gz picogpsp-d10c4afea252e0eb714fc5367e49bca5c6142c07.tar.bz2 picogpsp-d10c4afea252e0eb714fc5367e49bca5c6142c07.zip |
Get rid of function_cc
Diffstat (limited to 'x86')
-rw-r--r-- | x86/x86_emit.h | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/x86/x86_emit.h b/x86/x86_emit.h index 788c079..c2f7783 100644 --- a/x86/x86_emit.h +++ b/x86/x86_emit.h @@ -28,7 +28,7 @@ void x86_indirect_branch_arm(u32 address); void x86_indirect_branch_thumb(u32 address); void x86_indirect_branch_dual(u32 address); -void function_cc execute_store_cpsr(u32 new_cpsr, u32 store_mask); +void execute_store_cpsr(u32 new_cpsr, u32 store_mask); typedef enum { @@ -466,7 +466,7 @@ typedef enum #define generate_block_prologue() \ #define generate_block_extra_vars_arm() \ - void generate_indirect_branch_arm() \ + void generate_indirect_branch_arm(void) \ { \ if(condition == 0x0E) \ { \ @@ -523,7 +523,7 @@ typedef enum generate_function_call(execute_##name##_##flags_op##_reg); \ generate_mov(ireg, rv) \ -u32 function_cc execute_lsl_no_flags_reg(u32 value, u32 shift) +u32 execute_lsl_no_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -535,7 +535,7 @@ u32 function_cc execute_lsl_no_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_lsr_no_flags_reg(u32 value, u32 shift) +u32 execute_lsr_no_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -547,7 +547,7 @@ u32 function_cc execute_lsr_no_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_asr_no_flags_reg(u32 value, u32 shift) +u32 execute_asr_no_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -559,7 +559,7 @@ u32 function_cc execute_asr_no_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_ror_no_flags_reg(u32 value, u32 shift) +u32 execute_ror_no_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -570,7 +570,7 @@ u32 function_cc execute_ror_no_flags_reg(u32 value, u32 shift) } -u32 function_cc execute_lsl_flags_reg(u32 value, u32 shift) +u32 execute_lsl_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -592,7 +592,7 @@ u32 function_cc execute_lsl_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_lsr_flags_reg(u32 value, u32 shift) +u32 execute_lsr_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -614,7 +614,7 @@ u32 function_cc execute_lsr_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_asr_flags_reg(u32 value, u32 shift) +u32 execute_asr_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -632,7 +632,7 @@ u32 function_cc execute_asr_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_ror_flags_reg(u32 value, u32 shift) +u32 execute_ror_flags_reg(u32 value, u32 shift) { if(shift != 0) { @@ -643,14 +643,14 @@ u32 function_cc execute_ror_flags_reg(u32 value, u32 shift) return value; } -u32 function_cc execute_rrx_flags(u32 value) +u32 execute_rrx_flags(u32 value) { u32 c_flag = reg[REG_C_FLAG]; reg[REG_C_FLAG] = value & 0x01; return (value >> 1) | (c_flag << 31); } -u32 function_cc execute_rrx(u32 value) +u32 execute_rrx(u32 value) { return (value >> 1) | (reg[REG_C_FLAG] << 31); } @@ -917,7 +917,7 @@ u32 function_cc execute_rrx(u32 value) generate_indirect_branch_arm(); \ } \ -u32 function_cc execute_spsr_restore(u32 address) +u32 execute_spsr_restore(u32 address) { if(reg[CPU_MODE] != MODE_USER) { @@ -1195,7 +1195,7 @@ typedef enum generate_store_reg_pc_no_flags(a0, rd); \ } \ -static void function_cc execute_mul_flags(u32 dest) +static void execute_mul_flags(u32 dest) { calculate_z_flag(dest); calculate_n_flag(dest); @@ -1223,7 +1223,7 @@ static void function_cc execute_mul_flags(u32 dest) arm_multiply_flags_##flags(); \ } \ -static void function_cc execute_mul_long_flags(u32 dest_lo, u32 dest_hi) +static void execute_mul_long_flags(u32 dest_lo, u32 dest_hi) { reg[REG_Z_FLAG] = (dest_lo == 0) & (dest_hi == 0); calculate_n_flag(dest_hi); @@ -1253,13 +1253,13 @@ static void function_cc execute_mul_long_flags(u32 dest_lo, u32 dest_hi) arm_multiply_long_flags_##flags(); \ } \ -u32 function_cc execute_read_cpsr() +u32 execute_read_cpsr(void) { collapse_flags(); return reg[REG_CPSR]; } -u32 function_cc execute_read_spsr() +u32 execute_read_spsr(void) { collapse_flags(); return spsr[reg[CPU_MODE]]; @@ -1272,7 +1272,7 @@ u32 function_cc execute_read_spsr() // store_mask and address are stored in the SAVE slots, since there's no real // register space to nicely pass them. -u32 function_cc execute_store_cpsr_body(u32 _cpsr) +u32 execute_store_cpsr_body(u32 _cpsr) { reg[REG_CPSR] = _cpsr; if(reg[REG_SAVE] & 0xFF) @@ -1293,7 +1293,7 @@ u32 function_cc execute_store_cpsr_body(u32 _cpsr) } -void function_cc execute_store_spsr(u32 new_spsr, u32 store_mask) +void execute_store_spsr(u32 new_spsr, u32 store_mask) { u32 _spsr = spsr[reg[CPU_MODE]]; spsr[reg[CPU_MODE]] = (new_spsr & store_mask) | (_spsr & (~store_mask)); @@ -1365,7 +1365,7 @@ void function_cc execute_store_spsr(u32 new_spsr, u32 store_mask) } \ #define access_memory_generate_read_function(mem_size, mem_type) \ -u32 function_cc execute_load_##mem_type(u32 address) \ +u32 execute_load_##mem_type(u32 address) \ { \ u32 dest; \ read_memory(mem_size, mem_type, address, dest); \ @@ -1377,7 +1377,7 @@ access_memory_generate_read_function(8, s8); access_memory_generate_read_function(16, u16); access_memory_generate_read_function(32, u32); -u32 function_cc execute_load_s16(u32 address) +u32 execute_load_s16(u32 address) { u32 dest; read_memory_s16(address, dest); @@ -1385,7 +1385,7 @@ u32 function_cc execute_load_s16(u32 address) } #define access_memory_generate_write_function(mem_size, mem_type) \ -void function_cc execute_store_##mem_type(u32 address, u32 source) \ +void execute_store_##mem_type(u32 address, u32 source) \ { \ u8 *map; \ \ @@ -1492,7 +1492,7 @@ void function_cc execute_store_##mem_type(u32 address, u32 source) \ #define sprint_yes(access_type, pre_op, post_op, wb) \ printf("sbit on %s %s %s %s\n", #access_type, #pre_op, #post_op, #wb) \ -u32 function_cc execute_aligned_load32(u32 address) +u32 execute_aligned_load32(u32 address) { u8 *map; if(!(address & 0xF0000000) && (map = memory_map_read[address >> 15])) @@ -1501,7 +1501,7 @@ u32 function_cc execute_aligned_load32(u32 address) return read_memory32(address); } -void function_cc execute_aligned_store32(u32 address, u32 source) +void execute_aligned_store32(u32 address, u32 source) { u8 *map; @@ -1729,7 +1729,7 @@ void function_cc execute_aligned_store32(u32 address, u32 source) // Operation types: lsl, lsr, asr, ror // Affects N/Z/C flags -u32 function_cc execute_lsl_reg_op(u32 value, u32 shift) +u32 execute_lsl_reg_op(u32 value, u32 shift) { if(shift != 0) { @@ -1753,7 +1753,7 @@ u32 function_cc execute_lsl_reg_op(u32 value, u32 shift) return value; } -u32 function_cc execute_lsr_reg_op(u32 value, u32 shift) +u32 execute_lsr_reg_op(u32 value, u32 shift) { if(shift != 0) { @@ -1777,7 +1777,7 @@ u32 function_cc execute_lsr_reg_op(u32 value, u32 shift) return value; } -u32 function_cc execute_asr_reg_op(u32 value, u32 shift) +u32 execute_asr_reg_op(u32 value, u32 shift) { if(shift != 0) { @@ -1797,7 +1797,7 @@ u32 function_cc execute_asr_reg_op(u32 value, u32 shift) return value; } -u32 function_cc execute_ror_reg_op(u32 value, u32 shift) +u32 execute_ror_reg_op(u32 value, u32 shift) { if(shift != 0) { @@ -1809,7 +1809,7 @@ u32 function_cc execute_ror_reg_op(u32 value, u32 shift) return value; } -u32 function_cc execute_lsl_imm_op(u32 value, u32 shift) +u32 execute_lsl_imm_op(u32 value, u32 shift) { if(shift != 0) { @@ -1821,7 +1821,7 @@ u32 function_cc execute_lsl_imm_op(u32 value, u32 shift) return value; } -u32 function_cc execute_lsr_imm_op(u32 value, u32 shift) +u32 execute_lsr_imm_op(u32 value, u32 shift) { if(shift != 0) { @@ -1838,7 +1838,7 @@ u32 function_cc execute_lsr_imm_op(u32 value, u32 shift) return value; } -u32 function_cc execute_asr_imm_op(u32 value, u32 shift) +u32 execute_asr_imm_op(u32 value, u32 shift) { if(shift != 0) { @@ -1855,7 +1855,7 @@ u32 function_cc execute_asr_imm_op(u32 value, u32 shift) return value; } -u32 function_cc execute_ror_imm_op(u32 value, u32 shift) +u32 execute_ror_imm_op(u32 value, u32 shift) { if(shift != 0) { @@ -2057,12 +2057,12 @@ u32 function_cc execute_ror_imm_op(u32 value, u32 shift) const u32 _sb = src_b \ #define data_proc_generate_logic_function(name, expr) \ -u32 function_cc execute_##name(u32 rm, u32 rn) \ +u32 execute_##name(u32 rm, u32 rn) \ { \ return expr; \ } \ \ -u32 function_cc execute_##name##s(u32 rm, u32 rn) \ +u32 execute_##name##s(u32 rm, u32 rn) \ { \ u32 dest = expr; \ calculate_z_flag(dest); \ @@ -2071,12 +2071,12 @@ u32 function_cc execute_##name##s(u32 rm, u32 rn) \ } \ #define data_proc_generate_logic_unary_function(name, expr) \ -u32 function_cc execute_##name(u32 rm) \ +u32 execute_##name(u32 rm) \ { \ return expr; \ } \ \ -u32 function_cc execute_##name##s(u32 rm) \ +u32 execute_##name##s(u32 rm) \ { \ u32 dest = expr; \ calculate_z_flag(dest); \ @@ -2086,12 +2086,12 @@ u32 function_cc execute_##name##s(u32 rm) \ #define data_proc_generate_sub_function(name, src_a, src_b) \ -u32 function_cc execute_##name(u32 rm, u32 rn) \ +u32 execute_##name(u32 rm, u32 rn) \ { \ return (src_a) - (src_b); \ } \ \ -u32 function_cc execute_##name##s(u32 rm, u32 rn) \ +u32 execute_##name##s(u32 rm, u32 rn) \ { \ flags_vars(src_a, src_b); \ dest = _sa - _sb; \ @@ -2100,12 +2100,12 @@ u32 function_cc execute_##name##s(u32 rm, u32 rn) \ } \ #define data_proc_generate_add_function(name, src_a, src_b) \ -u32 function_cc execute_##name(u32 rm, u32 rn) \ +u32 execute_##name(u32 rm, u32 rn) \ { \ return (src_a) + (src_b); \ } \ \ -u32 function_cc execute_##name##s(u32 rm, u32 rn) \ +u32 execute_##name##s(u32 rm, u32 rn) \ { \ flags_vars(src_a, src_b); \ dest = _sa + _sb; \ @@ -2114,7 +2114,7 @@ u32 function_cc execute_##name##s(u32 rm, u32 rn) \ } \ #define data_proc_generate_sub_test_function(name, src_a, src_b) \ -void function_cc execute_##name(u32 rm, u32 rn) \ +void execute_##name(u32 rm, u32 rn) \ { \ flags_vars(src_a, src_b); \ dest = _sa - _sb; \ @@ -2122,7 +2122,7 @@ void function_cc execute_##name(u32 rm, u32 rn) \ } \ #define data_proc_generate_add_test_function(name, src_a, src_b) \ -void function_cc execute_##name(u32 rm, u32 rn) \ +void execute_##name(u32 rm, u32 rn) \ { \ flags_vars(src_a, src_b); \ dest = _sa + _sb; \ @@ -2130,14 +2130,14 @@ void function_cc execute_##name(u32 rm, u32 rn) \ } \ #define data_proc_generate_logic_test_function(name, expr) \ -void function_cc execute_##name(u32 rm, u32 rn) \ +void execute_##name(u32 rm, u32 rn) \ { \ u32 dest = expr; \ calculate_z_flag(dest); \ calculate_n_flag(dest); \ } \ -u32 function_cc execute_neg(u32 rm) \ +u32 execute_neg(u32 rm) \ { \ u32 dest = 0 - rm; \ calculate_flags_sub(dest, 0, rm); \ @@ -2166,7 +2166,7 @@ data_proc_generate_logic_test_function(teq, rn ^ rm); data_proc_generate_sub_test_function(cmp, rn, rm); data_proc_generate_add_test_function(cmn, rn, rm); -static void function_cc execute_swi(u32 pc) +static void execute_swi(u32 pc) { reg_mode[MODE_SUPERVISOR][6] = pc; collapse_flags(); @@ -2289,7 +2289,7 @@ u8 swi_hle_handle[256] = 0x0 // SWI 2A: SoundGetJumpList }; -void function_cc swi_hle_div() +void swi_hle_div(void) { s32 result = (s32)reg[0] / (s32)reg[1]; reg[1] = (s32)reg[0] % (s32)reg[1]; |