...
This commit is contained in:
parent
96fa636465
commit
c3ceeded2d
215 changed files with 768 additions and 450 deletions
0
68000/bin/replica/.dummy
Normal file
0
68000/bin/replica/.dummy
Normal file
0
68000/bin/upas/.dummy
Normal file
0
68000/bin/upas/.dummy
Normal file
0
68000/bin/usb/.dummy
Normal file
0
68000/bin/usb/.dummy
Normal file
0
68000/bin/venti/.dummy
Normal file
0
68000/bin/venti/.dummy
Normal file
65
68000/include/u.h
Normal file
65
68000/include/u.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#define nil ((void*)0)
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
typedef signed char schar;
|
||||
typedef long long vlong;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef unsigned long uintptr;
|
||||
typedef unsigned long usize;
|
||||
typedef ushort Rune;
|
||||
typedef union FPdbleword FPdbleword;
|
||||
typedef long jmp_buf[2];
|
||||
#define JMPBUFSP 0
|
||||
#define JMPBUFPC 1
|
||||
#define JMPBUFDPC 0
|
||||
typedef unsigned int mpdigit; /* for /sys/include/mp.h */
|
||||
typedef unsigned char u8int;
|
||||
typedef unsigned short u16int;
|
||||
typedef unsigned int u32int;
|
||||
typedef unsigned long long u64int;
|
||||
|
||||
/* FCR */
|
||||
#define FPINEX (3<<8)
|
||||
#define FPOVFL (1<<12)
|
||||
#define FPUNFL (1<<11)
|
||||
#define FPZDIV (1<<10)
|
||||
#define FPRNR (0<<4)
|
||||
#define FPRZ (1<<4)
|
||||
#define FPINVAL (3<<13)
|
||||
#define FPRPINF (3<<4)
|
||||
#define FPRNINF (2<<4)
|
||||
#define FPRMASK (3<<4)
|
||||
#define FPPEXT (0<<6)
|
||||
#define FPPSGL (1<<6)
|
||||
#define FPPDBL (2<<6)
|
||||
#define FPPMASK (3<<6)
|
||||
/* FSR */
|
||||
#define FPAINEX FPINEX
|
||||
#define FPAOVFL FPOVFL
|
||||
#define FPAUNFL FPUNFL
|
||||
#define FPAZDIV FPZDIV
|
||||
#define FPAINVAL FPINVAL
|
||||
union FPdbleword
|
||||
{
|
||||
double x;
|
||||
struct { /* big endian */
|
||||
ulong hi;
|
||||
ulong lo;
|
||||
};
|
||||
};
|
||||
|
||||
typedef char* va_list;
|
||||
#define va_start(list, start) list =\
|
||||
(sizeof(start) < 4?\
|
||||
(char*)((int*)&(start)+1):\
|
||||
(char*)(&(start)+1))
|
||||
#define va_end(list)\
|
||||
USED(list)
|
||||
#define va_arg(list, mode)\
|
||||
((sizeof(mode) == 1)?\
|
||||
((list += 4), (mode*)list)[-1]:\
|
||||
(sizeof(mode) == 2)?\
|
||||
((list += 4), (mode*)list)[-1]:\
|
||||
((list += sizeof(mode)), (mode*)list)[-1])
|
28
68000/include/ureg.h
Normal file
28
68000/include/ureg.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
struct Ureg
|
||||
{
|
||||
ulong r0;
|
||||
ulong r1;
|
||||
ulong r2;
|
||||
ulong r3;
|
||||
ulong r4;
|
||||
ulong r5;
|
||||
ulong r6;
|
||||
ulong r7;
|
||||
ulong a0;
|
||||
ulong a1;
|
||||
ulong a2;
|
||||
ulong a3;
|
||||
ulong a4;
|
||||
ulong a5;
|
||||
ulong a6;
|
||||
ulong sp;
|
||||
ulong usp;
|
||||
ulong magic; /* for db to find bottom of ureg */
|
||||
ushort sr;
|
||||
ulong pc;
|
||||
ushort vo;
|
||||
#ifndef UREGVARSZ
|
||||
#define UREGVARSZ 23 /* for 68040; 15 is enough on 68020 */
|
||||
#endif
|
||||
uchar microstate[UREGVARSZ]; /* variable-sized portion */
|
||||
};
|
0
68000/lib/.dummy
Normal file
0
68000/lib/.dummy
Normal file
7
68000/mkfile
Normal file
7
68000/mkfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
</sys/src/mkfile.proto
|
||||
|
||||
CC=1c
|
||||
LD=1l
|
||||
O=1
|
||||
RL=rl
|
||||
AS=1a
|
0
68020/bin/.dummy
Normal file
0
68020/bin/.dummy
Normal file
0
68020/bin/ape/.dummy
Normal file
0
68020/bin/ape/.dummy
Normal file
0
68020/bin/audio/.dummy
Normal file
0
68020/bin/audio/.dummy
Normal file
0
68020/bin/auth/.dummy
Normal file
0
68020/bin/auth/.dummy
Normal file
0
68020/bin/aux/.dummy
Normal file
0
68020/bin/aux/.dummy
Normal file
0
68020/bin/bitsy/.dummy
Normal file
0
68020/bin/bitsy/.dummy
Normal file
0
68020/bin/dial/.dummy
Normal file
0
68020/bin/dial/.dummy
Normal file
0
68020/bin/disk/.dummy
Normal file
0
68020/bin/disk/.dummy
Normal file
0
68020/bin/fossil/.dummy
Normal file
0
68020/bin/fossil/.dummy
Normal file
0
68020/bin/fs/.dummy
Normal file
0
68020/bin/fs/.dummy
Normal file
0
68020/bin/games/.dummy
Normal file
0
68020/bin/games/.dummy
Normal file
0
68020/bin/ip/.dummy
Normal file
0
68020/bin/ip/.dummy
Normal file
0
68020/bin/ip/httpd/.dummy
Normal file
0
68020/bin/ip/httpd/.dummy
Normal file
0
68020/bin/ndb/.dummy
Normal file
0
68020/bin/ndb/.dummy
Normal file
0
68020/bin/replica/.dummy
Normal file
0
68020/bin/replica/.dummy
Normal file
0
68020/bin/upas/.dummy
Normal file
0
68020/bin/upas/.dummy
Normal file
0
68020/bin/usb/.dummy
Normal file
0
68020/bin/usb/.dummy
Normal file
0
68020/bin/venti/.dummy
Normal file
0
68020/bin/venti/.dummy
Normal file
74
68020/include/ape/float.h
Normal file
74
68020/include/ape/float.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
#ifndef __FLOAT
|
||||
#define __FLOAT
|
||||
/* IEEE, default rounding */
|
||||
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_RADIX 2
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_EPSILON 1.19209290e-07
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MAX 3.40282347e+38
|
||||
#define FLT_MAX_10_EXP 38
|
||||
#define FLT_MAX_EXP 128
|
||||
#define FLT_MIN 1.17549435e-38
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MIN_EXP -125
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX 1.797693134862315708145e+308
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MIN 2.225073858507201383090233e-308
|
||||
#define DBL_MIN_10_EXP -307
|
||||
#define DBL_MIN_EXP -1021
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_EPSILON DBL_EPSILON
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
|
||||
|
||||
typedef union FPdbleword FPdbleword;
|
||||
union FPdbleword
|
||||
{
|
||||
double x;
|
||||
struct { /* big endian */
|
||||
long hi;
|
||||
long lo;
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef _RESEARCH_SOURCE
|
||||
/* define order of longs in IEEE double: little endian */
|
||||
#define IEEE_MC68k 1
|
||||
#define Sudden_Underflow 1
|
||||
#endif
|
||||
#ifdef _PLAN9_SOURCE
|
||||
/* FCR */
|
||||
#define FPINEX (3<<8)
|
||||
#define FPOVFL (1<<12)
|
||||
#define FPUNFL (1<<11)
|
||||
#define FPZDIV (1<<10)
|
||||
#define FPRNR (0<<4)
|
||||
#define FPRZ (1<<4)
|
||||
#define FPRPINF (3<<4)
|
||||
#define FPRNINF (2<<4)
|
||||
#define FPRMASK (3<<4)
|
||||
#define FPPEXT (0<<6)
|
||||
#define FPPSGL (1<<6)
|
||||
#define FPPDBL (2<<6)
|
||||
#define FPPMASK (3<<6)
|
||||
/* FSR */
|
||||
#define FPAINEX FPINEX
|
||||
#define FPAOVFL FPOVFL
|
||||
#define FPAUNFL FPUNFL
|
||||
#define FPAZDIV FPZDIV
|
||||
#endif
|
||||
#endif /* __FLOAT */
|
77
68020/include/ape/math.h
Normal file
77
68020/include/ape/math.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
#ifndef __MATH
|
||||
#define __MATH
|
||||
#pragma lib "/$M/lib/ape/libap.a"
|
||||
|
||||
/* a HUGE_VAL appropriate for IEEE double-precision */
|
||||
/* the correct value, 1.797693134862316e+308, causes a ken overflow */
|
||||
#define HUGE_VAL 1.79769313486231e+308
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern double acos(double);
|
||||
extern double asin(double);
|
||||
extern double atan(double);
|
||||
extern double atan2(double, double);
|
||||
extern double cos(double);
|
||||
extern double sin(double);
|
||||
extern double tan(double);
|
||||
extern double cosh(double);
|
||||
extern double sinh(double);
|
||||
extern double tanh(double);
|
||||
extern double exp(double);
|
||||
extern double frexp(double, int *);
|
||||
extern double ldexp(double, int);
|
||||
extern double log(double);
|
||||
extern double log10(double);
|
||||
extern double modf(double, double *);
|
||||
extern double pow(double, double);
|
||||
extern double sqrt(double);
|
||||
extern double ceil(double);
|
||||
extern double fabs(double);
|
||||
extern double floor(double);
|
||||
extern double fmod(double, double);
|
||||
extern double NaN(void);
|
||||
extern int isNaN(double);
|
||||
extern double Inf(int);
|
||||
extern int isInf(double, int);
|
||||
|
||||
#ifdef _RESEARCH_SOURCE
|
||||
/* does >> treat left operand as unsigned ? */
|
||||
#define Unsigned_Shifts 1
|
||||
#define M_E 2.7182818284590452354 /* e */
|
||||
#define M_LOG2E 1.4426950408889634074 /* log 2e */
|
||||
#define M_LOG10E 0.43429448190325182765 /* log 10e */
|
||||
#define M_LN2 0.69314718055994530942 /* log e2 */
|
||||
#define M_LN10 2.30258509299404568402 /* log e10 */
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#define M_PI_2 1.57079632679489661923 /* pi/2 */
|
||||
#define M_PI_4 0.78539816339744830962 /* pi/4 */
|
||||
#define M_1_PI 0.31830988618379067154 /* 1/pi */
|
||||
#define M_2_PI 0.63661977236758134308 /* 2/pi */
|
||||
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
|
||||
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
|
||||
extern double hypot(double, double);
|
||||
extern double erf(double);
|
||||
extern double erfc(double);
|
||||
extern double j0(double);
|
||||
extern double y0(double);
|
||||
extern double j1(double);
|
||||
extern double y1(double);
|
||||
extern double jn(int, double);
|
||||
extern double yn(int, double);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define isnan(x) isNaN(x)
|
||||
#define isinf(x) isInf(x)
|
||||
|
||||
#endif /* __MATH */
|
11
68020/include/ape/stdarg.h
Normal file
11
68020/include/ape/stdarg.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef __STDARG
|
||||
#define __STDARG
|
||||
|
||||
typedef char *va_list;
|
||||
|
||||
#define va_start(list, start) list = (char *)(&(start)+1)
|
||||
#define va_end(list)
|
||||
#define va_arg(list, mode) (sizeof(mode)==1 ? ((mode *) (list += 4))[-4] : \
|
||||
sizeof(mode)==2 ? ((mode *) (list += 4))[-2] : ((mode *) (list += sizeof(mode)))[-1])
|
||||
|
||||
#endif /* __STDARG */
|
36
68020/include/ape/ureg.h
Normal file
36
68020/include/ape/ureg.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef __UREG_H
|
||||
#define __UREG_H
|
||||
#if !defined(_PLAN9_SOURCE)
|
||||
This header file is an extension to ANSI/POSIX
|
||||
#endif
|
||||
|
||||
struct Ureg
|
||||
{
|
||||
unsigned long r0;
|
||||
unsigned long r1;
|
||||
unsigned long r2;
|
||||
unsigned long r3;
|
||||
unsigned long r4;
|
||||
unsigned long r5;
|
||||
unsigned long r6;
|
||||
unsigned long r7;
|
||||
unsigned long a0;
|
||||
unsigned long a1;
|
||||
unsigned long a2;
|
||||
unsigned long a3;
|
||||
unsigned long a4;
|
||||
unsigned long a5;
|
||||
unsigned long a6;
|
||||
unsigned long sp;
|
||||
unsigned long usp;
|
||||
unsigned long magic; /* for db to find bottom of ureg */
|
||||
unsigned short sr;
|
||||
unsigned long pc;
|
||||
unsigned short vo;
|
||||
#ifndef UREGVARSZ
|
||||
#define UREGVARSZ 23 /* for 68040; 15 is enough on 68020 */
|
||||
#endif
|
||||
unsigned char microstate[UREGVARSZ]; /* variable-sized portion */
|
||||
};
|
||||
|
||||
#endif
|
14
68020/include/dac.h
Normal file
14
68020/include/dac.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Inmos G17x d/a converter
|
||||
*/
|
||||
|
||||
typedef
|
||||
struct G170
|
||||
{
|
||||
uchar waddr;
|
||||
uchar value;
|
||||
uchar mask;
|
||||
uchar raddr;
|
||||
} G170;
|
||||
|
||||
#define DAC ((G170*)0xc0100000)
|
3
68020/include/lbp.h
Normal file
3
68020/include/lbp.h
Normal file
|
@ -0,0 +1,3 @@
|
|||
typedef struct Lbpconf {
|
||||
int nhblank, nvblank, xmax, ymax, res;
|
||||
} Lbpconf;
|
66
68020/include/u.h
Normal file
66
68020/include/u.h
Normal file
|
@ -0,0 +1,66 @@
|
|||
#define nil ((void*)0)
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
typedef signed char schar;
|
||||
typedef long long vlong;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef unsigned long uintptr;
|
||||
typedef unsigned long usize;
|
||||
typedef ushort Rune;
|
||||
typedef union FPdbleword FPdbleword;
|
||||
typedef long jmp_buf[2];
|
||||
#define JMPBUFSP 0
|
||||
#define JMPBUFPC 1
|
||||
#define JMPBUFDPC 0
|
||||
typedef unsigned int mpdigit; /* for /sys/include/mp.h */
|
||||
typedef unsigned char u8int;
|
||||
typedef unsigned short u16int;
|
||||
typedef unsigned int u32int;
|
||||
typedef unsigned long long u64int;
|
||||
|
||||
|
||||
/* FCR */
|
||||
#define FPINEX (3<<8)
|
||||
#define FPOVFL (1<<12)
|
||||
#define FPUNFL (1<<11)
|
||||
#define FPZDIV (1<<10)
|
||||
#define FPRNR (0<<4)
|
||||
#define FPRZ (1<<4)
|
||||
#define FPINVAL (3<<13)
|
||||
#define FPRPINF (3<<4)
|
||||
#define FPRNINF (2<<4)
|
||||
#define FPRMASK (3<<4)
|
||||
#define FPPEXT (0<<6)
|
||||
#define FPPSGL (1<<6)
|
||||
#define FPPDBL (2<<6)
|
||||
#define FPPMASK (3<<6)
|
||||
/* FSR */
|
||||
#define FPAINEX FPINEX
|
||||
#define FPAOVFL FPOVFL
|
||||
#define FPAUNFL FPUNFL
|
||||
#define FPAZDIV FPZDIV
|
||||
#define FPAINVAL FPINVAL
|
||||
union FPdbleword
|
||||
{
|
||||
double x;
|
||||
struct { /* big endian */
|
||||
ulong hi;
|
||||
ulong lo;
|
||||
};
|
||||
};
|
||||
|
||||
typedef char* va_list;
|
||||
#define va_start(list, start) list =\
|
||||
(sizeof(start) < 4?\
|
||||
(char*)((int*)&(start)+1):\
|
||||
(char*)(&(start)+1))
|
||||
#define va_end(list)\
|
||||
USED(list)
|
||||
#define va_arg(list, mode)\
|
||||
((sizeof(mode) == 1)?\
|
||||
((list += 4), (mode*)list)[-1]:\
|
||||
(sizeof(mode) == 2)?\
|
||||
((list += 4), (mode*)list)[-1]:\
|
||||
((list += sizeof(mode)), (mode*)list)[-1])
|
28
68020/include/ureg.h
Normal file
28
68020/include/ureg.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
struct Ureg
|
||||
{
|
||||
ulong r0;
|
||||
ulong r1;
|
||||
ulong r2;
|
||||
ulong r3;
|
||||
ulong r4;
|
||||
ulong r5;
|
||||
ulong r6;
|
||||
ulong r7;
|
||||
ulong a0;
|
||||
ulong a1;
|
||||
ulong a2;
|
||||
ulong a3;
|
||||
ulong a4;
|
||||
ulong a5;
|
||||
ulong a6;
|
||||
ulong sp;
|
||||
ulong usp;
|
||||
ulong magic; /* for db to find bottom of ureg */
|
||||
ushort sr;
|
||||
ulong pc;
|
||||
ushort vo;
|
||||
#ifndef UREGVARSZ
|
||||
#define UREGVARSZ 23 /* for 68040; 15 is enough on 68020 */
|
||||
#endif
|
||||
uchar microstate[UREGVARSZ]; /* variable-sized portion */
|
||||
};
|
0
68020/lib/.dummy
Normal file
0
68020/lib/.dummy
Normal file
7
68020/mkfile
Normal file
7
68020/mkfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
</sys/src/mkfile.proto
|
||||
|
||||
CC=2c
|
||||
LD=2l
|
||||
O=2
|
||||
RL=rl
|
||||
AS=2a
|
0
alpha/bin/.dummy
Normal file
0
alpha/bin/.dummy
Normal file
0
alpha/bin/ape/.dummy
Normal file
0
alpha/bin/ape/.dummy
Normal file
0
alpha/bin/audio/.dummy
Normal file
0
alpha/bin/audio/.dummy
Normal file
0
alpha/bin/auth/.dummy
Normal file
0
alpha/bin/auth/.dummy
Normal file
0
alpha/bin/aux/.dummy
Normal file
0
alpha/bin/aux/.dummy
Normal file
0
alpha/bin/bitsy/.dummy
Normal file
0
alpha/bin/bitsy/.dummy
Normal file
0
alpha/bin/dial/.dummy
Normal file
0
alpha/bin/dial/.dummy
Normal file
0
alpha/bin/disk/.dummy
Normal file
0
alpha/bin/disk/.dummy
Normal file
0
alpha/bin/fossil/.dummy
Normal file
0
alpha/bin/fossil/.dummy
Normal file
0
alpha/bin/fs/.dummy
Normal file
0
alpha/bin/fs/.dummy
Normal file
0
alpha/bin/games/.dummy
Normal file
0
alpha/bin/games/.dummy
Normal file
0
alpha/bin/ip/.dummy
Normal file
0
alpha/bin/ip/.dummy
Normal file
0
alpha/bin/ip/httpd/.dummy
Normal file
0
alpha/bin/ip/httpd/.dummy
Normal file
0
alpha/bin/ndb/.dummy
Normal file
0
alpha/bin/ndb/.dummy
Normal file
0
alpha/bin/replica/.dummy
Normal file
0
alpha/bin/replica/.dummy
Normal file
0
alpha/bin/upas/.dummy
Normal file
0
alpha/bin/upas/.dummy
Normal file
0
alpha/bin/usb/.dummy
Normal file
0
alpha/bin/usb/.dummy
Normal file
0
alpha/bin/venti/.dummy
Normal file
0
alpha/bin/venti/.dummy
Normal file
76
alpha/include/ape/float.h
Normal file
76
alpha/include/ape/float.h
Normal file
|
@ -0,0 +1,76 @@
|
|||
#ifndef __FLOAT
|
||||
#define __FLOAT
|
||||
/* IEEE, default rounding */
|
||||
|
||||
#define FLT_ROUNDS 1
|
||||
#define FLT_RADIX 2
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_EPSILON 1.19209290e-07
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MAX 3.40282347e+38
|
||||
#define FLT_MAX_10_EXP 38
|
||||
#define FLT_MAX_EXP 128
|
||||
#define FLT_MIN 1.17549435e-38
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MIN_EXP -125
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX 1.797693134862315708145e+308
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MIN 2.225073858507201383090233e-308
|
||||
#define DBL_MIN_10_EXP -307
|
||||
#define DBL_MIN_EXP -1021
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_EPSILON DBL_EPSILON
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
|
||||
typedef union FPdbleword FPdbleword;
|
||||
union FPdbleword
|
||||
{
|
||||
double x;
|
||||
struct { /* little endian */
|
||||
long lo;
|
||||
long hi;
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef _RESEARCH_SOURCE
|
||||
/* define stuff needed for floating conversion */
|
||||
#define IEEE_8087 1
|
||||
#define Sudden_Underflow 1
|
||||
#endif
|
||||
#ifdef _PLAN9_SOURCE
|
||||
#define FPINEX (1<<30)
|
||||
#define FPOVFL (1<<19)
|
||||
#define FPUNFL ((1<<29)|(1<<28))
|
||||
#define FPZDIV (1<<18)
|
||||
#define FPINVAL (1<<17)
|
||||
|
||||
#define FPRNR (2<<26)
|
||||
#define FPRZ (0<<26)
|
||||
#define FPRPINF (3<<26)
|
||||
#define FPRNINF (1<<26)
|
||||
#define FPRMASK (3<<26)
|
||||
|
||||
#define FPPEXT 0
|
||||
#define FPPSGL 0
|
||||
#define FPPDBL 0
|
||||
#define FPPMASK 0
|
||||
/* FSR */
|
||||
#define FPAINEX (1<<24)
|
||||
#define FPAUNFL (1<<23)
|
||||
#define FPAOVFL (1<<22)
|
||||
#define FPAZDIV (1<<21)
|
||||
#define FPAINVAL (1<<20)
|
||||
#endif
|
||||
#endif /* __FLOAT */
|
77
alpha/include/ape/math.h
Normal file
77
alpha/include/ape/math.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
#ifndef __MATH
|
||||
#define __MATH
|
||||
#pragma lib "/$M/lib/ape/libap.a"
|
||||
|
||||
/* a HUGE_VAL appropriate for IEEE double-precision */
|
||||
/* the correct value, 1.797693134862316e+308, causes a ken overflow */
|
||||
#define HUGE_VAL 1.79769313486231e+308
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern double acos(double);
|
||||
extern double asin(double);
|
||||
extern double atan(double);
|
||||
extern double atan2(double, double);
|
||||
extern double cos(double);
|
||||
extern double sin(double);
|
||||
extern double tan(double);
|
||||
extern double cosh(double);
|
||||
extern double sinh(double);
|
||||
extern double tanh(double);
|
||||
extern double exp(double);
|
||||
extern double frexp(double, int *);
|
||||
extern double ldexp(double, int);
|
||||
extern double log(double);
|
||||
extern double log10(double);
|
||||
extern double modf(double, double *);
|
||||
extern double pow(double, double);
|
||||
extern double sqrt(double);
|
||||
extern double ceil(double);
|
||||
extern double fabs(double);
|
||||
extern double floor(double);
|
||||
extern double fmod(double, double);
|
||||
extern double NaN(void);
|
||||
extern int isNaN(double);
|
||||
extern double Inf(int);
|
||||
extern int isInf(double, int);
|
||||
|
||||
#ifdef _RESEARCH_SOURCE
|
||||
/* does >> treat left operand as unsigned ? */
|
||||
#define Unsigned_Shifts 1
|
||||
#define M_E 2.7182818284590452354 /* e */
|
||||
#define M_LOG2E 1.4426950408889634074 /* log 2e */
|
||||
#define M_LOG10E 0.43429448190325182765 /* log 10e */
|
||||
#define M_LN2 0.69314718055994530942 /* log e2 */
|
||||
#define M_LN10 2.30258509299404568402 /* log e10 */
|
||||
#define M_PI 3.14159265358979323846 /* pi */
|
||||
#define M_PI_2 1.57079632679489661923 /* pi/2 */
|
||||
#define M_PI_4 0.78539816339744830962 /* pi/4 */
|
||||
#define M_1_PI 0.31830988618379067154 /* 1/pi */
|
||||
#define M_2_PI 0.63661977236758134308 /* 2/pi */
|
||||
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
|
||||
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
|
||||
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
|
||||
|
||||
extern double hypot(double, double);
|
||||
extern double erf(double);
|
||||
extern double erfc(double);
|
||||
extern double j0(double);
|
||||
extern double y0(double);
|
||||
extern double j1(double);
|
||||
extern double y1(double);
|
||||
extern double jn(int, double);
|
||||
extern double yn(int, double);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define isnan(x) isNaN(x)
|
||||
#define isinf(x) isInf(x)
|
||||
|
||||
#endif /* __MATH */
|
17
alpha/include/ape/stdarg.h
Normal file
17
alpha/include/ape/stdarg.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef __STDARG
|
||||
#define __STDARG
|
||||
|
||||
typedef char *va_list;
|
||||
|
||||
#define va_start(list, start) list = (char *)(&(start)+1)
|
||||
#define va_end(list)
|
||||
#define va_arg(list, mode)\
|
||||
(sizeof(mode)==1?\
|
||||
((mode*)(list += 4))[-1]:\
|
||||
sizeof(mode)==2?\
|
||||
((mode*)(list += 4))[-1]:\
|
||||
sizeof(mode)>4?\
|
||||
((mode*)(list = (char*)((long)(list+7) & ~7) + sizeof(mode)))[-1]:\
|
||||
((mode*)(list += sizeof(mode)))[-1])
|
||||
|
||||
#endif /* __STDARG */
|
57
alpha/include/ape/ureg.h
Normal file
57
alpha/include/ape/ureg.h
Normal file
|
@ -0,0 +1,57 @@
|
|||
#ifndef __UREG_H
|
||||
#define __UREG_H
|
||||
#if !defined(_PLAN9_SOURCE)
|
||||
This header file is an extension to ANSI/POSIX
|
||||
#endif
|
||||
|
||||
struct Ureg
|
||||
{
|
||||
/* l.s saves 31 64-bit values: */
|
||||
unsigned long long type;
|
||||
unsigned long long a0;
|
||||
unsigned long long a1;
|
||||
unsigned long long a2;
|
||||
|
||||
unsigned long long r0;
|
||||
unsigned long long r1;
|
||||
unsigned long long r2;
|
||||
unsigned long long r3;
|
||||
unsigned long long r4;
|
||||
unsigned long long r5;
|
||||
unsigned long long r6;
|
||||
unsigned long long r7;
|
||||
unsigned long long r8;
|
||||
unsigned long long r9;
|
||||
unsigned long long r10;
|
||||
unsigned long long r11;
|
||||
unsigned long long r12;
|
||||
unsigned long long r13;
|
||||
unsigned long long r14;
|
||||
unsigned long long r15;
|
||||
|
||||
unsigned long long r19;
|
||||
unsigned long long r20;
|
||||
unsigned long long r21;
|
||||
unsigned long long r22;
|
||||
unsigned long long r23;
|
||||
unsigned long long r24;
|
||||
unsigned long long r25;
|
||||
unsigned long long r26;
|
||||
unsigned long long r27;
|
||||
unsigned long long r28;
|
||||
union {
|
||||
unsigned long long r30;
|
||||
unsigned long long usp;
|
||||
unsigned long long sp;
|
||||
};
|
||||
|
||||
/* OSF/1 PALcode frame: */
|
||||
unsigned long long status; /* PS */
|
||||
unsigned long long pc;
|
||||
unsigned long long r29; /* GP */
|
||||
unsigned long long r16; /* a0 */
|
||||
unsigned long long r17; /* a1 */
|
||||
unsigned long long r18; /* a2 */
|
||||
};
|
||||
|
||||
#endif
|
70
alpha/include/u.h
Normal file
70
alpha/include/u.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
#define nil ((void*)0)
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned long ulong;
|
||||
typedef unsigned int uint;
|
||||
typedef signed char schar;
|
||||
typedef long long vlong;
|
||||
typedef unsigned long long uvlong;
|
||||
typedef unsigned long uintptr;
|
||||
typedef unsigned long usize;
|
||||
typedef ushort Rune;
|
||||
typedef union FPdbleword FPdbleword;
|
||||
typedef long jmp_buf[2];
|
||||
#define JMPBUFSP 0
|
||||
#define JMPBUFPC 1
|
||||
#define JMPBUFDPC 0
|
||||
typedef unsigned int mpdigit; /* for /sys/include/mp.h */
|
||||
typedef unsigned char u8int;
|
||||
typedef unsigned short u16int;
|
||||
typedef unsigned int u32int;
|
||||
typedef unsigned long long u64int;
|
||||
|
||||
/* FCR */
|
||||
#define FPINEX (1<<30)
|
||||
#define FPOVFL (1<<19)
|
||||
#define FPUNFL ((1<<29)|(1<<28))
|
||||
#define FPZDIV (1<<18)
|
||||
#define FPINVAL (1<<17)
|
||||
|
||||
#define FPRNR (2<<26)
|
||||
#define FPRZ (0<<26)
|
||||
#define FPRPINF (3<<26)
|
||||
#define FPRNINF (1<<26)
|
||||
#define FPRMASK (3<<26)
|
||||
|
||||
#define FPPEXT 0
|
||||
#define FPPSGL 0
|
||||
#define FPPDBL 0
|
||||
#define FPPMASK 0
|
||||
/* FSR */
|
||||
#define FPAINEX (1<<24)
|
||||
#define FPAUNFL (1<<23)
|
||||
#define FPAOVFL (1<<22)
|
||||
#define FPAZDIV (1<<21)
|
||||
#define FPAINVAL (1<<20)
|
||||
union FPdbleword
|
||||
{
|
||||
double x;
|
||||
struct { /* little endian */
|
||||
ulong lo;
|
||||
ulong hi;
|
||||
};
|
||||
};
|
||||
|
||||
/* stdarg */
|
||||
typedef char* va_list;
|
||||
#define va_start(list, start) list =\
|
||||
(sizeof(start) < 4?\
|
||||
(char*)((int*)&(start)+1):\
|
||||
(char*)(&(start)+1))
|
||||
#define va_end(list)\
|
||||
USED(list)
|
||||
#define va_arg(list, mode)\
|
||||
((sizeof(mode) == 1)?\
|
||||
((list += 4), (mode*)list)[-4]:\
|
||||
(sizeof(mode) == 2)?\
|
||||
((list += 4), (mode*)list)[-2]:\
|
||||
sizeof(mode)>4?\
|
||||
((mode*)(list = (char*)((uintptr)(list+7) & ~7) + sizeof(mode)))[-1]:\
|
||||
((list += sizeof(mode)), (mode*)list)[-1])
|
49
alpha/include/ureg.h
Normal file
49
alpha/include/ureg.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
struct Ureg
|
||||
{
|
||||
/* l.s saves 31 64-bit values: */
|
||||
uvlong type;
|
||||
uvlong a0;
|
||||
uvlong a1;
|
||||
uvlong a2;
|
||||
|
||||
uvlong r0;
|
||||
uvlong r1;
|
||||
uvlong r2;
|
||||
uvlong r3;
|
||||
uvlong r4;
|
||||
uvlong r5;
|
||||
uvlong r6;
|
||||
uvlong r7;
|
||||
uvlong r8;
|
||||
uvlong r9;
|
||||
uvlong r10;
|
||||
uvlong r11;
|
||||
uvlong r12;
|
||||
uvlong r13;
|
||||
uvlong r14;
|
||||
uvlong r15;
|
||||
|
||||
uvlong r19;
|
||||
uvlong r20;
|
||||
uvlong r21;
|
||||
uvlong r22;
|
||||
uvlong r23;
|
||||
uvlong r24;
|
||||
uvlong r25;
|
||||
uvlong r26;
|
||||
uvlong r27;
|
||||
uvlong r28;
|
||||
union {
|
||||
uvlong r30;
|
||||
uvlong usp;
|
||||
uvlong sp;
|
||||
};
|
||||
|
||||
/* OSF/1 PALcode frame: */
|
||||
uvlong status; /* PS */
|
||||
uvlong pc;
|
||||
uvlong r29; /* GP */
|
||||
uvlong r16; /* a0 */
|
||||
uvlong r17; /* a1 */
|
||||
uvlong r18; /* a2 */
|
||||
};
|
6
alpha/mkfile
Normal file
6
alpha/mkfile
Normal file
|
@ -0,0 +1,6 @@
|
|||
</sys/src/mkfile.proto
|
||||
|
||||
CC=7c
|
||||
LD=7l
|
||||
O=7
|
||||
AS=7a
|
0
amd64/bin/.dummy
Normal file
0
amd64/bin/.dummy
Normal file
0
amd64/bin/ape/.dummy
Normal file
0
amd64/bin/ape/.dummy
Normal file
0
amd64/bin/audio/.dummy
Normal file
0
amd64/bin/audio/.dummy
Normal file
0
amd64/bin/auth/.dummy
Normal file
0
amd64/bin/auth/.dummy
Normal file
0
amd64/bin/aux/.dummy
Normal file
0
amd64/bin/aux/.dummy
Normal file
0
amd64/bin/bitsy/.dummy
Normal file
0
amd64/bin/bitsy/.dummy
Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue