The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/include/asm-mips64/exception.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * This file is subject to the terms and conditions of the GNU General Public
    3  * License.  See the file "COPYING" in the main directory of this archive
    4  * for more details.
    5  *
    6  * Copyright (C) 1994 - 1999 by Ralf Baechle
    7  * Copyright (C) 1999 Silicon Graphics
    8  *
    9  * Low level exception handling
   10  */
   11 #include <asm/asm.h>
   12 #include <asm/regdef.h>
   13 #include <asm/fpregdef.h>
   14 #include <asm/mipsregs.h>
   15 #include <asm/stackframe.h>
   16 
   17         .macro  __build_clear_none
   18         .endm
   19 
   20         .macro  __build_clear_sti
   21         STI
   22         .endm
   23 
   24         .macro  __build_clear_cli
   25         CLI
   26         .endm
   27 
   28         .macro  __build_clear_fpe
   29         cfc1    a1, fcr31
   30         li      a2, ~(0x3f << 12)
   31         and     a2, a1
   32         ctc1    a2, fcr31
   33         STI
   34         .endm
   35 
   36         .macro  __build_clear_ade
   37         dmfc0   t0, CP0_BADVADDR
   38         sd      t0, PT_BVADDR(sp)
   39         KMODE
   40         .endm
   41 
   42         .macro  __BUILD_silent exception
   43         .endm
   44 
   45         /* Gas tries to parse the PRINT argument as a string containing
   46            string escapes and emits bogus warnings if it believes to
   47            recognize an unknown escape code.  So make the arguments
   48            start with an n and gas will believe \n is ok ...  */
   49         .macro  __BUILD_verbose nexception
   50         ld      a1, PT_EPC(sp)
   51         PRINT("Got \nexception at %016lx\012")
   52         .endm
   53 
   54         .macro  __BUILD_count exception
   55         .set    reorder
   56         ld      t0,exception_count_\exception
   57         daddiu  t0, 1
   58         sd      t0,exception_count_\exception
   59         .set    noreorder
   60         .comm   exception_count\exception, 8, 8
   61         .endm
   62 
   63         .macro  BUILD_HANDLER exception handler clear verbose
   64         .align  5
   65         NESTED(handle_\exception, PT_SIZE, sp)
   66         .set    noat
   67         SAVE_ALL
   68         __BUILD_clear_\clear
   69         .set    at
   70         __BUILD_\verbose \exception
   71         move    a0, sp
   72         jal     do_\handler
   73         j       ret_from_exception
   74          nop
   75         END(handle_\exception)
   76         .endm

Cache object: 315faaaf281d45b29417639ec3f0273f


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.