From owner-p4-projects@FreeBSD.ORG Sun Mar 7 22:23:36 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3AB1916A4D0; Sun, 7 Mar 2004 22:23:36 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 151D316A4CE for ; Sun, 7 Mar 2004 22:23:36 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0862B43D1D for ; Sun, 7 Mar 2004 22:23:36 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i286NZGe033116 for ; Sun, 7 Mar 2004 22:23:35 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i286NZHq033113 for perforce@freebsd.org; Sun, 7 Mar 2004 22:23:35 -0800 (PST) (envelope-from jmallett@freebsd.org) Date: Sun, 7 Mar 2004 22:23:35 -0800 (PST) Message-Id: <200403080623.i286NZHq033113@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 48409 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2004 06:23:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=48409 Change 48409 by jmallett@jmallett_oingo on 2004/03/07 22:22:44 Simpler, more shortsighted machine/asm.h. Affected files ... .. //depot/projects/mips/sys/mips/include/asm.h#13 edit .. //depot/projects/mips/sys/mips/mips/exception.S#16 edit .. //depot/projects/mips/sys/mips/sgimips/ip22_cache.S#3 edit Differences ... ==== //depot/projects/mips/sys/mips/include/asm.h#13 (text+ko) ==== @@ -1,6 +1,5 @@ -/* - * Copyright (C) 1995, 1996 Wolfgang Solfrank. - * Copyright (C) 1995, 1996 TooLs GmbH. +/*- + * Copyright (c) 2004 Juli Mallett * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,128 +10,40 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by TooLs GmbH. - * 4. The name of TooLs GmbH may not be used to endorse or promote products - * derived from this software without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * - * $NetBSD: asm.h,v 1.6.18.1 2000/07/25 08:37:14 kleink Exp $ - * $FreeBSD: src/sys/powerpc/include/asm.h,v 1.6 2002/09/23 07:27:45 peter Exp $ + * $P4: //depot/projects/mips/sys/mips/include/asm.h#13 $ */ -#ifndef _MACHINE_ASM_H_ +#ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include -#ifdef PIC -#define PIC_PROLOGUE XXX -#define PIC_EPILOGUE XXX -#define PIC_PLT(x) x@plt -#ifdef __STDC__ -#define PIC_GOT(x) XXX -#else /* not __STDC__ */ -#define PIC_GOT(x) XXX -#endif /* __STDC__ */ -#else -#define PIC_PROLOGUE -#define PIC_EPILOGUE -#define PIC_PLT(x) x -#define PIC_GOT(x) x -#endif +#define GLOBAL(sym) \ + .globl sym; sym: -#ifdef GPROF -#error Need to define the profile prologue. -#else -#define _PROF_PROLOGUE -#endif +#define XLEAF(sym) \ + .globl sym; sym: -#define CNAME(csym) csym -#define HIDENAME(asmsym) __CONCAT(.,asmsym) +#define LEAF(sym) \ + .globl sym; .ent sym; sym: .frame sp, 0, ra -#define _GLOBAL(x) \ - .data; .align 2; .globl x; x: +#define ENTRY(sym) \ + .text; .globl sym; .ent sym; sym: -#define _ENTRY(x) \ - .text; .align 2; .globl x; .ent x; .type x,@function; x: +#define END(sym) \ + .end sym -#define _XLEAF(x) \ - .globl x; x: - -#define _LEAF(x) \ - .globl x; .ent x; x: ; .frame sp, 0, ra; - -#define _EXPORT(x) \ - .globl x; x: - -#define _END(x) \ - .end x - -#define _NESTED(x, fsize, retpc) \ - .globl x; .ent x; x:; .frame sp, fsize, retpc; - -#define GLOBAL(y) _GLOBAL(CNAME(y)) -#define ENTRY(y) _ENTRY(CNAME(y)); _PROF_PROLOGUE -#define XLEAF(y) _XLEAF(CNAME(y)) -#define LEAF(y) _LEAF(CNAME(y)); _PROF_PROLOGUE -#define LEAF_NOPROFILE(y) _LEAF(CNAME(y)) -#define EXPORT(y) _EXPORT(CNAME(y)) -#define END(y) _END(CNAME(y)) -#define NESTED(y,f,r) _NESTED(CNAME(y), f, r); _PROF_PROLOGUE -#define NESTED_NOPROFILE(y,f,r) _NESTED(CNAME(y), f, r) - -#define ASMSTR .asciz - -#define RCSID(x) .text; .asciz x - -#if !defined(lint) && !defined(STRIP_FBSDID) -#define __FBSDID(s) .ident s -#else -#define __FBSDID(s) /* nothing */ -#endif /* not lint and not STRIP_FBSDID */ - -#define WEAK_ALIAS(alias,sym) \ - .weak alias; \ - alias = sym - -#ifdef __STDC__ -#define WARN_REFERENCES(_sym,_msg) \ - .section .gnu.warning. ## _sym ; .ascii _msg ; .text -#else -#define WARN_REFERENCES(_sym,_msg) \ - .section .gnu.warning./**/_sym ; .ascii _msg ; .text -#endif /* __STDC__ */ - -/* - * Macros to panic and printf from assembly language. - */ -#define PANIC(msg) \ - la a0, 9f; \ - jal panic; \ - nop; \ - MSG(msg) - -#define PRINTF(msg) \ - la a0, 9f; \ - jal printf; \ - nop; \ - MSG(msg) - -#define MSG(msg) \ - .rdata; \ -9: .asciiz msg; \ - .text - -#endif /* !_MACHINE_ASM_H_ */ +#endif /* _MACHINE_ASM_H_ */ ==== //depot/projects/mips/sys/mips/mips/exception.S#16 (text+ko) ==== @@ -23,7 +23,7 @@ * Mark the end of a vector. */ #define _VEND(x) \ - EXPORT(x ## End); \ + GLOBAL(x ## End); \ END(x); #define VEND(x) \ ==== //depot/projects/mips/sys/mips/sgimips/ip22_cache.S#3 (text+ko) ==== @@ -72,7 +72,7 @@ * * Write-back and invalidate the cache lines [a0..a1]. */ -LEAF_NOPROFILE(ip22_sdcache_do_wbinv) +LEAF(ip22_sdcache_do_wbinv) PROLOGUE /* @@ -97,7 +97,7 @@ nop END(ip22_sdcache_do_wbinv) -LEAF_NOPROFILE(ip22_sdcache_enable) +LEAF(ip22_sdcache_enable) PROLOGUE li a0, 0x1 @@ -113,7 +113,7 @@ nop END(ip22_sdcache_enable) -LEAF_NOPROFILE(ip22_sdcache_disable) +LEAF(ip22_sdcache_disable) PROLOGUE li a0, 0x1