]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgcc/config/arc/crttls.S
Update copyright years.
[thirdparty/gcc.git] / libgcc / config / arc / crttls.S
1 ; newlib tls glue code for Synopsys DesignWare ARC cpu.
2
3 /* Copyright (C) 2016-2020 Free Software Foundation, Inc.
4 Contributor: Joern Rennecke <joern.rennecke@embecosm.com>
5 on behalf of Synopsys Inc.
6
7 This file is part of GCC.
8
9 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later
12 version.
13
14 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 for more details.
18
19 Under Section 7 of GPL version 3, you are granted additional
20 permissions described in the GCC Runtime Library Exception, version
21 3.1, as published by the Free Software Foundation.
22
23 You should have received a copy of the GNU General Public License and
24 a copy of the GCC Runtime Library Exception along with this program;
25 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
26 <http://www.gnu.org/licenses/>. */
27
28 /* As a special exception, if you link this library with other files,
29 some of which are compiled with GCC, to produce an executable,
30 this library does not by itself cause the resulting executable
31 to be covered by the GNU General Public License.
32 This exception does not however invalidate any other reasons why
33 the executable file might be covered by the GNU General Public License. */
34
35
36 #if (__ARC_TLS_REGNO__ != -1)
37 /* ANSI concatenation macros. */
38
39 #define CONCAT1(a, b) CONCAT2(a, b)
40 #define CONCAT2(a, b) a ## b
41
42 /* Use the right prefix for global labels. */
43
44 #define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
45
46 #define FUNC(X) .type SYM(X),@function
47 #define ENDFUNC0(X) .Lfe_##X: .size X,.Lfe_##X-X
48 #define ENDFUNC(X) ENDFUNC0(X)
49
50 .global SYM(__read_tp)
51 SYM(__read_tp):
52 FUNC(__read_tp)
53 mov r0, CONCAT1 (r, __ARC_TLS_REGNO__)
54 nop
55 j [blink]
56 ENDFUNC(__read_tp)
57
58 .section .init
59 mov CONCAT1 (r, __ARC_TLS_REGNO__),__main_tcb_end+256
60
61 .section .tbss
62 __main_tcb:
63 .long 0
64 .long 0
65 __main_tcb_end:
66
67 #endif /*__ARC_TLS_REGNO__ != -1 */