Skip to contentSkip to conversation

qemu/hw openpic.c

Qemu-devel Fabrice Bellard 2 participants 3 messages Feb 9, 2005

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · Fabrice Bellard

CVSROOT: /cvsroot/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 05/02/09 00:01:34

Quoted 8 lines

Modified files:
hw : openpic.c

Log message:
spelling fix

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/hw/openpic.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

There was another change in openpic.c that I haven't seen committed:

@@ -629,7 +629,7 @@

         break;
     case 0x10: /* TIBC */
 	if ((opp->timers[idx].ticc & 0x80000000) != 0 &&
-	    (val & 0x800000000) == 0 &&
+	    (val & 0x80000000) == 0 &&
             (opp->timers[idx].tibc & 0x80000000) != 0)

opp->timers[idx].ticc &= ~0x80000000;
opp->timers[idx].tibc = val;

It's because the constant 0x800000000 is larger than a uint32_t (it appears that the way it was will always cause "(val & 0x800000000) == 0" to always be true). I haven't tested it - I just made the change because it looked "obvious". Please let me know if there's some black magic that this "fix" breaks.

#2 lore raw

This fix was already commited in the CVS.

Fabrice.

Quoted 46 lines · Thayne Harbaugh
Quoted 5 lines · Fabrice Bellard

CVSROOT: /cvsroot/qemu
Module name: qemu
Branch:
Changes by: Fabrice Bellard <[email protected]> 05/02/09 00:01:34

Quoted 8 lines

Modified files:
hw : openpic.c

Log message:
spelling fix

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/qemu/qemu/hw/openpic.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text

There was another change in openpic.c that I haven't seen committed:

(quoted diff) +1 -1
@@ -629,7 +629,7 @@
         break;
     case 0x10: /* TIBC */
 	if ((opp->timers[idx].ticc & 0x80000000) != 0 &&
-	    (val & 0x800000000) == 0 &&
+	    (val & 0x80000000) == 0 &&
             (opp->timers[idx].tibc & 0x80000000) != 0)
 	    opp->timers[idx].ticc &= ~0x80000000;
 	opp->timers[idx].tibc = val;

It's because the constant 0x800000000 is larger than a uint32_t (it appears that the way it was will always cause "(val & 0x800000000) == 0" to always be true). I haven't tested it - I just made the change because it looked "obvious". Please let me know if there's some black magic that this "fix" breaks.

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel