~pmdj/ubuntu/trusty/qemu/2.9+applesmc+fadtv3

« back to all changes in this revision

Viewing changes to roms/openbios/include/arch/sparc32/types.h

  • Committer: Phil Dennis-Jordan
  • Date: 2017-07-21 08:03:43 UTC
  • mfrom: (1.1.1)
  • Revision ID: phil@philjordan.eu-20170721080343-2yr2vdj7713czahv
New upstream release 2.9.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* tag: data types for forth engine
 
2
 *
 
3
 * Copyright (C) 2003-2005 Patrick Mauritz, Stefan Reinauer
 
4
 *
 
5
 * See the file "COPYING" for further information about
 
6
 * the copyright and warranty status of this work.
 
7
 */
 
8
 
 
9
#ifndef __TYPES_H
 
10
#define __TYPES_H
 
11
 
 
12
#include "mconfig.h"
 
13
 
 
14
#ifdef BOOTSTRAP
 
15
#include <inttypes.h>
 
16
#else
 
17
typedef unsigned char   uint8_t;
 
18
typedef unsigned short  uint16_t;
 
19
typedef unsigned int    uint32_t;
 
20
typedef unsigned long long uint64_t;
 
21
typedef unsigned long   uintptr_t;
 
22
 
 
23
typedef signed char     int8_t;
 
24
typedef short           int16_t;
 
25
typedef int             int32_t;
 
26
typedef long long       int64_t;
 
27
typedef long            intptr_t;
 
28
 
 
29
#define PRId32 "d"
 
30
#define PRIu32 "u"
 
31
#define PRIx32 "x"
 
32
#define PRIX32 "X"
 
33
#define PRId64 "lld"
 
34
#define PRIu64 "llu"
 
35
#define PRIx64 "llx"
 
36
#define PRIX64 "llX"
 
37
#endif
 
38
 
 
39
/* endianness */
 
40
#include "autoconf.h"
 
41
 
 
42
/* physical address: 36 bits */
 
43
 
 
44
typedef uint64_t phys_addr_t;
 
45
 
 
46
#define FMT_plx "%09" PRIx64
 
47
 
 
48
/* cell based types */
 
49
 
 
50
typedef int32_t         cell;
 
51
typedef uint32_t        ucell;
 
52
typedef long long       dcell;
 
53
typedef unsigned long long ducell;
 
54
 
 
55
#define FMT_cell    "%" PRId32
 
56
#define FMT_ucell   "%" PRIu32
 
57
#define FMT_ucellx  "%08" PRIx32
 
58
#define FMT_ucellX  "%08" PRIX32
 
59
 
 
60
typedef int32_t         prom_arg_t;
 
61
typedef uint32_t        prom_uarg_t;
 
62
 
 
63
#define PRIdPROMARG     PRId32
 
64
#define PRIuPROMARG     PRIu32
 
65
#define PRIxPROMARG     PRIx32
 
66
#define FMT_prom_arg    "%" PRIdPROMARG
 
67
#define FMT_prom_uarg   "%" PRIuPROMARG
 
68
#define FMT_prom_uargx  "%08" PRIxPROMARG
 
69
 
 
70
#define FMT_elf     "%#x"
 
71
#define FMT_sizet   "%lx"
 
72
#define FMT_aout_ehdr  "%lx"
 
73
 
 
74
#define bitspercell     (sizeof(cell)<<3)
 
75
#define bitsperdcell    (sizeof(dcell)<<3)
 
76
 
 
77
#define BITS            32
 
78
 
 
79
#define PAGE_SHIFT      12
 
80
 
 
81
/* size named types */
 
82
 
 
83
typedef unsigned char   u8;
 
84
typedef unsigned short u16;
 
85
typedef unsigned int   u32;
 
86
typedef unsigned long long u64;
 
87
 
 
88
typedef signed char     s8;
 
89
typedef short           s16;
 
90
typedef int             s32;
 
91
typedef long long       s64;
 
92
 
 
93
#endif