comparison jagcpu_x86.c @ 1594:137dbd05ceab

Fix some issues identified by cppcheck
author Michael Pavone <pavone@retrodev.com>
date Fri, 29 Jun 2018 09:33:23 -0700
parents c1e78a101912
children
comparison
equal deleted inserted replaced
1593:24508cb54f87 1594:137dbd05ceab
100 //check for a scoreboard delay 100 //check for a scoreboard delay
101 cmp_ir(code, reg, opts->resultreg, SZ_B); 101 cmp_ir(code, reg, opts->resultreg, SZ_B);
102 code_ptr no_delay = code-.cur + 1; 102 code_ptr no_delay = code-.cur + 1;
103 jcc(code, CC_NZ, no_delay + 1); 103 jcc(code, CC_NZ, no_delay + 1);
104 ccylces(code, 1); 104 ccylces(code, 1);
105 *no_delay = code->cur - (no_delay = 1); 105 *no_delay = code->cur - (no_delay + 1);
106 *no_result = code->cur - (no_result + 1); 106 *no_result = code->cur - (no_result + 1);
107 mov_rr(code, opts->resultreg, opts->writeback, SZ_B); 107 mov_rr(code, opts->resultreg, opts->writeback, SZ_B);
108 } 108 }
109 109
110 void translate_jag_quickimmed(jag_cpu_options *opts, uint32_t address, uint16_t opcode, uint32_t value, uint16_t dest) 110 void translate_jag_quickimmed(jag_cpu_options *opts, uint32_t address, uint16_t opcode, uint32_t value, uint16_t dest)
120 } 120 }
121 121
122 122
123 uint16_t *translate_jag_inst(uint16_t *stream, jag_cpu_options *opts, uint32_t address) 123 uint16_t *translate_jag_inst(uint16_t *stream, jag_cpu_options *opts, uint32_t address)
124 { 124 {
125 uint16_t inst = *stream 125 uint16_t inst = *stream;
126 ++stream; 126 ++stream;
127 uint16_t opcode = jag_opcode(inst, opts->is_gpu); 127 uint16_t opcode = jag_opcode(inst, opts->is_gpu);
128 check_cycles_int(&opts->gen, address); 128 check_cycles_int(&opts->gen, address);
129 code_info *code = &opts->gen.code; 129 code_info *code = &opts->gen.code;
130 switch (opcode) 130 switch (opcode)