Print this page
de-linting of .s files

@@ -30,13 +30,11 @@
 #include <sys/machpcb.h>
 #include <sys/machtrap.h>
 #include <sys/machsig.h>
 #include <sys/machthread.h>
 
-#if !defined(lint) && !defined(__lint)
 #include "assym.h"
-#endif  /* lint */
 
 /*
  * Floating point trap handling.
  *
  *      The FPU is always in a V9 current configuration.

@@ -79,20 +77,10 @@
  *              has the same fsr version number).
  *      4. The stqf{a}/ldqf{a} instructions cause kaos errors, for reasons
  *              that appear to be a kaos bug, so don't use them!
  */
 
-#if defined(lint) || defined(__lint)
-
-#ifdef FP_DISABLED
-int fpu_exists = 0;
-#else
-int fpu_exists = 1;
-#endif
-
-#else   /* lint */
-
         .section ".data"
         .align  8
 fsrholder:
         .word   0                       ! dummy place to write fsr
         .word   0

@@ -105,28 +93,17 @@
 #endif
 
         DGDEF(fpu_version)
         .word   -1
 
-#endif  /* lint */
-
 /*
  * FPU probe - read the %fsr and get fpu_version.
  * Called from autoconf. If a %fq is created for
  * future cpu versions, a fq_exists variable
  * could be created by this function.
  */
 
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-fpu_probe(void)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(fpu_probe)
         wr      %g0, FPRS_FEF, %fprs    ! enable fpu in fprs
         rdpr    %pstate, %g2            ! read pstate, save value in %g2
         or      %g2, PSTATE_PEF, %g1    ! new pstate with fpu enabled
         wrpr    %g1, %g0, %pstate       ! write pstate

@@ -142,12 +119,10 @@
 
         ba      fp_kstat_init           ! initialize the fpu_kstat
         wr      %g0, %g0, %fprs         ! disable fpu and clear fprs
         SET_SIZE(fpu_probe)
 
-#endif  /* lint */
-
 /*
  * fp_clearregs(fp)
  *      struct v9_fpu *fp;
  *
  * Initialization for the hardware fpu.

@@ -154,19 +129,10 @@
  * Clear the fsr and initialize registers to NaN (-1)
  * The caller (fp_disabled) is supposed to update the fprs
  * so when the return to userland is made, the fpu is enabled.
  */
 
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-fp_clearregs(kfpu_t *fp)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(fp_clearregs)
         ldx     [%o0 + FPU_FSR], %fsr           ! load fsr
 
         mov     -1, %g2                         ! -1 is NaN
         stx     %g2, [%o0]                      ! initialize %f0

@@ -203,12 +169,10 @@
         ldd     [%o0], %d60
         retl
         ldd     [%o0], %d62
         SET_SIZE(fp_clearregs)
 
-#endif  /* lint */
-
 /*
  * void _fp_read_pfreg(pf, n)
  *      uint32_t        *pf;    Old freg value.
  *      unsigned        n;      Want to read register n
  *

@@ -224,24 +188,10 @@
  * {
  *      %f[n] = *pf;
  * }
  */
 
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-_fp_read_pfreg(uint32_t *pf, u_int n)
-{}
-
-/*ARGSUSED*/
-void
-_fp_write_pfreg(uint32_t *pf, u_int n)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_read_pfreg)
         sll     %o1, 3, %o1             ! Table entries are 8 bytes each.
         set     .stable, %g1            ! g1 gets base of table.
         jmp     %g1 + %o1               ! Jump into table
         nop                             ! Can't follow CTI by CTI.

@@ -324,12 +274,10 @@
         LOADFP(30)
         LOADFP(31)
         SET_SIZE(_fp_read_pfreg)
         SET_SIZE(_fp_write_pfreg)
 
-#endif  /* lint */
-
 /*
  * void _fp_read_pdreg(
  *      uint64_t        *pd,    Old dreg value.
  *      u_int   n)              Want to read register n
  *

@@ -345,24 +293,10 @@
  * {
  *      %d[n] = *pd;
  * }
  */
 
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-_fp_read_pdreg(uint64_t *pd, u_int n)
-{}
-
-/*ARGSUSED*/
-void
-_fp_write_pdreg(uint64_t *pd, u_int n)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_read_pdreg)
         sll     %o1, 3, %o1             ! Table entries are 8 bytes each.
         set     .dstable, %g1           ! g1 gets base of table.
         jmp     %g1 + %o1               ! Jump into table
         nop                             ! Can't follow CTI by CTI.

@@ -445,91 +379,36 @@
         LOADDP(60)
         LOADDP(62)
         SET_SIZE(_fp_read_pdreg)
         SET_SIZE(_fp_write_pdreg)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-_fp_write_pfsr(uint64_t *fsr)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_write_pfsr)
         retl
         ldx     [%o0], %fsr
         SET_SIZE(_fp_write_pfsr)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-_fp_read_pfsr(uint64_t *fsr)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_read_pfsr)
         retl
         stx     %fsr, [%o0]
         SET_SIZE(_fp_read_pfsr)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-/*ARGSUSED*/
-void
-_fp_write_fprs(u_int fprs_val)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_write_fprs)
         retl
         wr      %o0, %g0, %fprs                 ! write fprs
         SET_SIZE(_fp_write_fprs)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-unsigned
-_fp_read_fprs(void)
-{return 0;}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_read_fprs)
         retl
         rd      %fprs, %o0                      ! save fprs
         SET_SIZE(_fp_read_fprs)
 
-#endif  /* lint */
-
-#if defined(lint) || defined(__lint)
-
-unsigned
-_fp_subcc_ccr(void)
-{return 0;}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_subcc_ccr)
         subcc   %o0, %o1, %g0
         retl
         rd      %ccr, %o0                       ! save ccr
         SET_SIZE(_fp_subcc_ccr)
 
-#endif  /* lint */
-
 /*
  * Floating Point Exceptions handled according to type:
  *      2) unfinished_fpop
  *              re-execute the faulty instruction(s) using
  *              software emulation (must do every instruction in FQ)

@@ -545,19 +424,10 @@
  * for execution of kernel code.
  * Note: this code could be changed to be part of the cpu-specific
  * (ie, Spitfire-specific) module code before final release.
  */
 
-#if defined(lint)
-
-/* ARGSUSED */
-void
-_fp_exception(struct regs *rp, uint64_t fsr)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_exception)
         mov     %o7, %l0                ! saved return address
         mov     %o0, %l1                ! saved *rp
         set     FSR_FTT, %o4            ! put FSR_FTT in %o4
         xor     %o4, 0xffffffffffffffff, %o3 ! xor FSR_FTT to get

@@ -613,12 +483,10 @@
 #ifdef  DEBUG
 .badfpfttmsg:
         .asciz  "No floating point ftt, fsr %llx"
 #endif  /* DEBUG */
 
-#endif  /* lint */
-
 /*
  * Floating Point Exceptions.
  * handled according to type:
  *      1) IEEE_exception
  *              re-execute the faulty instruction(s) using

@@ -626,19 +494,10 @@
  *
  * This code assumes the trap preamble has set up the window environment
  * for execution of kernel code.
  */
 
-#if defined(lint)
-
-/* ARGSUSED */
-void
-_fp_ieee_exception(struct regs *rp, uint64_t fsr)
-{}
-
-#else   /* lint */
-
         ENTRY_NP(_fp_ieee_exception)
         mov     %o7, %l0                ! saved return address
         mov     %o0, %l1                ! saved *rp
         mov     %o1, %l2                ! saved fsr
         set     FSR_FTT, %o4            ! put FSR_FTT in %o4

@@ -721,6 +580,5 @@
         SET_SIZE(_fp_ieee_exception)
 
 .badfpcexcmsg:
         .asciz  "No floating point exception, fsr %llx"
 
-#endif  /* lint */