ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/uae_cpu/compiler/gencomp.c
(Generate patch)

Comparing BasiliskII/src/uae_cpu/compiler/gencomp.c (file contents):
Revision 1.3 by gbeauche, 2002-10-03T16:13:46Z vs.
Revision 1.6 by cebix, 2004-01-12T15:29:30Z

# Line 4 | Line 4
4   *  Based on work Copyright 1995, 1996 Bernd Schmidt
5   *  Changes for UAE-JIT Copyright 2000 Bernd Meyer
6   *
7 < *  Adaptation for Basilisk II and improvements, copyright 2000-2002
7 > *  Adaptation for Basilisk II and improvements, copyright 2000-2004
8   *    Gwenole Beauchesne
9   *
10 < *  Basilisk II (C) 1997-2002 Christian Bauer
10 > *  Basilisk II (C) 1997-2004 Christian Bauer
11   *  
12   *  This program is free software; you can redistribute it and/or modify
13   *  it under the terms of the GNU General Public License as published by
# Line 1120 | Line 1120 | genflags (flagtypes type, wordsizes size
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 <                      "\tbsf_l_rr(zero,zero);\n"
1126 >                      "\tsetzflg_l(zero);\n"
1127 >                      "\tlive_flags();\n"
1128                        "\t}\n");
1127            comprintf("\tlive_flags();\n");
1129              comprintf("\tend_needflags();\n");
1130              duplicate_carry();
1131              comprintf("if (!(needed_flags & FLAG_CZNV)) dont_care_flags();\n");
# Line 1381 | Line 1382 | gen_opcode (unsigned long int opcode)
1382               case i_BTST: op="bt"; need_write=0; break;
1383              }
1384              comprintf("\t%s_l_rr(dst,s);\n"  /* Answer now in C */
1385 <                      "\tsbb_l(s,s);\n" /* s is 0 if bit was 0,
1386 <                                           -1 otherwise */
1387 <                      "\tmake_flags_live();\n" /* Get the flags back */
1388 <                      "\tdont_care_flags();\n"
1389 <                      "\tstart_needflags();\n"
1390 <                      "\tbsf_l_rr(s,s);\n"
1391 <                      "\tlive_flags();\n"
1392 <                      "\tend_needflags();\n",op);
1385 >                                  "\tsbb_l(s,s);\n" /* s is 0 if bit was 0, -1 otherwise */
1386 >                                  "\tmake_flags_live();\n" /* Get the flags back */
1387 >                                  "\tdont_care_flags();\n",op);
1388 >                if (!noflags) {
1389 >                  comprintf("\tstart_needflags();\n"
1390 >                                        "\tsetzflg_l(s);\n"
1391 >                                        "\tlive_flags();\n"
1392 >                                        "\tend_needflags();\n");
1393 >                }
1394              if (need_write)
1395                  genastore ("dst", curi->dmode, "dstreg", curi->size, "dst");
1396          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines