changeset 583:819921b76b4b

Use update_flags instead of individual set_flag calls in a few places
author Michael Pavone <pavone@retrodev.com>
date Fri, 07 Mar 2014 17:51:40 -0800
parents c05fcbfe1b1a
children b6713c1b6f55
files m68k_core_x86.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/m68k_core_x86.c	Fri Mar 07 17:42:29 2014 -0800
+++ b/m68k_core_x86.c	Fri Mar 07 17:51:40 2014 -0800
@@ -1270,9 +1270,7 @@
 	if (!special && end_off) {
 		*end_off = code->cur - (end_off + 1);
 	}
-	set_flag_cond(opts, CC_C, FLAG_C);
-	set_flag_cond(opts, CC_Z, FLAG_Z);
-	set_flag_cond(opts, CC_S, FLAG_N);
+	update_flags(opts, C|Z|N);
 	if (special && end_off) {
 		*end_off = code->cur - (end_off + 1);
 	}
@@ -1766,9 +1764,7 @@
 	cmp_ir(code, 0, RAX, SZ_W);
 	pop_r(code, RAX);
 	pop_r(code, RDX);
-	set_flag(opts, 0, FLAG_V);
-	set_flag_cond(opts, CC_Z, FLAG_Z);
-	set_flag_cond(opts, CC_S, FLAG_N);
+	update_flags(opts, V0|Z|N);
 	code_ptr end_off = code->cur + 1;
 	jmp(code, code->cur + 2);
 	*norm_off = code->cur - (norm_off + 1);