/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
void unaligned_lstore(fcode_env_t *);
void unaligned_wstore(fcode_env_t *);
void unaligned_lfetch(fcode_env_t *);
void unaligned_wfetch(fcode_env_t *);
/* start with the simple maths functions */
void
{
fstack_t d;
TOS += d;
}
void
{
fstack_t d;
TOS -= d;
}
void
{
fstack_t d;
TOS *= d;
}
void
{
if (d == 0) {
}
sign = ((d ^ t) < 0);
if (d < 0) {
d = -d;
if (sign) {
t += (d-1);
}
}
if (t < 0) {
if (sign) {
t -= (d-1);
}
t = -t;
}
t = t / d;
if ((o ^ sign) < 0) {
rem = (t * d) + o;
} else {
rem = o - (t*d);
}
if (sign) {
t = -t;
}
}
/*
*/
void
{
if (u2 == 0)
}
void
{
}
void
{
}
void
{
fstack_t d;
TOS &= d;
}
void
{
fstack_t d;
TOS |= d;
}
void
{
fstack_t d;
TOS ^= d;
}
void
{
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
}
void
{
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
}
void
{
}
void
{
}
void
{
}
#define EQUALS ==
#define NOTEQUALS !=
#define LESSTHAN <
#define LESSEQUALS <=
#define GREATERTHAN >
#define GREATEREQUALS >=
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
ufstack_t d;
}
void
{
ufstack_t d;
}
void
{
ufstack_t d;
}
void
{
ufstack_t d;
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
}
void
{
}
void
{
IP++;
}
void
{
}
}
void
{
} else
}
void
{
if (env->order_depth) {
env->order_depth--;
}
}
#ifdef DEBUG
void
{
int i;
}
#endif
void
{
/* what a waste of cycles */
}
void
{
union {
} d;
int i;
for (i = 0; i < FW_PER_FL; i++)
}
void
{
union {
} d;
int i;
for (i = 0; i < FW_PER_FL; i++)
}
void
{
union {
} d, c;
int i;
for (i = 0; i < FW_PER_FL; i++)
}
void
{
union {
} d;
int i;
for (i = 0; i < sizeof (lforth_t); i++)
}
void
{
union {
} d;
int i;
for (i = 0; i < sizeof (lforth_t); i++)
}
void
{
union {
} d, c;
int i;
for (i = 0; i < sizeof (lforth_t); i++)
}
void
{
union {
} d;
int i;
for (i = 0; i < sizeof (wforth_t); i++)
}
void
{
union {
} d;
int i;
for (i = 0; i < sizeof (wforth_t); i++)
}
void
{
union {
} c, d;
int i;
for (i = 0; i < sizeof (wforth_t); i++)
}
void
{
}
void
{
}
void
{
char *buf;
char *str;
}
void
{
TOS += 1;
}
void
{
}
void
{
}
/*
* 'unloop' Fcode implementation, drop 3 loop ctrl elements off return stack.
*/
static void
{
RS -= 3;
}
/*
* 'um*' Fcode implementation.
*/
static void
{
dforth_t d;
push_double(env, d);
}
/*
*/
static void
{
u_dforth_t d;
d = pop_double(env);
urem = d % u;
uquot = d / u;
}
/*
*/
static void
{
}
/*
*/
static void
{
}
void
{
/*
* Other than temporary_execute, no one should set
* here backwards.
*/
}
}
}
static void
{
extern void unaligned_xstore(fcode_env_t *);
else
}
static void
{
extern void unaligned_xfetch(fcode_env_t *);
else
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
}
void
{
}
void
{
int i;
}
}
void
{
int i;
}
}
void
{
int i;
}
}
void
{
int i;
}
}
/*
* 'lbflips' Fcode implementation.
*/
static void
{
int i;
}
}
/*
* 'wbflips' Fcode implementation.
*/
static void
{
int i;
}
}
/*
* 'lwflips' Fcode implementation.
*/
static void
{
int i;
}
}
void
{
}
void
{
}
void
{
}
int
{
int error = 0;
char base;
if (num_base < 10) {
} else {
}
*dptr = 0;
error = 1;
else {
if (digit <= '9')
digit -= '0';
else
}
return (error);
}
void
{
char *buf;
if (*buf == '-') {
sign = -1;
buf++;
len--;
}
value = 0;
if (*buf == '.') {
buf++;
continue;
}
}
if (error) {
} else {
}
}
void
{
else {
}
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
ufstack_t a;
if (a)
}
void
{
}
void
{
/*
* check if we need to supress expose action;
* If so this is an internal word and has no link field
* or it is a temporary compile
*/
}
}
}
void
{
}
void
{
}
void
{
fstack_t d;
d = TOS;
}
void
{
fstack_t d;
d = DS[-1];
}
void
{
fstack_t d;
d = DS[-1];
DS[0] = d;
}
void
{
fstack_t d;
d = DS[-2];
TOS = d;
}
void
{
fstack_t d;
d = TOS;
DS[-2] = d;
}
void
{
fstack_t d;
d = TOS;
}
void
{
}
void
{
fstack_t d;
d = TOS;
if (d)
}
void
{
fstack_t d;
}
void
{
fstack_t p;
p = DS[-p];
}
void
{
fstack_t d, r;
d = DS[-r];
while (r) {
r--;
}
TOS = d;
}
void
{
DS -= 2;
}
void
{
DS += 2;
}
void
{
fstack_t a, b;
a = DS[-3];
b = DS[-2];
}
void
{
fstack_t a, b;
a = DS[-3];
b = DS[-2];
DS[-1] = a;
TOS = b;
}
void
{
fstack_t a, b;
a = DS[-5];
b = DS[-4];
DS[-1] = a;
TOS = b;
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
fstack_t d;
TOS += d * sizeof (char);
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
fstack_t d;
}
void
{
TOS += sizeof (char);
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
variable_t *d;
*d = -1;
}
void
{
variable_t *d;
*d = 0;
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
variable_t *d;
}
void
{
variable_t *d;
}
/*
* 'move' Fcode reimplemented in fcdriver to check for mapped addresses.
*/
void
{
}
void
{
void *dest;
}
void
{
int res;
if (res > 0)
res = 1;
else if (res < 0)
res = -1;
}
void
{
}
}
void
{
}
void
{
saved_here = HERE;
/* execute the temporary definition */
/* now wind the dictionary back! */
if (saved_here != HERE) {
" temporary_execute\n");
} else
}
}
void
{
}
void
{
}
void
{
if (flag) {
IP++;
} else {
}
}
void
{
fstack_t d;
if (d == TOS) {
IP++;
} else {
}
}
void
{
}
void
{
ufstack_t a;
/*
* Note: end condition is when the sign bit of R[0] changes.
*/
a = RS[0];
} else {
}
}
void
{
}
void
{
fstack_t d;
}
void
{
}
void
{
}
void
{
}
void
{
ufstack_t i, l;
/*
* Same computation as OBP, sets up so that loop_inc will terminate
* when the sign bit of RS[0] changes.
*/
}
void
{
IP++;
}
void
{
IP++;
} else {
}
}
void
{
COMPILE_TOKEN(0);
}
void
{
}
void
{
}
void
{
fstack_t i;
}
void
{
fstack_t j;
}
void
{
}
}
void
{
static int string_count = 0;
char *dest;
if (!len) {
return;
}
}
}
void
{
int len = 0;
if (next) {
} else {
}
}
}
void
{
}
void
{
} else {
}
}
void
{
}
void
{
}
void
{
}
void
{
int len;
char *name;
}
void
{
make_header(env, 0);
}
void
{
} else
}
void
{
make_header(env, 0);
}
void
{
}
void
{
int len;
while (len--)
*tostr++ = '\0';
}
void
{
char osep;
}
}
void
{
}
void
{
make_header(env, 0);
}
void
{
}
{
continue;
LINK_TO_ACF(dptr));
return (LINK_TO_ACF(dptr));
}
}
return (NULL);
}
void
{
int i;
}
if (acf) {
} else
}
void
{
char *name;
while (TOS) {
if (TOS) {
/* Compile in references */
} else {
}
} else {
int bad;
if (bad) {
break;
} else {
}
}
}
}
void
{
}
void
int ncells,
int instance_mode,
{
if (instance_mode && !MYSELF) {
}
if (len)
if (instance_mode) {
int offset;
offset);
while (ncells--)
env->instance_mode = 0;
} else {
while (ncells--)
}
if (set_action)
}
void
{
}
void
{
}
/*
* 'behavior' Fcode retrieve execution behavior for a defer word.
*/
static void
{
defer_xt++;
}
void
{
}
void
{
}
/*
* Fcodes chosen not to support.
*/
void
{
}
/*
* Fcodes that are Obsolete per P1275-1994.
*/
void
{
}
/*
* Fcodes that are Historical per P1275-1994
*/
void
{
}
void
{
}
void
{
if (errcode) {
/*
* No catch frame set => fatal error
*/
if (!efp)
/*
* Setting IP=0 will force the unwinding of the calls
* (see execute) which is how we will return (eventually)
* to the test in catch that follows 'execute'.
*/
IP = 0;
}
}
void
{
fstack_t t;
if (t >= -20 && t <= 20)
else {
if (t)
(int)t);
}
}
void
{
}
}
void
{
}
void
{
}
static void
_init(void)
{
}