Print this page
de-linting of .s files


   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  *      Copyright (c) 1988-1991 by Sun Microsystems, Inc.
  24  */
  25 
  26 #ident  "%Z%%M% %I%     %E% SMI"        /* From SunOS 4.1 1.6 */
  27 
  28 #if defined(lint)
  29 #include <sys/types.h>
  30 #include <sys/regset.h>
  31 #include <sys/privregs.h>
  32 #endif  /* lint */
  33 
  34 #include <sys/asm_linkage.h>
  35 #include <sys/trap.h>
  36 #include <sys/machtrap.h>
  37 #include <sys/simulate.h>
  38 
  39 /*
  40  * C run time subroutines.
  41  *
  42  *      Those beginning in `.' are not callable from C and hence do not
  43  *      get lint prototypes.
  44  */
  45 
  46 #if !defined(lint)
  47 
  48 /*
  49  * Structure return
  50  */
  51 #define UNIMP           0
  52 #define MASK            0x00000fff
  53 #define STRUCT_VAL_OFF  (16*4)
  54 
  55         RTENTRY(.stret4)
  56         RTENTRY(.stret8)
  57         !
  58         ! see if key matches: if not, structure value not expected,
  59         ! so just return
  60         !
  61         ld      [%i7 + 8], %o3
  62         and     %o1, MASK, %o4
  63         sethi   %hi(UNIMP), %o5
  64         or      %o4, %o5, %o5
  65         cmp     %o5, %o3
  66         be,a    0f
  67         ld      [%fp + STRUCT_VAL_OFF], %i0     ! set expected return value


 141         SET_SIZE(__udiv64)
 142 
 143         RTENTRY(__rem64)
 144         ARGS_TO_64
 145         sdivx   %o1, %o2, %o3
 146         mulx    %o2, %o3, %o3
 147         sub     %o1, %o3, %o1
 148         retl
 149         srax    %o1, 32, %o0
 150         SET_SIZE(__rem64)
 151 
 152         RTENTRY(__urem64)
 153         ARGS_TO_64
 154         udivx   %o1, %o2, %o3
 155         mulx    %o2, %o3, %o3
 156         sub     %o1, %o3, %o1
 157         retl
 158         srax    %o1, 32, %o0
 159         SET_SIZE(__urem64)
 160 
 161 #endif /* !lint */


   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*
  23  *      Copyright (c) 1988-1991 by Sun Microsystems, Inc.
  24  */
  25 
  26 #ident  "%Z%%M% %I%     %E% SMI"        /* From SunOS 4.1 1.6 */
  27 






  28 #include <sys/asm_linkage.h>
  29 #include <sys/trap.h>
  30 #include <sys/machtrap.h>
  31 #include <sys/simulate.h>
  32 
  33 /*
  34  * C run time subroutines.
  35  *
  36  *      Those beginning in `.' are not callable from C and hence do not
  37  *      get lint prototypes.
  38  */
  39 


  40 /*
  41  * Structure return
  42  */
  43 #define UNIMP           0
  44 #define MASK            0x00000fff
  45 #define STRUCT_VAL_OFF  (16*4)
  46 
  47         RTENTRY(.stret4)
  48         RTENTRY(.stret8)
  49         !
  50         ! see if key matches: if not, structure value not expected,
  51         ! so just return
  52         !
  53         ld      [%i7 + 8], %o3
  54         and     %o1, MASK, %o4
  55         sethi   %hi(UNIMP), %o5
  56         or      %o4, %o5, %o5
  57         cmp     %o5, %o3
  58         be,a    0f
  59         ld      [%fp + STRUCT_VAL_OFF], %i0     ! set expected return value


 133         SET_SIZE(__udiv64)
 134 
 135         RTENTRY(__rem64)
 136         ARGS_TO_64
 137         sdivx   %o1, %o2, %o3
 138         mulx    %o2, %o3, %o3
 139         sub     %o1, %o3, %o1
 140         retl
 141         srax    %o1, 32, %o0
 142         SET_SIZE(__rem64)
 143 
 144         RTENTRY(__urem64)
 145         ARGS_TO_64
 146         udivx   %o1, %o2, %o3
 147         mulx    %o2, %o3, %o3
 148         sub     %o1, %o3, %o1
 149         retl
 150         srax    %o1, 32, %o0
 151         SET_SIZE(__urem64)
 152