Print this page
de-linting of .s files

@@ -40,25 +40,12 @@
 #include <sys/asm_misc.h>
 #include <sys/regset.h>
 #include <sys/privregs.h>
 #include <sys/x86_archext.h>
 
-#if defined(__lint)
-#include <sys/types.h>
-#include <sys/fp.h>
-#else
 #include "assym.h"
-#endif
 
-#if defined(__lint)
- 
-uint_t
-fpu_initial_probe(void)
-{ return (0); }
-
-#else   /* __lint */
-
         /*
          * Returns zero if x87 "chip" is present(!)
          */
         ENTRY_NP(fpu_initial_probe)
         CLTS

@@ -66,52 +53,20 @@
         fnstsw  %ax
         movzbl  %al, %eax
         ret
         SET_SIZE(fpu_initial_probe)
 
-#endif  /* __lint */
-
-#if defined(__lint)
-
-/*ARGSUSED*/
-void
-fxsave_insn(struct fxsave_state *fx)
-{}
-
-#else   /* __lint */
-
         ENTRY_NP(fxsave_insn)
         fxsaveq (%rdi)
         ret
         SET_SIZE(fxsave_insn)
 
-#endif  /* __lint */
-
 /*
  * One of these routines is called from any lwp with floating
  * point context as part of the prolog of a context switch.
  */
 
-#if defined(__lint)
-
-/*ARGSUSED*/
-void
-xsave_ctxt(void *arg)
-{}
-
-/*ARGSUSED*/
-void
-xsaveopt_ctxt(void *arg)
-{}
-
-/*ARGSUSED*/
-void
-fpxsave_ctxt(void *arg)
-{}
-
-#else   /* __lint */
-
 /*
  * These three functions define the Intel "xsave" handling for CPUs with
  * different features. Newer AMD CPUs can also use these functions. See the
  * 'exception pointers' comment below.
  */

@@ -222,37 +177,11 @@
         .align  8
 .fpzero_const:
         .4byte  0x0
         .4byte  0x0
 
-#endif  /* __lint */
 
-
-#if defined(__lint)
-
-/*ARGSUSED*/
-void
-fpsave(struct fnsave_state *f)
-{}
-
-/*ARGSUSED*/
-void
-fpxsave(struct fxsave_state *f)
-{}
-
-/*ARGSUSED*/
-void
-xsave(struct xsave_state *f, uint64_t m)
-{}
-
-/*ARGSUSED*/
-void
-xsaveopt(struct xsave_state *f, uint64_t m)
-{}
-
-#else   /* __lint */
-
         ENTRY_NP(fpxsave)
         CLTS
         fxsaveq (%rdi)
         fninit                          /* clear exceptions, init x87 tags */
         STTS(%rdi)                      /* set TS bit in %cr0 (disable FPU) */

@@ -281,31 +210,15 @@
         fninit                          /* clear exceptions, init x87 tags */
         STTS(%rdi)                      /* set TS bit in %cr0 (disable FPU) */
         ret
         SET_SIZE(xsaveopt)
 
-#endif  /* __lint */
-
 /*
  * These functions are used when restoring the FPU as part of the epilogue of a
  * context switch.
  */
 
-#if defined(__lint)
-
-/*ARGSUSED*/
-void
-fpxrestore_ctxt(void *arg)
-{}
-
-/*ARGSUSED*/
-void
-xrestore_ctxt(void *arg)
-{}
-
-#else   /* __lint */
-
         ENTRY(fpxrestore_ctxt)
         cmpl    $_CONST(FPU_EN|FPU_VALID), FPU_CTX_FPU_FLAGS(%rdi)
         jne     1f
         movl    $_CONST(FPU_EN), FPU_CTX_FPU_FLAGS(%rdi)
         movq    FPU_CTX_FPU_REGS(%rdi), %rdi /* fpu_regs.kfpu_u.kfpu_fx ptr */

@@ -326,27 +239,11 @@
         xrstor  (%rdi)
 1:
         ret
         SET_SIZE(xrestore_ctxt)
 
-#endif  /* __lint */
 
-
-#if defined(__lint)
-
-/*ARGSUSED*/
-void
-fpxrestore(struct fxsave_state *f)
-{}
-
-/*ARGSUSED*/
-void
-xrestore(struct xsave_state *f, uint64_t m)
-{}
-
-#else   /* __lint */
-
         ENTRY_NP(fpxrestore)
         CLTS
         fxrstorq        (%rdi)
         ret
         SET_SIZE(fpxrestore)

@@ -358,43 +255,23 @@
         shrq    $32, %rdx
         xrstor  (%rdi)
         ret
         SET_SIZE(xrestore)
 
-#endif  /* __lint */
-
 /*
  * Disable the floating point unit.
  */
 
-#if defined(__lint)
-
-void
-fpdisable(void)
-{}
-
-#else   /* __lint */
-
         ENTRY_NP(fpdisable)
         STTS(%rdi)                      /* set TS bit in %cr0 (disable FPU) */ 
         ret
         SET_SIZE(fpdisable)
 
-#endif  /* __lint */
-
 /*
  * Initialize the fpu hardware.
  */
 
-#if defined(__lint)
-
-void
-fpinit(void)
-{}
-
-#else   /* __lint */
-
         ENTRY_NP(fpinit)
         CLTS
         cmpl    $FP_XSAVE, fp_save_mech
         je      1f
 

@@ -412,29 +289,15 @@
         orl     $(XFEATURE_LEGACY_FP | XFEATURE_SSE), %eax
         xrstor (%rcx)
         ret
         SET_SIZE(fpinit)
 
-#endif  /* __lint */
-
 /*
  * Clears FPU exception state.
  * Returns the FP status word.
  */
 
-#if defined(__lint)
-
-uint32_t
-fperr_reset(void)
-{ return (0); }
-
-uint32_t
-fpxerr_reset(void)
-{ return (0); }
-
-#else   /* __lint */
-
         ENTRY_NP(fperr_reset)
         CLTS
         xorl    %eax, %eax
         fnstsw  %ax
         fnclex

@@ -452,22 +315,10 @@
         ldmxcsr (%rsp)                  /* clear processor exceptions */
         leave
         ret
         SET_SIZE(fpxerr_reset)
 
-#endif  /* __lint */
-
-#if defined(__lint)
-
-uint32_t
-fpgetcwsw(void)
-{
-        return (0);
-}
-
-#else   /* __lint */
-
         ENTRY_NP(fpgetcwsw)
         pushq   %rbp
         movq    %rsp, %rbp
         subq    $0x10, %rsp             /* make some temporary space    */
         CLTS

@@ -476,26 +327,14 @@
         movl    (%rsp), %eax            /* put both in %eax             */
         leave
         ret
         SET_SIZE(fpgetcwsw)
 
-#endif  /* __lint */
-
 /*
  * Returns the MXCSR register.
  */
 
-#if defined(__lint)
-
-uint32_t
-fpgetmxcsr(void)
-{
-        return (0);
-}
-
-#else   /* __lint */
-
         ENTRY_NP(fpgetmxcsr)
         pushq   %rbp
         movq    %rsp, %rbp
         subq    $0x10, %rsp             /* make some temporary space */
         CLTS

@@ -503,6 +342,5 @@
         movl    (%rsp), %eax
         leave
         ret
         SET_SIZE(fpgetmxcsr)
 
-#endif  /* __lint */