datatypes.h File Reference


Detailed Description

Contains the datatype definitions for use with Microsoft Visual C++ and Linux.

Id
datatypes.h,v 1.20 2008/03/26 19:25:40 iamcamiel Exp

X-1.20 Camiel Vanderhoeven 26-MAR-2008 Use config.h information.

X-1.19 Camiel Vanderhoeven 14-MAR-2008 Formatting.

X-1.18 Camiel Vanderhoeven 14-MAR-2008 1. More meaningful exceptions replace throwing (int) 1. 2. U64 macro replaces X64 macro.

X-1.17 Alex 20-FEB-2008 GNU compiler support on Windows.

X-1.16 Camiel Vanderhoeven 01-FEB-2008 Avoid unnecessary shift-operations to calculate constant values.

X-1.15 Camiel Vanderhoeven 18-JAN-2008 Replaced sext_64 inlines with sext_u64_<bits> inlines for performance reasons (thanks to David Hittner for spotting this!)

X-1.14 Camiel Vanderhoeven 14-DEC-2007 Added sext_32.

X-1.13 Camiel Vanderhoeven 2-DEC-2007 Added various bitmask operations as inline functions.

X-1.12 Camiel Vanderhoeven 1-DEC-2007 Use __int8, __int16 and __int32 on windows, instead of char, short, long. This makes us compatible with SDL.

X-1.11 Camiel Vanderhoeven 15-NOV-2007 Use typedefs in stead of define's

X-1.10 Camiel Vanderhoeven 14-NOV-2007 Added BSD-style definitions.

X-1.9 Camiel Vanderhoeven 30-MAR-2007 Added old changelog comments.

X-1.8 Camiel Vanderhoeven 1-MAR-2007 Used typedef's instead of define's (conflict with Solaris' libc)

X-1.7 Camiel Vanderhoeven 27-FEB-2007 OpenVMS support added.

X-1.6 Camiel Vanderhoeven 16-FEB-2007 Added definition of "LL" for printf and scanf statements.

X-1.5 Camiel Vanderhoeven 12-FEB-2007 Added comments.

X-1.4 Camiel Vanderhoeven 7-FEB-2007 Added comments.

X-1.3 Brian Wheeler 3-FEB-2007 Formatting.

X-1.2 Brian Wheeler 3-FEB-2007 Linux support added.

X-1.1 Camiel Vanderhoeven 19-JAN-2007 Initial version in CVS.

Author:
Camiel Vanderhoeven (camiel@camicom.com / http://www.camicom.com)

Definition in file datatypes.h.

Go to the source code of this file.

Defines

#define INCLUDED_DATATYPES_H
#define U64(a)   a##ui64
#define LL   "I64"
#define HAVE_U_INT8_T   1
#define HAVE_INT8_T   1
#define HAVE_U_INT16_T   1
#define HAVE_INT16_T   1
#define HAVE_U_INT32_T   1
#define HAVE_INT32_T   1
#define HAVE_U_INT64_T   1
#define HAVE_INT64_T   1

Typedefs

typedef uint8_t u8
typedef uint16_t u16
typedef uint32_t u32
typedef uint64_t u64
typedef int8_t s8
typedef int16_t s16
typedef int32_t s32
typedef int64_t s64
typedef u8 u_int8_t
typedef u16 u_int16_t
typedef u32 u_int32_t
typedef u64 u_int64_t

Functions

u64 sext_u64_8 (u64 a)
 Sign-extend an 8-bit value to 64 bits.
u64 sext_u64_12 (u64 a)
 Sign-extend a 12-bit value to 64 bits.
u64 sext_u64_13 (u64 a)
 Sign-extend a 13-bit value to 64 bits.
u64 sext_u64_16 (u64 a)
 Sign-extend an 16-bit value to 64 bits.
u64 sext_u64_21 (u64 a)
 Sign-extend a 21-bit value to 64 bits.
u64 sext_u64_32 (u64 a)
 Sign-extend a 32-bit value to 64 bits.
u64 sext_u64_48 (u64 a)
 Sign-extend a 48-bit value to 64 bits.
bool test_bit_64 (u64 x, int bit)
u32 sext_u32_24 (u32 a)
 Sign-extend a 24-bit value to 32 bits.


Define Documentation

#define HAVE_INT16_T   1

Definition at line 139 of file datatypes.h.

#define HAVE_INT32_T   1

Definition at line 141 of file datatypes.h.

#define HAVE_INT64_T   1

Definition at line 143 of file datatypes.h.

#define HAVE_INT8_T   1

Definition at line 137 of file datatypes.h.

#define HAVE_U_INT16_T   1

Definition at line 138 of file datatypes.h.

#define HAVE_U_INT32_T   1

Definition at line 140 of file datatypes.h.

#define HAVE_U_INT64_T   1

Definition at line 142 of file datatypes.h.

#define HAVE_U_INT8_T   1

Definition at line 136 of file datatypes.h.

#define INCLUDED_DATATYPES_H

Definition at line 98 of file datatypes.h.

#define LL   "I64"

#define U64 (  )     a##ui64

Definition at line 110 of file datatypes.h.

Referenced by CPCIDevice::add_legacy_io(), CPCIDevice::add_legacy_mem(), CSystem::cchip_csr_write(), CDMA::CDMA(), CDPR::CDPR(), CFlash::CFlash(), CFloppyController::CFloppyController(), CSystem::clear_clock_int(), CPort80::CPort80(), CSystem::CSystem(), d2host(), CAlphaCPU::execute(), f2host(), CAlphaCPU::get_clean_pc(), CAlphaCPU::get_hwpcb(), CAlphaCPU::get_icache(), CTraceEngine::get_prbr(), CAlphaCPU::get_prbr(), host2d(), host2f(), host2g(), host2s(), host2t(), i_isnan(), CAlphaCPU::ieee_norm(), CAlphaCPU::ieee_trap(), CSerial::init(), CKeyboard::init(), CAlphaCPU::init(), CAliM1543C::init(), CSystem::interrupt(), CAlphaCPU::irq_h(), itof_f(), CTraceEngine::list_all(), load_f(), load_g(), load_s(), CSystem::LoadROM(), CTraceEngine::parse(), CSystem::pchip_csr_write(), CSystem::PCI_Phys(), CTraceEngine::read_procfile(), CSystem::ReadMem(), real_address(), CPCIDevice::register_bar(), CPCIDevice::ResetPCI(), CTraceEngine::run_script(), s2host(), CAlphaCPU::set_PAL_BASE(), CTraceEngine::set_waitfor(), sext_u64_12(), sext_u64_13(), sext_u64_16(), sext_u64_21(), sext_u64_32(), sext_u64_48(), sext_u64_8(), store_f(), store_g(), test_bit_64(), CTraceEngine::trace(), CTraceEngine::trace_br(), CAlphaCPU::va_form(), CAlphaCPU::vax_norm(), CAlphaCPU::vmspal_call_mfpr_tbchk(), CAlphaCPU::vmspal_call_mtpr_datfx(), CAlphaCPU::vmspal_call_mtpr_ipl(), CAlphaCPU::vmspal_call_mtpr_mces(), CAlphaCPU::vmspal_call_mtpr_scbb(), CAlphaCPU::vmspal_call_rd_ps(), CAlphaCPU::vmspal_call_rei(), CAlphaCPU::vmspal_call_rscc(), CAlphaCPU::vmspal_call_swpctx(), CAlphaCPU::vmspal_call_wr_ps_sw(), CAlphaCPU::vmspal_ent_dfault(), CAlphaCPU::vmspal_ent_dtbm_double_3(), CAlphaCPU::vmspal_ent_dtbm_single(), CAlphaCPU::vmspal_ent_ext_int(), CAlphaCPU::vmspal_ent_itbm(), CAlphaCPU::vmspal_int_initiate_exception(), CAlphaCPU::vmspal_int_initiate_interrupt(), CTraceEngine::write_arglist(), CSystem::WriteMem(), and CPCIDevice::WriteMem().


Typedef Documentation

typedef int16_t s16

Definition at line 127 of file datatypes.h.

typedef int32_t s32

Definition at line 128 of file datatypes.h.

typedef int64_t s64

Definition at line 129 of file datatypes.h.

typedef int8_t s8

Definition at line 126 of file datatypes.h.

typedef uint16_t u16

Definition at line 122 of file datatypes.h.

typedef uint32_t u32

Definition at line 123 of file datatypes.h.

typedef uint64_t u64

Definition at line 124 of file datatypes.h.

typedef uint8_t u8

Definition at line 121 of file datatypes.h.

typedef u16 u_int16_t

Definition at line 132 of file datatypes.h.

typedef u32 u_int32_t

Definition at line 133 of file datatypes.h.

typedef u64 u_int64_t

Definition at line 134 of file datatypes.h.

typedef u8 u_int8_t

Definition at line 131 of file datatypes.h.


Function Documentation

u32 sext_u32_24 ( u32  a  )  [inline]

u64 sext_u64_12 ( u64  a  )  [inline]

Sign-extend a 12-bit value to 64 bits.

Definition at line 160 of file datatypes.h.

References U64.

u64 sext_u64_13 ( u64  a  )  [inline]

Sign-extend a 13-bit value to 64 bits.

Definition at line 172 of file datatypes.h.

References U64.

u64 sext_u64_16 ( u64  a  )  [inline]

Sign-extend an 16-bit value to 64 bits.

Definition at line 184 of file datatypes.h.

References U64.

u64 sext_u64_21 ( u64  a  )  [inline]

Sign-extend a 21-bit value to 64 bits.

Definition at line 196 of file datatypes.h.

References U64.

u64 sext_u64_32 ( u64  a  )  [inline]

Sign-extend a 32-bit value to 64 bits.

Definition at line 208 of file datatypes.h.

References U64.

u64 sext_u64_48 ( u64  a  )  [inline]

Sign-extend a 48-bit value to 64 bits.

Definition at line 220 of file datatypes.h.

References U64.

u64 sext_u64_8 ( u64  a  )  [inline]

Sign-extend an 8-bit value to 64 bits.

Definition at line 148 of file datatypes.h.

References U64.

bool test_bit_64 ( u64  x,
int  bit 
) [inline]


SourceForge.net Logo
Project space on SourceForge.net