1/* $OpenBSD: testfly.S,v 1.8 2020/07/06 07:31:19 kettenis Exp $ */ 2 3/* 4 * Copyright (c) 2002,2003 Michael Shalayeff 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. The name of the author may not be used to endorse or promote products 16 * derived from this software without specific prior written permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21 * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT, 22 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 28 * THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31#include <machine/asm.h> 32 33 .space 16384 34 35#if defined(__aarch64__) || defined(__amd64__) || defined(__i386__) 36ENTRY(testfly) 37 ret 38END(testfly) 39#endif 40 41#ifdef __alpha__ 42LEAF(testfly, 0) 43 ret zero,(ra),1 44 nop 45END(testfly) 46#endif 47 48#ifdef __hppa__ 49LEAF_ENTRY(testfly) 50 bv r0(rp) 51 nop 52EXIT(testfly) 53#endif 54 55#ifdef __arm__ 56ENTRY(testfly) 57 mov pc, lr 58END(testfly) 59#endif 60 61#ifdef __mips64__ 62LEAF(testfly, 0) 63 jr ra 64 nop 65END(testfly) 66#endif 67 68#ifdef __powerpc__ 69ENTRY(testfly) 70 blr 71END(testfly) 72#endif 73 74#if defined(__sparc64__) 75ENTRY(testfly) 76 retl 77 nop 78END(testfly) 79#endif 80 81 .space 16384 82