Print this page
de-linting of .s files

*** 40,64 **** #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 --- 40,51 ----
*** 66,117 **** 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. */ --- 53,72 ----
*** 222,258 **** .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) */ --- 177,187 ----
*** 281,311 **** 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 */ --- 210,224 ----
*** 326,352 **** 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) --- 239,249 ----
*** 358,400 **** 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 --- 255,277 ----
*** 412,440 **** 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 --- 289,303 ----
*** 452,473 **** 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 --- 315,324 ----
*** 476,501 **** 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 --- 327,340 ----
*** 503,508 **** movl (%rsp), %eax leave ret SET_SIZE(fpgetmxcsr) - #endif /* __lint */ --- 342,346 ----