Automatic date update in version.in
[binutils-gdb.git] / sim / bfin / linux-fixed-code.s
blob535654bc7bd9a0e0afbd6808051a30bb92727ece
1 /* Linux fixed code userspace ABI
3 Copyright (C) 2005-2024 Free Software Foundation, Inc.
4 Contributed by Analog Devices, Inc.
6 This file is part of simulators.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* For more info, see this page:
22 http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:fixed-code */
24 .text
26 .align 16
27 _sigreturn_stub:
28 P0 = 173;
29 EXCPT 0;
30 0: JUMP.S 0b;
32 .align 16
33 _atomic_xchg32:
34 R0 = [P0];
35 [P0] = R1;
36 rts;
38 .align 16
39 _atomic_cas32:
40 R0 = [P0];
41 CC = R0 == R1;
42 IF !CC JUMP 1f;
43 [P0] = R2;
45 rts;
47 .align 16
48 _atomic_add32:
49 R1 = [P0];
50 R0 = R1 + R0;
51 [P0] = R0;
52 rts;
54 .align 16
55 _atomic_sub32:
56 R1 = [P0];
57 R0 = R1 - R0;
58 [P0] = R0;
59 rts;
61 .align 16
62 _atomic_ior32:
63 R1 = [P0];
64 R0 = R1 | R0;
65 [P0] = R0;
66 rts;
68 .align 16
69 _atomic_and32:
70 R1 = [P0];
71 R0 = R1 & R0;
72 [P0] = R0;
73 rts;
75 .align 16
76 _atomic_xor32:
77 R1 = [P0];
78 R0 = R1 ^ R0;
79 [P0] = R0;
80 rts;
82 .align 16
83 _safe_user_instruction:
84 NOP; NOP; NOP; NOP;
85 EXCPT 0x4;