asmacros.h revision 81334
1100384Speter/*- 2100384Speter * Copyright (c) 2001 Jake Burkholder. 3100384Speter * All rights reserved. 4100384Speter * 5100384Speter * Redistribution and use in source and binary forms, with or without 6100384Speter * modification, are permitted provided that the following conditions 7100384Speter * are met: 8100384Speter * 1. Redistributions of source code must retain the above copyright 9100384Speter * notice, this list of conditions and the following disclaimer. 10100384Speter * 2. Redistributions in binary form must reproduce the above copyright 11100384Speter * notice, this list of conditions and the following disclaimer in the 12100384Speter * documentation and/or other materials provided with the distribution. 13100384Speter * 14100384Speter * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15100384Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16100384Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17100384Speter * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18100384Speter * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19100384Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20100384Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21100384Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22100384Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23100384Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24100384Speter * SUCH DAMAGE. 25100384Speter * 26100384Speter * $FreeBSD: head/sys/sparc64/include/asmacros.h 81334 2001-08-09 02:09:34Z obrien $ 27118031Sobrien */ 28118031Sobrien 29118031Sobrien#ifndef _MACHINE_ASMACROS_H_ 30104738Speter#define _MACHINE_ASMACROS_H_ 31191673Sjamie 32191673Sjamie#ifdef _KERNEL 33104738Speter 34205014Snwhitehorn#define PCPU(member) %g7 + GD_ ## member 35205014Snwhitehorn#define DEBUGGER() ta %xcc, 1 36100384Speter#define PANIC(msg, reg) \ 37100384Speter .sect .rodata ; \ 38162954Sphk9: .asciz msg ; \ 39100384Speter .previous ; \ 40100384Speter setx 9b, reg, %o0 ; \ 41100384Speter call panic ; \ 42100384Speter nop 43185435Sbz 44100384Speter#endif 45161343Sjkim 46100384Speter#define DATA(name) \ 47100384Speter .data ; \ 48100384Speter .globl name ; \ 49205014Snwhitehorn .type name, @object ; \ 50151909Spsname ## : 51100384Speter 52100384Speter#define EMPTY 53100384Speter 54100384Speter#define ENTRY(name) \ 55183044Sobrien .text ; \ 56100384Speter .align 4 ; \ 57100384Speter .globl name ; \ 58100384Speter .type name, @function ; \ 59100384Spetername ## : 60100384Speter 61146950Sps#define END(name) \ 62100384Speter .size name, . - name 63100384Speter 64100384Speter#endif /* !_MACHINE_ASMACROS_H_ */ 65100384Speter