1554ff184Skais/* 2554ff184Skais * CDDL HEADER START 3554ff184Skais * 4554ff184Skais * The contents of this file are subject to the terms of the 5*afd1ac7bSwesolows * Common Development and Distribution License (the "License"). 6*afd1ac7bSwesolows * You may not use this file except in compliance with the License. 7554ff184Skais * 8554ff184Skais * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9554ff184Skais * or http://www.opensolaris.org/os/licensing. 10554ff184Skais * See the License for the specific language governing permissions 11554ff184Skais * and limitations under the License. 12554ff184Skais * 13554ff184Skais * When distributing Covered Code, include this CDDL HEADER in each 14554ff184Skais * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15554ff184Skais * If applicable, add the following below this CDDL HEADER, with the 16554ff184Skais * fields enclosed by brackets "[]" replaced with your own identifying 17554ff184Skais * information: Portions Copyright [yyyy] [name of copyright owner] 18554ff184Skais * 19554ff184Skais * CDDL HEADER END 20554ff184Skais */ 21*afd1ac7bSwesolows 22554ff184Skais/* 23554ff184Skais * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24554ff184Skais * Use is subject to license terms. 25554ff184Skais */ 26554ff184Skais 27*afd1ac7bSwesolows#pragma ident "%Z%%M% %I% %E% SMI" 28*afd1ac7bSwesolows 29554ff184Skais/* 30554ff184Skais * byteswap.il -- definitions for .inline functions for little-endian loads. 31554ff184Skais * 32554ff184Skais * right now, this file is only used on UltraSPARC architectures, 33554ff184Skais * which have a special address space identifier for loading 32 and 16 bit 34554ff184Skais * integers in little-endian byte order. 35554ff184Skais * 36554ff184Skais * note: apparently these files are not preprocessed, so we cannot 37*afd1ac7bSwesolows * use `ASI_PL'. 38554ff184Skais * 39*afd1ac7bSwesolows * This file and common/crypto/md5/md5_byteswap.h implement the 40*afd1ac7bSwesolows * same thing and must be changed together. 41554ff184Skais */ 42554ff184Skais 43554ff184Skais .inline load_little_32, 4 44554ff184Skais lduwa [%o0]0x88, %o0 45554ff184Skais .end 46554ff184Skais 47554ff184Skais .inline load_little_16, 4 48554ff184Skais lduha [%o0]0x88, %o0 49554ff184Skais .end 50554ff184Skais 51554ff184Skais .inline set_little,4 52554ff184Skais wr %g0, %o0, %asi 53554ff184Skais .end 54554ff184Skais 55554ff184Skais .inline get_little,0 56554ff184Skais rd %asi, %o0 57554ff184Skais .end 58554ff184Skais 59554ff184Skais .inline load_little_32_0, 4 60554ff184Skais lduwa [%o0]%asi, %o0 61554ff184Skais .end 62554ff184Skais 63554ff184Skais .inline load_little_32_1, 4 64554ff184Skais lduwa [%o0 + 4]%asi, %o0 65554ff184Skais .end 66554ff184Skais 67554ff184Skais .inline load_little_32_2, 4 68554ff184Skais lduwa [%o0 + 8]%asi, %o0 69554ff184Skais .end 70554ff184Skais 71554ff184Skais .inline load_little_32_3, 4 72554ff184Skais lduwa [%o0 + 12]%asi, %o0 73554ff184Skais .end 74554ff184Skais 75554ff184Skais .inline load_little_32_4, 4 76554ff184Skais lduwa [%o0 + 16]%asi, %o0 77554ff184Skais .end 78554ff184Skais 79554ff184Skais .inline load_little_32_5, 4 80554ff184Skais lduwa [%o0 + 20]%asi, %o0 81554ff184Skais .end 82554ff184Skais 83554ff184Skais .inline load_little_32_6, 4 84554ff184Skais lduwa [%o0 + 24]%asi, %o0 85554ff184Skais .end 86554ff184Skais 87554ff184Skais .inline load_little_32_7, 4 88554ff184Skais lduwa [%o0 + 28]%asi, %o0 89554ff184Skais .end 90554ff184Skais 91554ff184Skais .inline load_little_32_8, 4 92554ff184Skais lduwa [%o0 + 32]%asi, %o0 93554ff184Skais .end 94554ff184Skais 95554ff184Skais .inline load_little_32_9, 4 96554ff184Skais lduwa [%o0 + 36]%asi, %o0 97554ff184Skais .end 98554ff184Skais 99554ff184Skais .inline load_little_32_a, 4 100554ff184Skais lduwa [%o0 + 40]%asi, %o0 101554ff184Skais .end 102554ff184Skais 103554ff184Skais .inline load_little_32_b, 4 104554ff184Skais lduwa [%o0 + 44]%asi, %o0 105554ff184Skais .end 106554ff184Skais 107554ff184Skais .inline load_little_32_c, 4 108554ff184Skais lduwa [%o0 + 48]%asi, %o0 109554ff184Skais .end 110554ff184Skais 111554ff184Skais .inline load_little_32_d, 4 112554ff184Skais lduwa [%o0 + 52]%asi, %o0 113554ff184Skais .end 114554ff184Skais 115554ff184Skais .inline load_little_32_e, 4 116554ff184Skais lduwa [%o0 + 56]%asi, %o0 117554ff184Skais .end 118554ff184Skais 119554ff184Skais .inline load_little_32_f, 4 120554ff184Skais lduwa [%o0 + 60]%asi, %o0 121554ff184Skais .end 122554ff184Skais 123