/* MakeBit */
-#define _BITn(WIDTH, pos) (((natural##WIDTH)(1)) \
+#define _BITn(WIDTH, pos) (((uint##WIDTH##_t)(1)) \
<< _MAKE_SHIFT(WIDTH, pos))
#define BIT4(POS) (1 << _MAKE_SHIFT(4, POS))
/* extract the required bits aligning them with the lsb */
#define _EXTRACTEDn(WIDTH, WORD, START, STOP) \
-((((natural##WIDTH)(WORD)) >> (WIDTH - (STOP) - 1)) \
+((((uint##WIDTH##_t)(WORD)) >> (WIDTH - (STOP) - 1)) \
& _MASKn(WIDTH, WIDTH-1+(START)-(STOP), WIDTH-1))
/* #define EXTRACTED10(WORD, START, STOP) _EXTRACTEDn(10, WORD, START, STOP) */
/* move a group of bits around */
#define _INSERTEDn(N, WORD, START, STOP) \
-(((natural##N)(WORD) << _MAKE_SHIFT(N, STOP)) & _MASKn(N, START, STOP))
+(((uint##N##_t)(WORD) << _MAKE_SHIFT(N, STOP)) & _MASKn(N, START, STOP))
#define INSERTED32(WORD, START, STOP) _INSERTEDn(32, WORD, START, STOP)
#define INSERTED64(WORD, START, STOP) _INSERTEDn(64, WORD, START, STOP)
cpu *processor,
unsigned_word cia)
{
- natural_word how = cpu_registers(processor)->gpr[arg0];
+ signed_word how = cpu_registers(processor)->gpr[arg0];
unsigned_word set = cpu_registers(processor)->gpr[arg0+1];
unsigned_word oset = cpu_registers(processor)->gpr[arg0+2];
#ifdef SYS_sigprocmask
{
/* call the arguments by their real name */
unsigned_word name = cpu_registers(processor)->gpr[arg0];
- natural_word namelen = cpu_registers(processor)->gpr[arg0+1];
+ signed_word namelen = cpu_registers(processor)->gpr[arg0+1];
unsigned_word oldp = cpu_registers(processor)->gpr[arg0+2];
unsigned_word oldlenp = cpu_registers(processor)->gpr[arg0+3];
- natural_word oldlen;
- natural_word mib;
- natural_word int_val;
+ signed_word oldlen;
+ signed_word mib;
+ signed_word int_val;
SYS(__sysctl);
/* pluck out the management information base id */
oldlenp,
processor,
cia);
- if (sizeof(natural_word) > oldlen)
+ if (sizeof(signed_word) > oldlen)
error("system_call()sysctl - CTL_HW.HW_PAGESIZE - to small\n");
int_val = 8192;
oldlen = sizeof(int_val);
#define ALU_BEGIN(val) \
{ \
- natural_word alu_val; \
+ signed_word alu_val; \
unsigned64 alu_carry_val; \
signed64 alu_overflow_val; \
ALU_SET(val)
/* TYPES:
- natural* sign determined by host
signed* signed type of the given size
unsigned* The corresponding insigned type
#include <stdint.h>
/* bit based */
-typedef char natural8;
-typedef short natural16;
-typedef int natural32;
-
-#ifdef __GNUC__
-typedef long long natural64;
-#endif
-
-#ifdef _MSC_VER
-typedef __int64 natural64;
-#endif
-
typedef int8_t signed8;
typedef int16_t signed16;
typedef int32_t signed32;
typedef uint64_t unsigned64;
/* byte based */
-typedef natural8 natural_1;
-typedef natural16 natural_2;
-typedef natural32 natural_4;
-typedef natural64 natural_8;
-
typedef signed8 signed_1;
typedef signed16 signed_2;
typedef signed32 signed_4;
/* target architecture based */
#if (WITH_TARGET_WORD_BITSIZE == 64)
-typedef natural64 natural_word;
typedef unsigned64 unsigned_word;
typedef signed64 signed_word;
#else
-typedef natural32 natural_word;
typedef unsigned32 unsigned_word;
typedef signed32 signed_word;
#endif
typedef unsigned32 instruction_word;
/* IEEE 1275 cell size - only support 32bit mode at present */
-typedef natural32 natural_cell;
typedef unsigned32 unsigned_cell;
typedef signed32 signed_cell;