asm.h revision 1.3
11.3Sragge/* $NetBSD: asm.h,v 1.3 1995/05/03 19:53:40 ragge Exp $ */ 21.2Scgd 31.1Sragge/*- 41.1Sragge * Copyright (c) 1990 The Regents of the University of California. 51.1Sragge * All rights reserved. 61.1Sragge * 71.1Sragge * This code is derived from software contributed to Berkeley by 81.1Sragge * William Jolitz. 91.1Sragge * 101.1Sragge * Redistribution and use in source and binary forms, with or without 111.1Sragge * modification, are permitted provided that the following conditions 121.1Sragge * are met: 131.1Sragge * 1. Redistributions of source code must retain the above copyright 141.1Sragge * notice, this list of conditions and the following disclaimer. 151.1Sragge * 2. Redistributions in binary form must reproduce the above copyright 161.1Sragge * notice, this list of conditions and the following disclaimer in the 171.1Sragge * documentation and/or other materials provided with the distribution. 181.1Sragge * 3. All advertising materials mentioning features or use of this software 191.1Sragge * must display the following acknowledgement: 201.1Sragge * This product includes software developed by the University of 211.1Sragge * California, Berkeley and its contributors. 221.1Sragge * 4. Neither the name of the University nor the names of its contributors 231.1Sragge * may be used to endorse or promote products derived from this software 241.1Sragge * without specific prior written permission. 251.1Sragge * 261.1Sragge * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 271.1Sragge * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 281.1Sragge * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 291.1Sragge * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 301.1Sragge * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 311.1Sragge * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 321.1Sragge * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 331.1Sragge * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 341.1Sragge * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 351.1Sragge * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 361.1Sragge * SUCH DAMAGE. 371.1Sragge * 381.2Scgd * @(#)asm.h 5.5 (Berkeley) 5/7/91 391.3Sragge * @(#)DEFS.h 5.3 (Berkeley) 6/1/90 401.1Sragge */ 411.1Sragge 421.3Sragge#ifndef _MACHINE_ASM_H_ 431.3Sragge#define _MACHINE_ASM_H_ 441.1Sragge 451.3Sragge#define R0 0x001 461.3Sragge#define R1 0x002 471.3Sragge#define R2 0x004 481.3Sragge#define R3 0x008 491.3Sragge#define R4 0x010 501.3Sragge#define R5 0x020 511.3Sragge#define R6 0x040 521.3Sragge#define R7 0x080 531.3Sragge#define R8 0x100 541.3Sragge#define R9 0x200 551.3Sragge#define R10 0x400 561.3Sragge#define R11 0x800 571.1Sragge 581.3Sragge#ifdef __STDC__ 591.3Sragge# define _FUNC(x) _ ## x ## : 601.3Sragge# define _GLOB(x) .globl _ ## x 611.1Sragge#else 621.3Sragge# define _FUNC(x) _/**/x: 631.3Sragge# define _GLOB(x) .globl _/**/x 641.1Sragge#endif 651.1Sragge 661.3Sragge#ifdef PROF 671.3Sragge#define ENTRY(x,regs) \ 681.3Sragge _GLOB(x);.align 2;_FUNC(x);.word regs;jsb mcount; 691.3Sragge#else 701.3Sragge#define ENTRY(x,regs) \ 711.3Sragge _GLOB(x);.align 2;_FUNC(x);.word regs; 721.1Sragge#endif 731.1Sragge 741.1Sragge#define ASMSTR .asciz 751.1Sragge 761.3Sragge#endif /* !_MACHINE_ASM_H_ */ 77