1 /* $OpenBSD: hppa.h,v 1.4 2001/03/29 03:58:18 mickey Exp $ */ 2 3 /* 4 * Copyright 1996 1995 by Open Software Foundation, Inc. 5 * All Rights Reserved 6 * 7 * Permission to use, copy, modify, and distribute this software and 8 * its documentation for any purpose and without fee is hereby granted, 9 * provided that the above copyright notice appears in all copies and 10 * that both the copyright notice and this permission notice appear in 11 * supporting documentation. 12 * 13 * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 14 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 15 * FOR A PARTICULAR PURPOSE. 16 * 17 * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 19 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 20 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 21 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 22 */ 23 /* 24 * pmk1.1 25 */ 26 /* 27 * (c) Copyright 1986 HEWLETT-PACKARD COMPANY 28 * 29 * To anyone who acknowledges that this file is provided "AS IS" 30 * without any express or implied warranty: 31 * permission to use, copy, modify, and distribute this file 32 * for any purpose is hereby granted without fee, provided that 33 * the above copyright notice and this notice appears in all 34 * copies, and that the name of Hewlett-Packard Company not be 35 * used in advertising or publicity pertaining to distribution 36 * of the software without specific, written prior permission. 37 * Hewlett-Packard Company makes no representations about the 38 * suitability of this software for any purpose. 39 */ 40 41 /* amount is assumed to be a constant between 0 and 32 (non-inclusive) */ 42 #define Shiftdouble(left,right,amount,dest) \ 43 /* int left, right, amount, dest; */ \ 44 dest = ((left) << (32-(amount))) | ((unsigned int)(right) >> (amount)) 45 46 /* amount must be less than 32 */ 47 #define Variableshiftdouble(left,right,amount,dest) \ 48 /* unsigned int left, right; int amount, dest; */ \ 49 if (amount == 0) dest = right; \ 50 else dest = ((((unsigned) left)&0x7fffffff) << (32-(amount))) | \ 51 ((unsigned) right >> (amount)) 52 53 /* amount must be between 0 and 32 (non-inclusive) */ 54 #define Variable_shift_double(left,right,amount,dest) \ 55 /* unsigned int left, right; int amount, dest; */ \ 56 dest = (left << (32-(amount))) | ((unsigned) right >> (amount)) 57