Print this page
de-linting of .s files


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 
  26 #pragma ident   "%Z%%M% %I%     %E% SMI"
  27 
  28 #include <sys/asm_linkage.h>
  29 #include <sys/machthread.h>
  30 #include <sys/privregs.h>
  31 #include <sys/machasi.h>
  32 #include <sys/trap.h>
  33 #include <sys/mmu.h>
  34 #include <sys/machparam.h>
  35 #include <sys/machtrap.h>
  36 #include <sys/traptrace.h>
  37 
  38 #if !defined(lint)
  39 #include "assym.h"
  40 
  41         /*
  42          * Spill fault handlers
  43          *   sn0 - spill normal tl 0
  44          *   sn1 - spill normal tl >0
  45          *   so0 - spill other tl 0
  46          *   so1 - spill other tl >0
  47          */
  48 
  49         ENTRY_NP(fault_32bit_sn0)
  50         !
  51         FAULT_WINTRACE(%g1, %g2, %g3, TT_F32_SN0)
  52         !
  53         ! Spill normal tl0 fault.
  54         ! This happens when a user tries to spill to an unmapped or
  55         ! misaligned stack. We handle an unmapped stack by simulating
  56         ! a pagefault at the trap pc and a misaligned stack by generating
  57         ! a user alignment trap.
  58         !


 436         FAULT_WINTRACE(%g1, %g2, %g3, TT_F64_FN0)
 437         b       .fault_fn0_common
 438           nop
 439         SET_SIZE(fault_64bit_fn0)
 440 
 441         ENTRY_NP(fault_64bit_fn1)
 442         FAULT_WINTRACE(%g1, %g2, %g3, TT_F64_FN1)
 443         b       .fault_fn1_common
 444           nop
 445         SET_SIZE(fault_64bit_fn1)
 446 
 447         /*
 448          * Kernel fault handlers
 449          */
 450         ENTRY_NP(fault_32bit_not)
 451         ENTRY_NP(fault_64bit_not)
 452         ba,pt   %xcc, ptl1_panic
 453         mov     PTL1_BAD_WTRAP, %g1
 454         SET_SIZE(fault_32bit_not)
 455         SET_SIZE(fault_64bit_not)
 456 #endif /* !lint */


   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23  * Use is subject to license terms.
  24  */
  25 


  26 #include <sys/asm_linkage.h>
  27 #include <sys/machthread.h>
  28 #include <sys/privregs.h>
  29 #include <sys/machasi.h>
  30 #include <sys/trap.h>
  31 #include <sys/mmu.h>
  32 #include <sys/machparam.h>
  33 #include <sys/machtrap.h>
  34 #include <sys/traptrace.h>
  35 

  36 #include "assym.h"
  37 
  38         /*
  39          * Spill fault handlers
  40          *   sn0 - spill normal tl 0
  41          *   sn1 - spill normal tl >0
  42          *   so0 - spill other tl 0
  43          *   so1 - spill other tl >0
  44          */
  45 
  46         ENTRY_NP(fault_32bit_sn0)
  47         !
  48         FAULT_WINTRACE(%g1, %g2, %g3, TT_F32_SN0)
  49         !
  50         ! Spill normal tl0 fault.
  51         ! This happens when a user tries to spill to an unmapped or
  52         ! misaligned stack. We handle an unmapped stack by simulating
  53         ! a pagefault at the trap pc and a misaligned stack by generating
  54         ! a user alignment trap.
  55         !


 433         FAULT_WINTRACE(%g1, %g2, %g3, TT_F64_FN0)
 434         b       .fault_fn0_common
 435           nop
 436         SET_SIZE(fault_64bit_fn0)
 437 
 438         ENTRY_NP(fault_64bit_fn1)
 439         FAULT_WINTRACE(%g1, %g2, %g3, TT_F64_FN1)
 440         b       .fault_fn1_common
 441           nop
 442         SET_SIZE(fault_64bit_fn1)
 443 
 444         /*
 445          * Kernel fault handlers
 446          */
 447         ENTRY_NP(fault_32bit_not)
 448         ENTRY_NP(fault_64bit_not)
 449         ba,pt   %xcc, ptl1_panic
 450         mov     PTL1_BAD_WTRAP, %g1
 451         SET_SIZE(fault_32bit_not)
 452         SET_SIZE(fault_64bit_not)