1 // cgen-types.h - Types for CGEN-based SID simulators. -*- C++ -*-
3 // Copyright (C) 1999, 2000, 2010 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.
17 typedef sid::signed_host_int_1 QI;
18 typedef sid::signed_host_int_2 HI;
19 typedef sid::signed_host_int_4 SI;
20 typedef sid::signed_host_int_8 DI;
22 typedef sid::host_int_1 UQI;
23 typedef sid::host_int_2 UHI;
24 typedef sid::host_int_4 USI;
25 typedef sid::host_int_8 UDI;
30 #define GETLODI(di) ((SI) (di))
31 #define GETHIDI(di) ((SI) ((UDI) (di) >> 32))
32 #define SETLODI(di, val) ((di) = (((di) & 0xffffffff00000000LL) | (val)))
33 #define SETHIDI(di, val) ((di) = (((di) & 0xffffffffLL) | (((DI) (val)) << 32)))
34 #define SETDI(di, hi, lo) ((di) = MAKEDI (hi, lo))
35 #define MAKEDI(hi, lo) ((((DI) (SI) (hi)) << 32) | ((UDI) (USI) (lo)))
37 // Variable width small ints.
39 typedef unsigned int UINT;
42 // Instruction addresses.
43 typedef unsigned long IADDR;
45 typedef unsigned long ADDR;
49 // Builtin floating point conversion kinds.
50 // The values here are defined by cgen.
54 FPCONV_TIES_TO_EVEN = 1,
55 FPCONV_TIES_TO_AWAY = 2,
56 FPCONV_TOWARD_ZERO = 3,
57 FPCONV_TOWARD_POSITIVE = 4,
58 FPCONV_TOWARD_NEGATIVE = 5
63 #endif // CGEN_TYPES_H