1 // cgen-types.h - Types for CGEN-based SID simulators. -*- C++ -*-
3 // Copyright (C) 1999, 2000 Red Hat.
4 // This file is part of SID and is licensed under the GPL.
5 // See the file COPYING.SID for conditions for redistribution.
16 typedef sid::signed_host_int_1 QI;
17 typedef sid::signed_host_int_2 HI;
18 typedef sid::signed_host_int_4 SI;
19 typedef sid::signed_host_int_8 DI;
21 typedef sid::host_int_1 UQI;
22 typedef sid::host_int_2 UHI;
23 typedef sid::host_int_4 USI;
24 typedef sid::host_int_8 UDI;
26 #define GETLODI(di) ((SI) (di))
27 #define GETHIDI(di) ((SI) ((UDI) (di) >> 32))
28 #define SETLODI(di, val) ((di) = (((di) & 0xffffffff00000000LL) | (val)))
29 #define SETHIDI(di, val) ((di) = (((di) & 0xffffffffLL) | (((DI) (val)) << 32)))
30 #define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo))
31 #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
33 // Variable width small ints.
35 typedef unsigned int UINT;
38 // Instruction addresses.
39 typedef unsigned long IADDR;
41 typedef unsigned long ADDR;
47 #endif // CGEN_TYPES_H