Commit f929aad6e397060983d5d61911110ef1e75d4af4

Authored by bellard
1 parent e309de25

MSDOS compatibility mode FPU exception support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@793 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 14 additions and 0 deletions
@@ -45,6 +45,18 @@ static void ioport80_write(void *opaque, uint32_t addr, uint32_t data) @@ -45,6 +45,18 @@ static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
45 { 45 {
46 } 46 }
47 47
  48 +/* MSDOS compatibility mode FPU exception support */
  49 +/* XXX: add IGNNE support */
  50 +void cpu_set_ferr(CPUX86State *s)
  51 +{
  52 + pic_set_irq(13, 1);
  53 +}
  54 +
  55 +static void ioportF0_write(void *opaque, uint32_t addr, uint32_t data)
  56 +{
  57 + pic_set_irq(13, 0);
  58 +}
  59 +
48 /* PC cmos mappings */ 60 /* PC cmos mappings */
49 61
50 #define REG_EQUIPMENT_BYTE 0x14 62 #define REG_EQUIPMENT_BYTE 0x14
@@ -371,6 +383,8 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device, @@ -371,6 +383,8 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
371 /* init basic PC hardware */ 383 /* init basic PC hardware */
372 register_ioport_write(0x80, 1, 1, ioport80_write, NULL); 384 register_ioport_write(0x80, 1, 1, ioport80_write, NULL);
373 385
  386 + register_ioport_write(0xf0, 1, 1, ioportF0_write, NULL);
  387 +
374 vga_initialize(ds, phys_ram_base + ram_size, ram_size, 388 vga_initialize(ds, phys_ram_base + ram_size, ram_size,
375 vga_ram_size); 389 vga_ram_size);
376 390