1 /* Callee-saved register spill and fill routines for RISC-V.
3 Copyright (C) 2016-2017 Free Software Foundation, Inc.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
28 .globl __riscv_save_12
29 .globl __riscv_save_11
30 .globl __riscv_save_10
42 .globl __riscv_restore_12
43 .globl __riscv_restore_11
44 .globl __riscv_restore_10
45 .globl __riscv_restore_9
46 .globl __riscv_restore_8
47 .globl __riscv_restore_7
48 .globl __riscv_restore_6
49 .globl __riscv_restore_5
50 .globl __riscv_restore_4
51 .globl __riscv_restore_3
52 .globl __riscv_restore_2
53 .globl __riscv_restore_1
54 .globl __riscv_restore_0
56 #if __riscv_xlen == 64
60 # __riscv_save_* routine use t0/x5 as return address
63 .cfi_def_cfa_offset 112
73 .cfi_def_cfa_offset 112
88 .cfi_def_cfa_offset 112
105 .cfi_def_cfa_offset 112
127 .cfi_def_cfa_offset 112
151 .cfi_def_cfa_offset 112
162 # CFA info is not correct in next 2 instruction since t1's
163 # value is depend on how may register really save.
171 # __riscv_save_* routine use t0/x5 as return address
174 .cfi_def_cfa_offset 16
184 .cfi_def_cfa_offset 112
205 .cfi_def_cfa_offset 96
217 .cfi_def_cfa_offset 80
231 .cfi_def_cfa_offset 64
247 .cfi_def_cfa_offset 48
265 .cfi_def_cfa_offset 32
285 .cfi_def_cfa_offset 16
291 .cfi_def_cfa_offset 0
299 # __riscv_save_* routine use t0/x5 as return address
302 .cfi_def_cfa_offset 64
314 .cfi_def_cfa_offset 64
337 .cfi_def_cfa_offset 64
356 # CFA info is not correct in next 2 instruction since t1's
357 # value is depend on how may register really save.
367 # __riscv_save_* routine use t0/x5 as return address
370 .cfi_def_cfa_offset 16
383 .cfi_def_cfa_offset 64
406 .cfi_def_cfa_offset 48
426 .cfi_def_cfa_offset 32
449 .cfi_def_cfa_offset 16
459 .cfi_def_cfa_offset 0