aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain/glibc/patches/300-arc.patch
blob: 66f7aeb3efe53816ffaa449f3969cd94d4cfe3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- a/sysdeps/arc/atomic-machine.h
+++ b/sysdeps/arc/atomic-machine.h
@@ -64,6 +64,10 @@ typedef uintmax_t uatomic_max_t;
   __atomic_val_bysize (__arch_compare_and_exchange_val, int,		\
 		       mem, new, old, __ATOMIC_ACQUIRE)
 
+#ifdef __ARC700__
+#define atomic_full_barrier()  ({ asm volatile ("sync":::"memory"); })
+#else
 #define atomic_full_barrier()  ({ asm volatile ("dmb 3":::"memory"); })
+#endif
 
 #endif /* _ARC_BITS_ATOMIC_H */
--- a/sysdeps/unix/sysv/linux/arc/syscall.S
+++ b/sysdeps/unix/sysv/linux/arc/syscall.S
@@ -24,8 +24,13 @@ ENTRY (syscall)
 	mov_s	r1, r2
 	mov_s	r2, r3
 	mov_s	r3, r4
+#ifdef __ARC700__
+	mov	r4, r5
+	mov	r5, r6
+#else
 	mov_s	r4, r5
 	mov_s	r5, r6
+#endif
 
 	ARC_TRAP_INSN
 	brhi	r0, -4096, L (call_syscall_err)
--- a/sysdeps/unix/sysv/linux/arc/sysdep.h
+++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
@@ -128,7 +128,11 @@ L (call_syscall_err):			ASM_LINE_SEP	\
     mov    r8, __NR_##syscall_name	ASM_LINE_SEP	\
     ARC_TRAP_INSN			ASM_LINE_SEP
 
+# ifdef __ARC700__
+# define ARC_TRAP_INSN	trap0
+# else
 # define ARC_TRAP_INSN	trap_s 0
+# endif
 
 #else  /* !__ASSEMBLER__ */
 
@@ -139,7 +143,11 @@ extern long int __syscall_error (long in
 hidden_proto (__syscall_error)
 # endif
 
+# ifdef __ARC700__
+# define ARC_TRAP_INSN	"trap0		\n\t"
+# else
 # define ARC_TRAP_INSN	"trap_s 0	\n\t"
+#endif
 
 # undef INTERNAL_SYSCALL_NCS
 # define INTERNAL_SYSCALL_NCS(number, nr_args, args...)	\