fixed VIA irq register access
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1513 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/cuda.c b/hw/cuda.c
index 98a2637..dec5ffb 100644
--- a/hw/cuda.c
+++ b/hw/cuda.c
@@ -298,9 +298,11 @@
break;
case 13:
val = s->ifr;
+ if (s->ifr & s->ier)
+ val |= 0x80;
break;
case 14:
- val = s->ier;
+ val = s->ier | 0x80;
break;
default:
case 15:
@@ -379,7 +381,6 @@
cuda_update_irq(s);
break;
case 14:
-#if 0
if (val & IER_SET) {
/* set bits */
s->ier |= val & 0x7f;
@@ -387,10 +388,6 @@
/* reset bits */
s->ier &= ~val;
}
-#else
- /* XXX: please explain me why the SPEC is not correct ! */
- s->ier = val;
-#endif
cuda_update_irq(s);
break;
default: