/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (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 * or http://www.opensolaris.org/os/licensing. * 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 (c) 2000 by Sun Microsystems, Inc. * All rights reserved. */ #pragma ident "%Z%%M% %I% %E% SMI" #include #include #include #include #include #define LF_PER_XF (sizeof (xforth_t)/sizeof (lforth_t)) #define WF_PER_XF (sizeof (xforth_t)/sizeof (wforth_t)) void unaligned_xfetch(fcode_env_t *); void unaligned_xstore(fcode_env_t *); static void xbsplit(fcode_env_t *); xforth_t pop_xforth(fcode_env_t *env) { if (sizeof (xforth_t) == sizeof (fstack_t)) return (POP(DS)); return ((xforth_t)pop_double(env)); } xforth_t peek_xforth(fcode_env_t *env) { xforth_t d; d = pop_xforth(env); push_xforth(env, d); return (d); } void push_xforth(fcode_env_t *env, xforth_t a) { if (sizeof (xforth_t) == sizeof (fstack_t)) PUSH(DS, a); else push_double(env, (dforth_t)a); } /* * bxjoin ( b.lo b.2 b.3 b.4 b.5 b.6 b.7 b.hi -- o ) */ static void bxjoin(fcode_env_t *env) { union { uchar_t b_bytes[sizeof (xforth_t)]; xforth_t b_xf; } b; int i; CHECK_DEPTH(env, sizeof (xforth_t), "bxjoin"); for (i = 0; i < sizeof (xforth_t); i++) b.b_bytes[i] = POP(DS); push_xforth(env, b.b_xf); } /* *