OpenCores
URL https://opencores.org/ocsvn/hf-risc/hf-risc/trunk

Subversion Repositories hf-risc

[/] [hf-risc/] [trunk/] [tools/] [riscv-gnu-toolchain-master/] [glibc/] [sysdeps/] [riscv/] [setjmp.S] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
/* Copyright (C) 1996, 1997, 2000, 2002, 2003, 2004
2
        Free Software Foundation, Inc.
3
   This file is part of the GNU C Library.
4
 
5
   The GNU C Library is free software; you can redistribute it and/or
6
   modify it under the terms of the GNU Lesser General Public
7
   License as published by the Free Software Foundation; either
8
   version 2.1 of the License, or (at your option) any later version.
9
 
10
   The GNU C Library is distributed in the hope that it will be useful,
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
   Lesser General Public License for more details.
14
 
15
   You should have received a copy of the GNU Lesser General Public
16
   License along with the GNU C Library; if not, write to the Free
17
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18
   02111-1307 USA.  */
19
 
20
#include 
21
#include 
22
 
23
ENTRY (_setjmp)
24
  li    a1, 0
25
  j     __sigsetjmp
26
END (_setjmp)
27
ENTRY (setjmp)
28
  li    a1, 1
29
  /* Fallthrough */
30
END (setjmp)
31
ENTRY (__sigsetjmp)
32
        REG_S ra,  0*SZREG(a0)
33
        REG_S s0,  1*SZREG(a0)
34
        REG_S s1,  2*SZREG(a0)
35
        REG_S s2,  3*SZREG(a0)
36
        REG_S s3,  4*SZREG(a0)
37
        REG_S s4,  5*SZREG(a0)
38
        REG_S s5,  6*SZREG(a0)
39
        REG_S s6,  7*SZREG(a0)
40
        REG_S s7,  8*SZREG(a0)
41
        REG_S s8,  9*SZREG(a0)
42
        REG_S s9, 10*SZREG(a0)
43
        REG_S s10,11*SZREG(a0)
44
        REG_S s11,12*SZREG(a0)
45
        REG_S sp, 13*SZREG(a0)
46
 
47
#ifdef __riscv_hard_float
48
        frsr a3
49
 
50
        fsd  fs0, 16*SZREG+ 0*8(a0)
51
        fsd  fs1, 16*SZREG+ 1*8(a0)
52
        fsd  fs2, 16*SZREG+ 2*8(a0)
53
        fsd  fs3, 16*SZREG+ 3*8(a0)
54
        fsd  fs4, 16*SZREG+ 4*8(a0)
55
        fsd  fs5, 16*SZREG+ 5*8(a0)
56
        fsd  fs6, 16*SZREG+ 6*8(a0)
57
        fsd  fs7, 16*SZREG+ 7*8(a0)
58
        fsd  fs8, 16*SZREG+ 8*8(a0)
59
        fsd  fs9, 16*SZREG+ 9*8(a0)
60
        fsd  fs10,16*SZREG+10*8(a0)
61
        fsd  fs11,16*SZREG+11*8(a0)
62
 
63
        REG_S a3, 15*SZREG(a0)
64
#endif
65
 
66
#if !IS_IN (libc) && IS_IN (rtld)
67
  /* In ld.so we never save the signal mask.  */
68
  li a0, 0
69
  ret
70
#else
71
  /* Make a tail call to __sigjmp_save; it takes the same args.  */
72
  j __sigjmp_save
73
#endif
74
 
75
 
76
END(__sigsetjmp)
77
 
78
weak_alias(_setjmp, __GI__setjmp)

powered by: WebSVN 2.1.0

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