Project: fixed some warnings from other compilers
This commit is contained in:
parent
ed415511dc
commit
79577d7b4e
4
Makefile
4
Makefile
@ -24,7 +24,7 @@ all:test.rom
|
|||||||
|
|
||||||
first: ${OBJECT_FILES}
|
first: ${OBJECT_FILES}
|
||||||
${QUIET_LINK}
|
${QUIET_LINK}
|
||||||
${Q}gcc -ggdb $^ -fsanitize=address -lncurses -ltinfo -o $@
|
${Q}gcc -ggdb $^ -fsanitize=address -fsanitize=undefined -fsanitize=leak -lncursesw -ltinfow -o $@
|
||||||
|
|
||||||
%.rom:%.asm first
|
%.rom:%.asm first
|
||||||
$(QUIET_FAS)
|
$(QUIET_FAS)
|
||||||
@ -32,7 +32,7 @@ first: ${OBJECT_FILES}
|
|||||||
|
|
||||||
%.o:%.c
|
%.o:%.c
|
||||||
${QUIET_CC}
|
${QUIET_CC}
|
||||||
${Q} gcc -ggdb -c $< -Wall -Wextra -Werror -fsanitize=address
|
${Q}gcc -ggdb -c $< -Wall -Wextra -Werror -fsanitize=address
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
2
cpu.c
2
cpu.c
@ -227,10 +227,10 @@ void free_exec_data(struct exec_data_t *tofree){
|
|||||||
}
|
}
|
||||||
int exec(struct simdata_t *simdata){
|
int exec(struct simdata_t *simdata){
|
||||||
free_instr_list(&simdata->cpu_gui_hints->executing_list);
|
free_instr_list(&simdata->cpu_gui_hints->executing_list);
|
||||||
|
int condition=0;
|
||||||
switch(simdata->exec_data->EXEC_ACTION){
|
switch(simdata->exec_data->EXEC_ACTION){
|
||||||
case CALL:
|
case CALL:
|
||||||
case JUMP:
|
case JUMP:
|
||||||
int condition=0;
|
|
||||||
switch(simdata->exec_data->COND){
|
switch(simdata->exec_data->COND){
|
||||||
case NONE: condition=1; break;
|
case NONE: condition=1; break;
|
||||||
case ZERO: condition=simdata->registers->FLAGS&1; break;
|
case ZERO: condition=simdata->registers->FLAGS&1; break;
|
||||||
|
2
gui.c
2
gui.c
@ -484,7 +484,7 @@ int update_general_registers(struct simdata_t *simdata){
|
|||||||
for(int i=0;i<per_line;i++){
|
for(int i=0;i<per_line;i++){
|
||||||
if(n<8){
|
if(n<8){
|
||||||
float float_equiv=*(float*)(simdata->registers->GPR+n);
|
float float_equiv=*(float*)(simdata->registers->GPR+n);
|
||||||
if(float_equiv<9999999999&&float_equiv>-9999999999)
|
if(float_equiv<9999999999.0&&float_equiv>-9999999999.0)
|
||||||
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%08f) ",n,simdata->registers->GPR[n],float_equiv);
|
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%08f) ",n,simdata->registers->GPR[n],float_equiv);
|
||||||
else
|
else
|
||||||
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%cinf) ",n,simdata->registers->GPR[n],(float_equiv>0)?'+':'-');
|
mvwprintw(general_registers,1+y+center_y_offset,1+i*35+center_x_offset,"R%d: %08X (%cinf) ",n,simdata->registers->GPR[n],(float_equiv>0)?'+':'-');
|
||||||
|
Loading…
Reference in New Issue
Block a user