@@ -618,26 +618,4 @@ static inline uint64_t half_unshuffle64(uint64_t x)
return x;
}
-/**
- * bitrev8:
- * @x: 8-bit value to be reversed
- *
- * Given an input value with bits::
- *
- * ABCDEFGH
- *
- * return the value with its bits reversed from left to right::
- *
- * HGFEDCBA
- *
- * Returns: the bit-reversed value.
- */
-static inline uint8_t bitrev8(uint8_t x)
-{
- x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
- x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
- x = (x >> 4) | (x << 4) ;
- return x;
-}
-
#endif
@@ -334,7 +334,7 @@ static void q800_init(MachineState *machine)
prom = memory_region_get_ram_ptr(dp8393x_prom);
checksum = 0;
for (i = 0; i < 6; i++) {
- prom[i] = bitrev8(nd_table[0].macaddr.a[i]);
+ prom[i] = revbit8(nd_table[0].macaddr.a[i]);
checksum ^= prom[i];
}
prom[7] = 0xff - checksum;