summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--gen_x86.c4
-rw-r--r--z80_to_x86.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 8c51ce8..bbd44f4 100644
--- a/Makefile
+++ b/Makefile
@@ -25,10 +25,10 @@ LIBS=sdl2 glew gl
endif #Darwin
ifdef DEBUG
-CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration
+CFLAGS:=-ggdb -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses
LDFLAGS:=-ggdb -lm $(shell pkg-config --libs $(LIBS))
else
-CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration
+CFLAGS:=-O2 -flto -std=gnu99 $(shell pkg-config --cflags-only-I $(LIBS)) -Wreturn-type -Werror=return-type -Werror=implicit-function-declaration -Wno-unused-value -Wno-logical-op-parentheses
LDFLAGS:=-O2 -flto -lm $(shell pkg-config --libs $(LIBS))
endif #DEBUG
endif #Windows
diff --git a/gen_x86.c b/gen_x86.c
index 97c1f3a..2bec3e8 100644
--- a/gen_x86.c
+++ b/gen_x86.c
@@ -2018,7 +2018,7 @@ void call_raxfallback(code_info *code, code_ptr fun)
disp >>= 8;
*(out++) = disp;
} else {
- mov_ir(code, fun, RAX, SZ_PTR);
+ mov_ir(code, (int64_t)fun, RAX, SZ_PTR);
call_r(code, RAX);
}
code->cur = out;
@@ -2228,7 +2228,7 @@ uint32_t x86_inst_size(code_ptr start)
if (*code & REX_QUAD) {
op_size = SZ_Q;
}
- } else if(*code == PRE_2BYTE || PRE_XOP) {
+ } else if(*code == PRE_2BYTE || *code == PRE_XOP) {
prefix = *code;
} else {
main_op = *code;
diff --git a/z80_to_x86.c b/z80_to_x86.c
index 1474da9..23b19b8 100644
--- a/z80_to_x86.c
+++ b/z80_to_x86.c
@@ -1951,7 +1951,7 @@ void translate_z80inst(z80inst * inst, z80_context * context, uint16_t address,
uint8_t * z80_interp_handler(uint8_t opcode, z80_context * context)
{
if (!context->interp_code[opcode]) {
- if (opcode == 0xCB || (opcode >= 0xDD && opcode & 0xF == 0xD)) {
+ if (opcode == 0xCB || (opcode >= 0xDD && (opcode & 0xF) == 0xD)) {
fprintf(stderr, "Encountered prefix byte %X at address %X. Z80 interpeter doesn't support those yet.", opcode, context->pc);
exit(1);
}