1*70753211Smickey /* $OpenBSD: prefix.h,v 1.1.1.1 1998/06/23 18:56:54 mickey Exp $ */ 2*70753211Smickey 3*70753211Smickey /* 4*70753211Smickey * (c) Copyright 1985 HEWLETT-PACKARD COMPANY 5*70753211Smickey * 6*70753211Smickey * To anyone who acknowledges that this file is provided "AS IS" 7*70753211Smickey * without any express or implied warranty: 8*70753211Smickey * permission to use, copy, modify, and distribute this file 9*70753211Smickey * for any purpose is hereby granted without fee, provided that 10*70753211Smickey * the above copyright notice and this notice appears in all 11*70753211Smickey * copies, and that the name of Hewlett-Packard Company not be 12*70753211Smickey * used in advertising or publicity pertaining to distribution 13*70753211Smickey * of the software without specific, written prior permission. 14*70753211Smickey * Hewlett-Packard Company makes no representations about the 15*70753211Smickey * suitability of this software for any purpose. 16*70753211Smickey */ 17*70753211Smickey 18*70753211Smickey /* 19*70753211Smickey * STANDARD INCLUDE FILE FOR MILLICODE 20*70753211Smickey * Every source file must include this file. 21*70753211Smickey * 22*70753211Smickey * Hardware General Registers 23*70753211Smickey * 24*70753211Smickey * Frame Offsets (millicode convention!) 25*70753211Smickey * Used when calling other millicode routines. 26*70753211Smickey * Stack unwinding is dependent upon these definitions. 27*70753211Smickey * r31_slot .equ -20 28*70753211Smickey * sr0_slot .equ -16 29*70753211Smickey */ 30*70753211Smickey 31*70753211Smickey #include <machine/asm.h> 32*70753211Smickey 33*70753211Smickey #define DEFINE(name, value)name: .EQU value 34*70753211Smickey #ifdef milliext 35*70753211Smickey #ifdef PIC 36*70753211Smickey #define MILLI_BE(lbl) \ 37*70753211Smickey BL .+8,r1\ 38*70753211Smickey ! ADDIL L%lbl-labl/**/lbl,r1\ 39*70753211Smickey ! .LABEL labl/**/lbl\ 40*70753211Smickey ! BE R%lbl-labl/**/lbl(sr7,r1) 41*70753211Smickey 42*70753211Smickey #define MILLI_BEN(lbl) \ 43*70753211Smickey BL .+8,r1\ 44*70753211Smickey ! ADDIL L%lbl-labl/**/lbl,r1\ 45*70753211Smickey ! .LABEL labl/**/lbl\ 46*70753211Smickey ! BE,N R%lbl-labl/**/lbl(sr7,r1) 47*70753211Smickey 48*70753211Smickey #define MILLI_BLE(lbl) \ 49*70753211Smickey BL .+8,r1\ 50*70753211Smickey ! ADDIL L%lbl-labl/**/lbl,r1\ 51*70753211Smickey ! .LABEL labl/**/lbl \ 52*70753211Smickey ! BLE R%lbl-labl/**/lbl(sr7,r1) 53*70753211Smickey 54*70753211Smickey #define MILLI_BLEN(lbl) \ 55*70753211Smickey BL .+8,r1\ 56*70753211Smickey ! ADDIL L%lbl-labl/**/lbl,r1\ 57*70753211Smickey ! .LABEL labl/**/lbl\ 58*70753211Smickey ! BLE,N R%lbl-labl/**/lbl(sr7,r1) 59*70753211Smickey #else 60*70753211Smickey #define MILLI_BE(lbl) BE lbl(sr7,r0) 61*70753211Smickey #define MILLI_BEN(lbl) BE,n lbl(sr7,r0) 62*70753211Smickey #define MILLI_BLE(lbl) BLE lbl(sr7,r0) 63*70753211Smickey #define MILLI_BLEN(lbl) BLE,n lbl(sr7,r0) 64*70753211Smickey #endif 65*70753211Smickey 66*70753211Smickey #define MILLIRETN BE,n 0(sr0,r31) 67*70753211Smickey #define MILLIRET BE 0(sr0,r31) 68*70753211Smickey #define MILLI_RETN BE,n 0(sr0,r31) 69*70753211Smickey #define MILLI_RET BE 0(sr0,r31) 70*70753211Smickey 71*70753211Smickey #else 72*70753211Smickey #define MILLI_BE(lbl) B lbl 73*70753211Smickey #define MILLI_BEN(lbl) B,n lbl 74*70753211Smickey #define MILLI_BLE(lbl) BL lbl,r31 75*70753211Smickey #define MILLI_BLEN(lbl) BL,n lbl,r31 76*70753211Smickey #define MILLIRETN BV,n 0(r31) 77*70753211Smickey #define MILLIRET BV 0(r31) 78*70753211Smickey #define MILLI_RETN BV,n 0(r31) 79*70753211Smickey #define MILLI_RET BV 0(r31) 80*70753211Smickey #endif 81*70753211Smickey ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 82*70753211Smickey .SPACE $TEXT$ 83*70753211Smickey .subspa $MILLICODE$ 84*70753211Smickey ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 85*70753211Smickey ; VERSION is used wherever ".version" can appear in a routine 86*70753211Smickey ;#define VERSION .version 87*70753211Smickey #define VERSION ; 88