41 |
|
#define uses_cmov global_cmov=1 |
42 |
|
#define mayfail global_mayfail=1 |
43 |
|
#define uses_fpu global_fpu=1 |
44 |
– |
#define uses_setzflg global_setzflg=1 |
44 |
|
|
45 |
|
int hack_opcode; |
46 |
|
|
52 |
|
static int long_opcode; |
53 |
|
static int global_mayfail; |
54 |
|
static int global_fpu; |
56 |
– |
static int global_setzflg; |
55 |
|
|
56 |
|
static char endstr[1000]; |
57 |
|
static char lines[100000]; |
1086 |
|
|
1087 |
|
case flag_addx: |
1088 |
|
case flag_subx: |
1091 |
– |
uses_setzflg; |
1089 |
|
uses_cmov; |
1090 |
|
comprintf("\tdont_care_flags();\n"); |
1091 |
|
{ |
1120 |
|
"\t%s_l(%s,%s);\n",op,dst,src); |
1121 |
|
break; |
1122 |
|
} |
1123 |
+ |
comprintf("\tlive_flags();\n"); |
1124 |
|
comprintf("\tif (needed_flags&FLAG_Z) {\n" |
1125 |
|
"\tcmov_l_rr(zero,one,5);\n" |
1126 |
|
"\tsetzflg_l(zero);\n" |
1127 |
+ |
"\tlive_flags();\n" |
1128 |
|
"\t}\n"); |
1130 |
– |
comprintf("\tlive_flags();\n"); |
1129 |
|
comprintf("\tend_needflags();\n"); |
1130 |
|
duplicate_carry(); |
1131 |
|
comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n"); |
1386 |
|
"\tmake_flags_live();\n" /* Get the flags back */ |
1387 |
|
"\tdont_care_flags();\n",op); |
1388 |
|
if (!noflags) { |
1391 |
– |
uses_setzflg; |
1389 |
|
comprintf("\tstart_needflags();\n" |
1390 |
|
"\tsetzflg_l(s);\n" |
1391 |
|
"\tlive_flags();\n" |
2943 |
|
if (global_isaddx) flags|=8; |
2944 |
|
if (global_iscjump) flags|=16; |
2945 |
|
if (global_fpu) flags|=32; |
2949 |
– |
if (global_setzflg) flags|=64; |
2946 |
|
|
2947 |
|
comprintf ("}\n"); |
2948 |
|
|