Revision 75f76531

b/hw/lsi53c895a.c
1314 1314
static uint8_t lsi_reg_readb(LSIState *s, int offset)
1315 1315
{
1316 1316
    uint8_t tmp;
1317
#define CASE_GET_REG24(name, addr) \
1318
    case addr: return s->name & 0xff; \
1319
    case addr + 1: return (s->name >> 8) & 0xff; \
1320
    case addr + 2: return (s->name >> 16) & 0xff;
1321

  
1317 1322
#define CASE_GET_REG32(name, addr) \
1318 1323
    case addr: return s->name & 0xff; \
1319 1324
    case addr + 1: return (s->name >> 8) & 0xff; \
......
1389 1394
        return s->ctest5;
1390 1395
    case 0x23: /* CTEST6 */
1391 1396
         return 0;
1392
    case 0x24: /* DBC[0:7] */
1393
        return s->dbc & 0xff;
1394
    case 0x25: /* DBC[8:15] */
1395
        return (s->dbc >> 8) & 0xff;
1396
    case 0x26: /* DBC[16->23] */
1397
        return (s->dbc >> 16) & 0xff;
1397
    CASE_GET_REG24(dbc, 0x24)
1398 1398
    case 0x27: /* DCMD */
1399 1399
        return s->dcmd;
1400 1400
    CASE_GET_REG32(dsp, 0x2c)
......
1477 1477
    }
1478 1478
    BADF("readb 0x%x\n", offset);
1479 1479
    exit(1);
1480
#undef CASE_GET_REG24
1480 1481
#undef CASE_GET_REG32
1481 1482
}
1482 1483

  

Also available in: Unified diff