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