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/] [sys/] [asm.h] - Blame information for rev 13

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 serginhofr
/* copyright (c) 1997, 1998, 2002, 2003, 2004, 2005
2
   Free Software Foundation, Inc.
3
   This file is part of the GNU C Library.
4
   Contributed by Ralf Baechle <ralf@gnu.org>.
5
 
6
   The GNU C Library is free software; you can redistribute it and/or
7
   modify it under the terms of the GNU Lesser General Public
8
   License as published by the Free Software Foundation; either
9
   version 2.1 of the License, or (at your option) any later version.
10
 
11
   The GNU C Library is distributed in the hope that it will be useful,
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
   Lesser General Public License for more details.
15
 
16
   You should have received a copy of the GNU Lesser General Public
17
   License along with the GNU C Library; if not, write to the Free
18
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19
   02111-1307 USA.  */
20
 
21
#ifndef _SYS_ASM_H
22
#define _SYS_ASM_H
23
 
24
/*
25
 * Macros to handle different pointer/register sizes for 32/64-bit code
26
 */
27
#ifdef __riscv64
28
# define PTR .dword
29
# define PTRLOG 3
30
# define SZREG  8
31
# define REG_S sd
32
# define REG_L ld
33
#else
34
# define PTR .word
35
# define PTRLOG 2
36
# define SZREG  4
37
# define REG_S sw
38
# define REG_L lw
39
#endif
40
 
41
/*
42
 * LEAF - declare leaf routine
43
 */
44
#define LEAF(symbol)                            \
45
                .globl  symbol;                 \
46
                .align  2;                      \
47
                .type   symbol,@function;       \
48
symbol:                                         \
49
                cfi_startproc;
50
 
51
/*
52
 * NESTED - declare nested routine entry point
53
 */
54
#define NESTED(symbol, framesize, rpc) LEAF(symbol)
55
 
56
/*
57
 * END - mark end of function
58
 */
59
#undef END
60
#define END(function)                           \
61
                cfi_endproc;                    \
62
                .size   function,.-function
63
 
64
/*
65
 * Stack alignment
66
 */
67
#define ALMASK  ~15
68
 
69
#endif /* sys/asm.h */

powered by: WebSVN 2.1.0

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