diff options
author | Mark Hatle <mark.hatle@kernel.crashing.org> | 2020-06-28 20:40:30 -0500 |
---|---|---|
committer | Mark Hatle <mark.hatle@kernel.crashing.org> | 2020-08-14 11:56:32 -0500 |
commit | 557ab11ff5be82548b5fd97e9c75b3e9b7524414 (patch) | |
tree | 6818f78a17f08a03df2d3f32c17049d618703e30 /meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch | |
parent | 86146f2e5b25e5ac198f1ccef73fa39e5f870c72 (diff) | |
download | meta-xilinx-557ab11ff5be82548b5fd97e9c75b3e9b7524414.tar.gz |
Move microblaze specific items to new meta-microblaze layer
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
Diffstat (limited to 'meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch')
-rw-r--r-- | meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch b/meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch new file mode 100644 index 00000000..ae24c080 --- /dev/null +++ b/meta-microblaze/recipes-microblaze/gcc/gcc-10/0009-Patch-microblaze-Fix-atomic-side-effects.patch | |||
@@ -0,0 +1,68 @@ | |||
1 | From 1905061b279e6fe5fd9861fc490fd4075edac4a8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Thu, 12 Jan 2017 16:41:43 +0530 | ||
4 | Subject: [PATCH 09/63] [Patch, microblaze]: Fix atomic side effects. In | ||
5 | atomic_compare_and_swapsi, add side effects to prevent incorrect assumptions | ||
6 | during optimization. Previously, the outputs were considered unused; this | ||
7 | generated assembly code with undefined side effects after invocation of the | ||
8 | atomic. | ||
9 | |||
10 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | ||
11 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
12 | |||
13 | Conflicts: | ||
14 | gcc/config/microblaze/microblaze.md | ||
15 | --- | ||
16 | gcc/config/microblaze/microblaze.md | 3 +++ | ||
17 | gcc/config/microblaze/sync.md | 21 +++++++++++++-------- | ||
18 | 2 files changed, 16 insertions(+), 8 deletions(-) | ||
19 | |||
20 | diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md | ||
21 | index 183afff..7a40c53 100644 | ||
22 | --- a/gcc/config/microblaze/microblaze.md | ||
23 | +++ b/gcc/config/microblaze/microblaze.md | ||
24 | @@ -43,6 +43,9 @@ | ||
25 | (UNSPEC_TLS 106) ;; jump table | ||
26 | (UNSPEC_SET_TEXT 107) ;; set text start | ||
27 | (UNSPEC_TEXT 108) ;; data text relative | ||
28 | + (UNSPECV_CAS_BOOL 201) ;; compare and swap (bool) | ||
29 | + (UNSPECV_CAS_VAL 202) ;; compare and swap (val) | ||
30 | + (UNSPECV_CAS_MEM 203) ;; compare and swap (mem) | ||
31 | ]) | ||
32 | |||
33 | (define_c_enum "unspec" [ | ||
34 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md | ||
35 | index 6f16ca6..bebab5c 100644 | ||
36 | --- a/gcc/config/microblaze/sync.md | ||
37 | +++ b/gcc/config/microblaze/sync.md | ||
38 | @@ -18,14 +18,19 @@ | ||
39 | ;; <http://www.gnu.org/licenses/>. | ||
40 | |||
41 | (define_insn "atomic_compare_and_swapsi" | ||
42 | - [(match_operand:SI 0 "register_operand" "=&d") ;; bool output | ||
43 | - (match_operand:SI 1 "register_operand" "=&d") ;; val output | ||
44 | - (match_operand:SI 2 "nonimmediate_operand" "+Q") ;; memory | ||
45 | - (match_operand:SI 3 "register_operand" "d") ;; expected value | ||
46 | - (match_operand:SI 4 "register_operand" "d") ;; desired value | ||
47 | - (match_operand:SI 5 "const_int_operand" "") ;; is_weak | ||
48 | - (match_operand:SI 6 "const_int_operand" "") ;; mod_s | ||
49 | - (match_operand:SI 7 "const_int_operand" "") ;; mod_f | ||
50 | + [(set (match_operand:SI 0 "register_operand" "=&d") ;; bool output | ||
51 | + (unspec_volatile:SI | ||
52 | + [(match_operand:SI 2 "nonimmediate_operand" "+Q") ;; memory | ||
53 | + (match_operand:SI 3 "register_operand" "d") ;; expected value | ||
54 | + (match_operand:SI 4 "register_operand" "d")] ;; desired value | ||
55 | + UNSPECV_CAS_BOOL)) | ||
56 | + (set (match_operand:SI 1 "register_operand" "=&d") ;; val output | ||
57 | + (unspec_volatile:SI [(const_int 0)] UNSPECV_CAS_VAL)) | ||
58 | + (set (match_dup 2) | ||
59 | + (unspec_volatile:SI [(const_int 0)] UNSPECV_CAS_MEM)) | ||
60 | + (match_operand:SI 5 "const_int_operand" "") ;; is_weak | ||
61 | + (match_operand:SI 6 "const_int_operand" "") ;; mod_s | ||
62 | + (match_operand:SI 7 "const_int_operand" "") ;; mod_f | ||
63 | (clobber (match_scratch:SI 8 "=&d"))] | ||
64 | "" | ||
65 | { | ||
66 | -- | ||
67 | 2.7.4 | ||
68 | |||