| /* |
/* This is the machine-specific part for the Power (incl. PPC) architecture |
| Copyright 1992 by the ANSI figForth Development Group |
|
| |
|
| This is the machine-specific part for the Power (incl. PPC) architecture |
Copyright (C) 1995 Free Software Foundation, Inc. |
| |
|
| |
This file is part of Gforth. |
| |
|
| |
Gforth is free software; you can redistribute it and/or |
| |
modify it under the terms of the GNU General Public License |
| |
as published by the Free Software Foundation; either version 2 |
| |
of the License, or (at your option) any later version. |
| |
|
| |
This program is distributed in the hope that it will be useful, |
| |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| |
GNU General Public License for more details. |
| |
|
| |
You should have received a copy of the GNU General Public License |
| |
along with this program; if not, write to the Free Software |
| |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| */ |
*/ |
| |
|
| #if !defined(USE_TOS) && !defined(USE_NO_TOS) |
#if !defined(USE_TOS) && !defined(USE_NO_TOS) |
| /* this is the point where the does code for the word with the xt cfa |
/* this is the point where the does code for the word with the xt cfa |
| starts. Since a branch is only a cell on Power, we can use the |
starts. Since a branch is only a cell on Power, we can use the |
| second cell of the cfa for storing the does address */ |
second cell of the cfa for storing the does address */ |
| #define DOES_CODE(cfa) ((Xt *)(((long *)(cfa))[1])) |
#define DOES_CODE(cfa) \ |
| |
({ unsigned *_cfa=(unsigned *)(cfa); \ |
| |
_cfa[0]==(0x48000002|&&docol) ? DOES_CODE1(_cfa) : 0; }) |
| |
|
| |
|
| |
DOES_CODE(label) |
| /* this is a special version of DOES_CODE for use in dodoes */ |
/* this is a special version of DOES_CODE for use in dodoes */ |
| #define DOES_CODE1(label) DOES_CODE(label) |
#define DOES_CODE1(cfa) ((Xt *)(((long *)(cfa))[1])) |
| |
|
| /* the does handler resides between DOES> and the following Forth |
/* the does handler resides between DOES> and the following Forth |
| code. Since the code-field jumps directly to dodoes, the |
code. Since the code-field jumps directly to dodoes, the |
| does-handler is not needed for the Power architecture */ |
does-handler is not needed for the Power architecture */ |
| #define DOES_HANDLER_SIZE 8 |
|
| #define MAKE_DOES_HANDLER(addr) 0 |
#define MAKE_DOES_HANDLER(addr) 0 |
| |
|
| /* This makes a code field for a does-defined word. doesp is the |
/* This makes a code field for a does-defined word. doesp is the |