+++ /dev/null
-/* $NetBSD: asm.h,v 1.8 2006/01/20 22:02:40 christos Exp $ */\r
-\r
-/*\r
- * Copyright (c) 1990 The Regents of the University of California.\r
- * All rights reserved.\r
- *\r
- * This code is derived from software contributed to Berkeley by\r
- * William Jolitz.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions\r
- * are met:\r
- * 1. Redistributions of source code must retain the above copyright\r
- * notice, this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright\r
- * notice, this list of conditions and the following disclaimer in the\r
- * documentation and/or other materials provided with the distribution.\r
- * 3. Neither the name of the University nor the names of its contributors\r
- * may be used to endorse or promote products derived from this software\r
- * without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r
- * SUCH DAMAGE.\r
- *\r
- * from: @(#)asm.h 5.5 (Berkeley) 5/7/91\r
- */\r
-\r
-#ifndef _ARM32_ASM_H_\r
-#define _ARM32_ASM_H_\r
-\r
-#ifdef __ELF__\r
-# define _C_LABEL(x) x\r
-#else\r
-# ifdef __STDC__\r
-# define _C_LABEL(x) _ ## x\r
-# else\r
-# define _C_LABEL(x) _/**/x\r
-# endif\r
-#endif\r
-#define _ASM_LABEL(x) x\r
-\r
-#ifdef __STDC__\r
-# define __CONCAT(x,y) x ## y\r
-# define __STRING(x) #x\r
-#else\r
-# define __CONCAT(x,y) x/**/y\r
-# define __STRING(x) "x"\r
-#endif\r
-\r
-#ifndef _ALIGN_TEXT\r
-# define _ALIGN_TEXT .align 0\r
-#endif\r
-\r
-/*\r
- * gas/arm uses @ as a single comment character and thus cannot be used here\r
- * Instead it recognised the # instead of an @ symbols in .type directives\r
- * We define a couple of macros so that assembly code will not be dependant\r
- * on one or the other.\r
- */\r
-#define _ASM_TYPE_FUNCTION #function\r
-#define _ASM_TYPE_OBJECT #object\r
-#define _ENTRY(x) \\r
- .text; _ALIGN_TEXT; .globl x; .type x,_ASM_TYPE_FUNCTION; x:\r
-\r
-#ifdef GPROF\r
-# ifdef __ELF__\r
-# define _PROF_PROLOGUE \\r
- mov ip, lr; bl __mcount\r
-# else\r
-# define _PROF_PROLOGUE \\r
- mov ip,lr; bl mcount\r
-# endif\r
-#else\r
-# define _PROF_PROLOGUE\r
-#endif\r
-\r
-#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE\r
-#define ENTRY_NP(y) _ENTRY(_C_LABEL(y))\r
-#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE\r
-#define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y))\r
-\r
-#define ASMSTR .asciz\r
-\r
-#if defined(__ELF__) && defined(PIC)\r
-#ifdef __STDC__\r
-#define PIC_SYM(x,y) x ## ( ## y ## )\r
-#else\r
-#define PIC_SYM(x,y) x/**/(/**/y/**/)\r
-#endif\r
-#else\r
-#define PIC_SYM(x,y) x\r
-#endif\r
-\r
-#ifdef __ELF__\r
-#define RCSID(x) .section ".ident"; .asciz x\r
-#else\r
-#define RCSID(x) .text; .asciz x\r
-#endif\r
-\r
-#ifdef __ELF__\r
-#define WEAK_ALIAS(alias,sym) \\r
- .weak alias; \\r
- alias = sym\r
-#endif\r
-\r
-/*\r
- * STRONG_ALIAS: create a strong alias.\r
- */\r
-#define STRONG_ALIAS(alias,sym) \\r
- .globl alias; \\r
- alias = sym\r
-\r
-#ifdef __STDC__\r
-#define WARN_REFERENCES(sym,msg) \\r
- .stabs msg ## ,30,0,0,0 ; \\r
- .stabs __STRING(_C_LABEL(sym)) ## ,1,0,0,0\r
-#elif defined(__ELF__)\r
-#define WARN_REFERENCES(sym,msg) \\r
- .stabs msg,30,0,0,0 ; \\r
- .stabs __STRING(sym),1,0,0,0\r
-#else\r
-#define WARN_REFERENCES(sym,msg) \\r
- .stabs msg,30,0,0,0 ; \\r
- .stabs __STRING(_/**/sym),1,0,0,0\r
-#endif /* __STDC__ */\r
-\r
-#if defined (__ARM_ARCH_6__) || defined (__ARM_ARCH_6J__)\r
-#define _ARM_ARCH_6\r
-#endif\r
-\r
-#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5__) || \\r
- defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \\r
- defined (__ARM_ARCH_5TEJ__)\r
-#define _ARM_ARCH_5\r
-#endif\r
-\r
-#if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__)\r
-#define _ARM_ARCH_4T\r
-#endif\r
-\r
-\r
-#if defined (_ARM_ARCH_4T)\r
-# define RET bx lr\r
-# ifdef __STDC__\r
-# define RETc(c) bx##c lr\r
-# else\r
-# define RETc(c) bx/**/c lr\r
-# endif\r
-#else\r
-# define RET mov pc, lr\r
-# ifdef __STDC__\r
-# define RETc(c) mov##c pc, lr\r
-# else\r
-# define RETc(c) mov/**/c pc, lr\r
-# endif\r
-#endif\r
-\r
-#endif /* !_ARM_ASM_H_ */\r