Home | History | Annotate | Line # | Download | only in ia64
byte_swap_8.S revision 1.1.4.2
      1  1.1.4.2  yamt /*	$NetBSD: byte_swap_8.S,v 1.1.4.2 2009/08/19 18:48:19 yamt Exp $	*/
      2  1.1.4.2  yamt 
      3  1.1.4.2  yamt /*-
      4  1.1.4.2  yamt  * Copyright (c) 1996 Carnegie-Mellon University.
      5  1.1.4.2  yamt  * All rights reserved.
      6  1.1.4.2  yamt  *
      7  1.1.4.2  yamt  * Author: Chris G. Demetriou
      8  1.1.4.2  yamt  *
      9  1.1.4.2  yamt  * Permission to use, copy, modify and distribute this software and
     10  1.1.4.2  yamt  * its documentation is hereby granted, provided that both the copyright
     11  1.1.4.2  yamt  * notice and this permission notice appear in all copies of the
     12  1.1.4.2  yamt  * software, derivative works or modified versions, and any portions
     13  1.1.4.2  yamt  * thereof, and that both notices appear in supporting documentation.
     14  1.1.4.2  yamt  *
     15  1.1.4.2  yamt  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  1.1.4.2  yamt  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  1.1.4.2  yamt  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  1.1.4.2  yamt  *
     19  1.1.4.2  yamt  * Carnegie Mellon requests users of this software to return to
     20  1.1.4.2  yamt  *
     21  1.1.4.2  yamt  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  1.1.4.2  yamt  *  School of Computer Science
     23  1.1.4.2  yamt  *  Carnegie Mellon University
     24  1.1.4.2  yamt  *  Pittsburgh PA 15213-3890
     25  1.1.4.2  yamt  *
     26  1.1.4.2  yamt  * any improvements or extensions that they make and grant Carnegie the
     27  1.1.4.2  yamt  * rights to redistribute these changes.
     28  1.1.4.2  yamt  */
     29  1.1.4.2  yamt 
     30  1.1.4.2  yamt #include <machine/asm.h>
     31  1.1.4.2  yamt 
     32  1.1.4.2  yamt #ifndef NAME
     33  1.1.4.2  yamt #error NAME not defined
     34  1.1.4.2  yamt #endif
     35  1.1.4.2  yamt 
     36  1.1.4.2  yamt /*
     37  1.1.4.2  yamt  * Byte-swap a 8-byte quantity.
     38  1.1.4.2  yamt  *   (Convert 0x0123456789012345 to 0x4523018967452301.)
     39  1.1.4.2  yamt  *
     40  1.1.4.2  yamt  * Argument is an unsigned 8-byte integer (u_int64_t).
     41  1.1.4.2  yamt  */
     42  1.1.4.2  yamt ENTRY(NAME, 1)
     43  1.1.4.2  yamt 	mux1	r8=in0,@rev
     44  1.1.4.2  yamt 	br.ret.sptk.few rp
     45  1.1.4.2  yamt END(NAME)
     46