X-1.6 Camiel Vanderhoeven 14-MAR-2008 1. More meaningful exceptions replace throwing (int) 1. 2. U64 macro replaces X64 macro.
X-1.5 Camiel Vanderhoeven 04-JAN-2008 Added swap_xx macro's for use in places where bytes need to be swapped regardless of endianess.
X-1.4 Camiel Vanderhoeven 03-JAN-2008 Attempt to make PCI base device endianess-correct.
X-1.3 Fang Zhe 02-JAN-2008 Recognize endianess on more architectures.
X-1.2 Camiel Vanderhoeven 30-MAR-2007 Added old changelog comments.
X-1.1 Brian Wheeler 8-MAR-2007 Renamed this file from endian.h to es40_endian.h to avoid conflicts with system-include files.
X-A1-1.2 Camiel Vanderhoeven 7-MAR-2007 Properly handle OpenVMS
X-A1-1.1 Camiel Vanderhoeven 1-MAR-2007 File created to support the Solaris/SPARC port.
Definition in file es40_endian.h.
Go to the source code of this file.
Defines | |
| #define | INCLUDED_ENDIAN_H |
| #define | ES40_LITTLE_ENDIAN |
| #define | swap_64(x) |
| #define | swap_32(x) |
| #define | swap_16(x) ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8)) |
| #define | swap_8(x) ((x) & 0xff) |
| #define | endian_64(x) (x) |
| #define | endian_32(x) ((x) & 0xffffffff) |
| #define | endian_16(x) ((x) & 0xffff) |
| #define | endian_8(x) ((x) & 0xff) |
Functions | |
| u64 | endian_bits (u64 x, int numbits) |
| #define endian_16 | ( | x | ) | ((x) & 0xffff) |
Definition at line 112 of file es40_endian.h.
Referenced by CPCIDevice::config_read(), CPCIDevice::config_write(), CPCIDevice::do_pci_read(), CPCIDevice::do_pci_write(), endian_bits(), CAliM1543C_ide::execute(), CSystem::ReadMem(), CS3Trio64::rom_read(), CCirrus::rom_read(), and CSystem::WriteMem().
| #define endian_32 | ( | x | ) | ((x) & 0xffffffff) |
Definition at line 111 of file es40_endian.h.
Referenced by CPCIDevice::add_function(), CPCIDevice::config_read(), CPCIDevice::config_write(), CAliM1543C_ide::do_dma_transfer(), CPCIDevice::do_pci_interrupt(), CPCIDevice::do_pci_read(), CPCIDevice::do_pci_write(), endian_bits(), CAlphaCPU::get_icache(), CAliM1543C_ide::ide_busmaster_write(), CSystem::ReadMem(), CPCIDevice::ReadMem(), CPCIDevice::ResetPCI(), CS3Trio64::rom_read(), CCirrus::rom_read(), CSystem::WriteMem(), and CPCIDevice::WriteMem().
| #define endian_64 | ( | x | ) | (x) |
Definition at line 110 of file es40_endian.h.
Referenced by endian_bits(), CSystem::LoadROM(), CSystem::ReadMem(), and CSystem::WriteMem().
| #define endian_8 | ( | x | ) | ((x) & 0xff) |
Definition at line 113 of file es40_endian.h.
Referenced by CPCIDevice::config_read(), CPCIDevice::config_write(), endian_bits(), CS3Trio64::rom_read(), and CCirrus::rom_read().
| #define ES40_LITTLE_ENDIAN |
Definition at line 66 of file es40_endian.h.
| #define INCLUDED_ENDIAN_H |
Definition at line 62 of file es40_endian.h.
| #define swap_16 | ( | x | ) | ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8)) |
Definition at line 102 of file es40_endian.h.
| #define swap_32 | ( | x | ) |
Value:
( \
(((x) & 0x000000ff) << 24) | (((x) & 0x0000ff00) << 8) | \
(((x) & 0x00ff0000) >> 8) | (((x) & 0xff000000) >> 24) \
)
Definition at line 97 of file es40_endian.h.
| #define swap_64 | ( | x | ) |
Value:
( \
(((x) & U64(0x00000000000000ff)) << 56) | \
(((x) & U64(0x000000000000ff00)) << 40) | \
(((x) & U64(0x0000000000ff0000)) << 24) | \
(((x) & U64(0x00000000ff000000)) << 8) | \
(((x) & U64(0x000000ff00000000)) >> 8) | \
(((x) & U64(0x0000ff0000000000)) >> 24) | \
(((x) & U64(0x00ff000000000000)) >> 40) | \
(((x) & U64(0xff00000000000000)) >> 56) \
)
Definition at line 86 of file es40_endian.h.
| #define swap_8 | ( | x | ) | ((x) & 0xff) |
Definition at line 103 of file es40_endian.h.
Definition at line 115 of file es40_endian.h.
References endian_16, endian_32, endian_64, endian_8, and FAILURE.
Referenced by CDEC21143::WriteMem_Bar().