OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [libgloss/] [mt/] [trap.S] - Blame information for rev 857

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
;;
2
;;  The errno will be in r5 if r11 is -1.
3
;;
4
        .text
5
        .global __trap0
6
__trap0:
7
        ;; non-leaf function so need to create stack frame to
8
        ;; store ra and fp
9
        subi    sp, sp, #16
10
        stw     ra, sp, #12
11
        or      r0, r0, r0              ;; nop
12
        stw     fp, sp, #8
13
        or      fp, sp, sp
14
        stw     r5, sp, #4
15
        or      r0, r0, r0              ;; nop
16
        stw     r6, sp, #0
17
        addi    r6, r0, #$-1
18
        si      r14
19
        or      r0, r0, r0              ;; nop
20
        brne    r11, r6, .L0
21
        ldui    r6, #%hi16(errno)
22
        addui   r6, r6, #%lo16(errno)
23
        stw     r5, r6, #0
24
        or      r0, r0, r0              ;; nop
25
.L0:
26
        ldw     r6, sp, #0
27
        or      r0, r0, r0              ;; nop
28
        ldw     r5, sp, #4
29
        or      r0, r0, r0              ;; nop
30
        ldw     ra, sp, #12
31
        or      r0, r0, r0              ;; nop
32
        ldw     fp, sp, #8
33
        jal     r0, r14
34
        addi    sp, sp, #16

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.