mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-25 19:46:21 +00:00
"warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning" [-Wextra-semi-stmt]
occurred 254 times in xc.c when warnings were turned up.
Review this commit with "git diff -w ..." to make it easier to see changes other than indentation caused by
the addition of do { ... } while (0) around many macro definition bodies.
97 lines
2.8 KiB
C
97 lines
2.8 KiB
C
#ifndef TOS1DEFS_H
|
|
#define TOS1DEFS_H 1
|
|
/* $Id: tos1defs.h,v 1.2 1999/01/03 02:06:27 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved
|
|
*/
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* (C) Copyright 1989-92 Venue. All Rights Reserved. */
|
|
/* Manufactured in the United States of America. */
|
|
/* */
|
|
/************************************************************************/
|
|
|
|
/************************************************************************/
|
|
/* */
|
|
/* T O P - O F - S T A C K D E F I N I T I O N S */
|
|
/* */
|
|
/* TOPOFSTACK cached top of stack value. */
|
|
/* CSTKPTR points to where TOPOFSTACK should be stored. */
|
|
/* */
|
|
/************************************************************************/
|
|
|
|
#ifndef BYTESWAP
|
|
/********************************************************/
|
|
/* Normal byte-order definitions, for e.g., 68020s */
|
|
/********************************************************/
|
|
|
|
/* These are the TOS manipulation Macros */
|
|
|
|
#define HARD_PUSH(x) *(CSTKPTRL++) = x
|
|
#define PUSH(x) \
|
|
do { \
|
|
HARD_PUSH(TOPOFSTACK); \
|
|
TOPOFSTACK = x; \
|
|
} while (0)
|
|
#define POP TOPOFSTACK = *(--CSTKPTRL)
|
|
#define GET_TOS_1 *(CSTKPTR - 1)
|
|
#define GET_TOS_2 *(CSTKPTR - 2)
|
|
#define GET_POPPED *CSTKPTR
|
|
#define POP_TOS_1 *(--CSTKPTRL)
|
|
#define TOPOFSTACK tscache
|
|
#define GET_TOS_1_HI *((DLword *)(CSTKPTR - 1))
|
|
#define GET_TOS_1_LO *((DLword *)(CSTKPTR - 1) + 1)
|
|
|
|
#else
|
|
|
|
/********************************************************/
|
|
/* Byte-swapped definitions, for e.g., 80386s */
|
|
/********************************************************/
|
|
|
|
/* These are the TOS manipulation Macros */
|
|
|
|
#define HARD_PUSH(x) *(CSTKPTRL++) = x
|
|
#define PUSH(x) \
|
|
do { \
|
|
HARD_PUSH(TOPOFSTACK); \
|
|
TOPOFSTACK = x; \
|
|
} while (0)
|
|
#define POP TOPOFSTACK = *(--CSTKPTRL)
|
|
#define GET_TOS_1 *(CSTKPTR - 1)
|
|
#define GET_TOS_2 *(CSTKPTR - 2)
|
|
#define GET_POPPED *CSTKPTR
|
|
#define POP_TOS_1 *(--CSTKPTRL)
|
|
#define TOPOFSTACK tscache
|
|
#define GET_TOS_1_HI GETWORD((DLword *)(CSTKPTR - 1))
|
|
#define GET_TOS_1_LO GETWORD((DLword *)(CSTKPTR - 1) + 1)
|
|
|
|
#endif /* BYTESWAP */
|
|
|
|
/* OPCODE interface routines */
|
|
|
|
#define StackPtrSave \
|
|
do { CurrentStackPTR = (DLword *)(CSTKPTR - 1); } while (0)
|
|
#define StackPtrRestore \
|
|
do { CSTKPTRL = ((LispPTR *)CurrentStackPTR) + 1; } while (0)
|
|
|
|
#define EXT \
|
|
do { \
|
|
PC = pccache - 1; \
|
|
TopOfStack = TOPOFSTACK; \
|
|
StackPtrSave; \
|
|
} while (0)
|
|
|
|
#define RET \
|
|
do { \
|
|
pccache = PC + 1; \
|
|
StackPtrRestore; \
|
|
TOPOFSTACK = TopOfStack; \
|
|
} while (0)
|
|
|
|
#define NRET \
|
|
do { \
|
|
RET; \
|
|
nextop0; \
|
|
} while (0)
|
|
|
|
#endif /* TOS1DEFS_H */
|