Remove ACK EM_WSIZE/EM_PSIZE macro usage
This commit is contained in:
parent
6723dcfab7
commit
19ffad7692
16 changed files with 2 additions and 83 deletions
|
@ -68,7 +68,7 @@
|
||||||
#define PC_OFF ((long)&((struct proc *)0)->p_reg.pc)
|
#define PC_OFF ((long)&((struct proc *)0)->p_reg.pc)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ADDRSIZE _WORD_SIZE
|
#define ADDRSIZE (sizeof(void *))
|
||||||
#define BITSIZE(size) (8 * (size))
|
#define BITSIZE(size) (8 * (size))
|
||||||
#define INTSIZE (sizeof(int)) /* not quite right for cross-debugger */
|
#define INTSIZE (sizeof(int)) /* not quite right for cross-debugger */
|
||||||
#define LONGSIZE (sizeof(long))
|
#define LONGSIZE (sizeof(long))
|
||||||
|
|
|
@ -931,11 +931,7 @@ opcode_pt wordflags;
|
||||||
else if (mod == MEM2_MOD)
|
else if (mod == MEM2_MOD)
|
||||||
{
|
{
|
||||||
outbyte('+');
|
outbyte('+');
|
||||||
#if (_WORD_SIZE == 4)
|
|
||||||
out32offset();
|
out32offset();
|
||||||
#else
|
|
||||||
outgetaddr();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
outbyte(RINDIRECT);
|
outbyte(RINDIRECT);
|
||||||
if (hasize == 16 && rm == 4 && index == 4 && ss != 0)
|
if (hasize == 16 && rm == 4 && index == 4 && ss != 0)
|
||||||
|
@ -950,8 +946,6 @@ static void outf1()
|
||||||
outbyte(')');
|
outbyte(')');
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (_WORD_SIZE == 4)
|
|
||||||
|
|
||||||
static void out32offset()
|
static void out32offset()
|
||||||
{
|
{
|
||||||
off_t off;
|
off_t off;
|
||||||
|
@ -963,7 +957,6 @@ static void out32offset()
|
||||||
|
|
||||||
outh32(off);
|
outh32(off);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static void outfishy()
|
static void outfishy()
|
||||||
{
|
{
|
||||||
|
@ -1425,11 +1418,7 @@ long addr;
|
||||||
int count;
|
int count;
|
||||||
int symflg;
|
int symflg;
|
||||||
{
|
{
|
||||||
#if (_WORD_SIZE == 4)
|
|
||||||
bits32 = TRUE; /* Set mode */
|
bits32 = TRUE; /* Set mode */
|
||||||
#else
|
|
||||||
bits32 = FALSE;
|
|
||||||
#endif
|
|
||||||
uptr.off = addr;
|
uptr.off = addr;
|
||||||
uptr.base = 0; /* not known */
|
uptr.base = 0; /* not known */
|
||||||
while ( count-- != 0 && show1instruction() )
|
while ( count-- != 0 && show1instruction() )
|
||||||
|
|
|
@ -115,12 +115,8 @@ long magic;
|
||||||
|
|
||||||
/* Check CPU */
|
/* Check CPU */
|
||||||
#if defined(__i386__)
|
#if defined(__i386__)
|
||||||
#if (_WORD_SIZE == 4)
|
|
||||||
if (hdr->a_cpu != A_I80386)
|
if (hdr->a_cpu != A_I80386)
|
||||||
#else
|
|
||||||
if (hdr->a_cpu != A_I8086)
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
Printf("mdb: invalid cpu in exec header - %04x\n",
|
Printf("mdb: invalid cpu in exec header - %04x\n",
|
||||||
hdr->a_cpu);
|
hdr->a_cpu);
|
||||||
|
@ -213,11 +209,7 @@ int allflag;
|
||||||
schar += 'A' - 'a';
|
schar += 'A' - 'a';
|
||||||
outbyte( schar );
|
outbyte( schar );
|
||||||
outspace();
|
outspace();
|
||||||
#if (_WORD_SIZE == 2)
|
|
||||||
outh16( (u16_t) sp->n_value );
|
|
||||||
#else
|
|
||||||
outh32( sp->n_value );
|
outh32( sp->n_value );
|
||||||
#endif
|
|
||||||
outbyte('\n');
|
outbyte('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -460,11 +452,7 @@ char *cmd;
|
||||||
for ( ; s <= send; ++s ) outspace();
|
for ( ; s <= send; ++s ) outspace();
|
||||||
outbyte( schar );
|
outbyte( schar );
|
||||||
outspace();
|
outspace();
|
||||||
#if (_WORD_SIZE == 2)
|
|
||||||
outh16( (u16_t) sp->n_value );
|
|
||||||
#else
|
|
||||||
outh32( sp->n_value );
|
outh32( sp->n_value );
|
||||||
#endif
|
|
||||||
outbyte('\n');
|
outbyte('\n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2170,9 +2170,7 @@ int do_dma;
|
||||||
*/
|
*/
|
||||||
sys_setalarm(wakeup_ticks, 0);
|
sys_setalarm(wakeup_ticks, 0);
|
||||||
|
|
||||||
#if _WORD_SIZE > 2
|
|
||||||
if (cnt > 0xFFFE) cnt = 0xFFFE; /* Max data per interrupt. */
|
if (cnt > 0xFFFE) cnt = 0xFFFE; /* Max data per interrupt. */
|
||||||
#endif
|
|
||||||
|
|
||||||
w_command = ATAPI_PACKETCMD;
|
w_command = ATAPI_PACKETCMD;
|
||||||
pv_set(outbyte[0], wn->base_cmd + REG_FEAT, do_dma ? FEAT_DMA : 0);
|
pv_set(outbyte[0], wn->base_cmd + REG_FEAT, do_dma ? FEAT_DMA : 0);
|
||||||
|
|
|
@ -191,11 +191,7 @@
|
||||||
/* Miscellaneous. */
|
/* Miscellaneous. */
|
||||||
#define MAX_DRIVES 8
|
#define MAX_DRIVES 8
|
||||||
#define COMPAT_DRIVES 4
|
#define COMPAT_DRIVES 4
|
||||||
#if _WORD_SIZE > 2
|
|
||||||
#define MAX_SECS 256 /* controller can transfer this many sectors */
|
#define MAX_SECS 256 /* controller can transfer this many sectors */
|
||||||
#else
|
|
||||||
#define MAX_SECS 127 /* but not to a 16 bit process */
|
|
||||||
#endif
|
|
||||||
#define MAX_ERRORS 4 /* how often to try rd/wt before quitting */
|
#define MAX_ERRORS 4 /* how often to try rd/wt before quitting */
|
||||||
#define NR_MINORS (MAX_DRIVES * DEV_PER_DRIVE)
|
#define NR_MINORS (MAX_DRIVES * DEV_PER_DRIVE)
|
||||||
#define SUB_PER_DRIVE (NR_PARTITIONS * NR_PARTITIONS)
|
#define SUB_PER_DRIVE (NR_PARTITIONS * NR_PARTITIONS)
|
||||||
|
|
|
@ -52,11 +52,7 @@
|
||||||
|
|
||||||
#define _BSD_CLOCK_T_ long
|
#define _BSD_CLOCK_T_ long
|
||||||
|
|
||||||
#if _EM_PSIZE == _EM_WSIZE
|
|
||||||
#define _BSD_PTRDIFF_T_ int
|
#define _BSD_PTRDIFF_T_ int
|
||||||
#else /* _EM_PSIZE == _EM_LSIZE */
|
|
||||||
#define _BSD_PTRDIFF_T_ long
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _BSD_SIZE_T_ unsigned int
|
#define _BSD_SIZE_T_ unsigned int
|
||||||
#define _BSD_SSIZE_T_ int
|
#define _BSD_SSIZE_T_ int
|
||||||
|
|
|
@ -33,10 +33,8 @@ struct sigcontext {
|
||||||
union fpu_state_u sc_fpu_state;
|
union fpu_state_u sc_fpu_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if _WORD_SIZE == 4
|
|
||||||
#define sc_gs sc_regs.gs
|
#define sc_gs sc_regs.gs
|
||||||
#define sc_fs sc_regs.fs
|
#define sc_fs sc_regs.fs
|
||||||
#endif /* _WORD_SIZE == 4 */
|
|
||||||
#define sc_es sc_regs.es
|
#define sc_es sc_regs.es
|
||||||
#define sc_ds sc_regs.ds
|
#define sc_ds sc_regs.ds
|
||||||
#define sc_di sc_regs.di
|
#define sc_di sc_regs.di
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include <minix/types.h>
|
#include <minix/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _EM_WSIZE >= 4
|
|
||||||
/* Ioctls have the command encoded in the low-order word, and the size
|
/* Ioctls have the command encoded in the low-order word, and the size
|
||||||
* of the parameter in the high-order word. The 3 high bits of the high-
|
* of the parameter in the high-order word. The 3 high bits of the high-
|
||||||
* order word are used to encode the in/out/void status of the parameter.
|
* order word are used to encode the in/out/void status of the parameter.
|
||||||
|
@ -56,15 +55,6 @@
|
||||||
#define _MINIX_IOCTL_BIG(i) ((i) & _IOC_BIG)
|
#define _MINIX_IOCTL_BIG(i) ((i) & _IOC_BIG)
|
||||||
#define _MINIX_IOCTL_SIZE_BIG(i) (((i) >> 8) & _IOCPARM_MASK_BIG)
|
#define _MINIX_IOCTL_SIZE_BIG(i) (((i) >> 8) & _IOCPARM_MASK_BIG)
|
||||||
|
|
||||||
#else
|
|
||||||
/* No fancy encoding on a 16-bit machine. */
|
|
||||||
|
|
||||||
#define _IO(x,y) ((x << 8) | y)
|
|
||||||
#define _IOR(x,y,t) _IO(x,y)
|
|
||||||
#define _IOW(x,y,t) _IO(x,y)
|
|
||||||
#define _IORW(x,y,t) _IO(x,y)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
int ioctl(int _fd, int _request, void *_data);
|
int ioctl(int _fd, int _request, void *_data);
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
|
@ -4,11 +4,6 @@
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* This section contains user-settable parameters *
|
* This section contains user-settable parameters *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
/* Word size in bytes (a constant equal to sizeof(int)). */
|
|
||||||
#if __ACK__ || __GNUC__
|
|
||||||
#define _WORD_SIZE _EM_WSIZE
|
|
||||||
#define _PTR_SIZE _EM_WSIZE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _NR_PROCS 256
|
#define _NR_PROCS 256
|
||||||
#define _NR_SYS_PROCS 64
|
#define _NR_SYS_PROCS 64
|
||||||
|
|
|
@ -12,11 +12,7 @@
|
||||||
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
|
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
|
||||||
defined(_NETBSD_SOURCE)
|
defined(_NETBSD_SOURCE)
|
||||||
|
|
||||||
#if _EM_WSIZE > 2
|
|
||||||
#define ARG_MAX 262144 /* # bytes of args + environ for exec() */
|
#define ARG_MAX 262144 /* # bytes of args + environ for exec() */
|
||||||
#else
|
|
||||||
#define ARG_MAX 4096 /* args + environ on small machines */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CHILD_MAX
|
#ifndef CHILD_MAX
|
||||||
#define CHILD_MAX _NO_LIMIT /* max simultaneous processes */
|
#define CHILD_MAX _NO_LIMIT /* max simultaneous processes */
|
||||||
|
|
|
@ -44,10 +44,8 @@ int do_sigreturn(struct proc * caller, message * m_ptr)
|
||||||
sc.sc_ds = rp->p_reg.ds;
|
sc.sc_ds = rp->p_reg.ds;
|
||||||
sc.sc_es = rp->p_reg.es;
|
sc.sc_es = rp->p_reg.es;
|
||||||
sc.sc_ss = rp->p_reg.ss;
|
sc.sc_ss = rp->p_reg.ss;
|
||||||
#if _WORD_SIZE == 4
|
|
||||||
sc.sc_fs = rp->p_reg.fs;
|
sc.sc_fs = rp->p_reg.fs;
|
||||||
sc.sc_gs = rp->p_reg.gs;
|
sc.sc_gs = rp->p_reg.gs;
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Restore the registers. */
|
/* Restore the registers. */
|
||||||
|
|
|
@ -143,10 +143,8 @@ int do_trace(struct proc * caller, message * m_ptr)
|
||||||
if (i == (int) &((struct proc *) 0)->p_reg.cs ||
|
if (i == (int) &((struct proc *) 0)->p_reg.cs ||
|
||||||
i == (int) &((struct proc *) 0)->p_reg.ds ||
|
i == (int) &((struct proc *) 0)->p_reg.ds ||
|
||||||
i == (int) &((struct proc *) 0)->p_reg.es ||
|
i == (int) &((struct proc *) 0)->p_reg.es ||
|
||||||
#if _WORD_SIZE == 4
|
|
||||||
i == (int) &((struct proc *) 0)->p_reg.gs ||
|
i == (int) &((struct proc *) 0)->p_reg.gs ||
|
||||||
i == (int) &((struct proc *) 0)->p_reg.fs ||
|
i == (int) &((struct proc *) 0)->p_reg.fs ||
|
||||||
#endif
|
|
||||||
i == (int) &((struct proc *) 0)->p_reg.ss)
|
i == (int) &((struct proc *) 0)->p_reg.ss)
|
||||||
return(EFAULT);
|
return(EFAULT);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,17 +23,9 @@ static int no_debug = -1;
|
||||||
if (no_debug == 0) { statement; } \
|
if (no_debug == 0) { statement; } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if _EM_WSIZE == _EM_PSIZE
|
|
||||||
#define ptrint int
|
#define ptrint int
|
||||||
#else
|
|
||||||
#define ptrint long
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _EM_PSIZE == 2
|
|
||||||
#define BRKSIZE 1024
|
|
||||||
#else
|
|
||||||
#define BRKSIZE 4096
|
#define BRKSIZE 4096
|
||||||
#endif
|
|
||||||
#ifdef ALIGN_EIGHT_BYTES
|
#ifdef ALIGN_EIGHT_BYTES
|
||||||
#define PTRSIZE 8
|
#define PTRSIZE 8
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -13,8 +13,4 @@
|
||||||
* the bytes in the pointer are the same, just in case.
|
* the bytes in the pointer are the same, just in case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if _EM_PSIZE==2
|
|
||||||
char **environ = (char **) 0x5353;
|
|
||||||
#else
|
|
||||||
char **environ = (char **) 0x53535353;
|
char **environ = (char **) 0x53535353;
|
||||||
#endif
|
|
||||||
|
|
|
@ -57,10 +57,7 @@ int read_header_aout(
|
||||||
|
|
||||||
/* Check magic number, cpu type, and flags. */
|
/* Check magic number, cpu type, and flags. */
|
||||||
if (BADMAG(*hdr)) return(ENOEXEC);
|
if (BADMAG(*hdr)) return(ENOEXEC);
|
||||||
#if (defined(__i386__) && _WORD_SIZE == 2)
|
#if defined(__i386__)
|
||||||
if (hdr->a_cpu != A_I8086) return(ENOEXEC);
|
|
||||||
#endif
|
|
||||||
#if (defined(__i386__) && _WORD_SIZE == 4)
|
|
||||||
if (hdr->a_cpu != A_I80386) return(ENOEXEC);
|
if (hdr->a_cpu != A_I80386) return(ENOEXEC);
|
||||||
#endif
|
#endif
|
||||||
if ((hdr->a_flags & ~(A_NSYM | A_EXEC | A_SEP)) != 0) return(ENOEXEC);
|
if ((hdr->a_flags & ~(A_NSYM | A_EXEC | A_SEP)) != 0) return(ENOEXEC);
|
||||||
|
|
|
@ -16,17 +16,9 @@
|
||||||
|
|
||||||
#define CHECK_DBG(statement)
|
#define CHECK_DBG(statement)
|
||||||
|
|
||||||
#if _EM_WSIZE == _EM_PSIZE
|
|
||||||
#define ptrint int
|
#define ptrint int
|
||||||
#else
|
|
||||||
#define ptrint long
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if _EM_PSIZE == 2
|
|
||||||
#define BRKSIZE 1024
|
|
||||||
#else
|
|
||||||
#define BRKSIZE 4096
|
#define BRKSIZE 4096
|
||||||
#endif
|
|
||||||
#ifdef ALIGN_EIGHT_BYTES
|
#ifdef ALIGN_EIGHT_BYTES
|
||||||
#define PTRSIZE 8
|
#define PTRSIZE 8
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue