diff options
Diffstat (limited to 'meta-xilinx-bsp/recipes-microblaze/gcc/gcc-7/0011-Fix-atomic-boolean-return-value.patch')
-rw-r--r-- | meta-xilinx-bsp/recipes-microblaze/gcc/gcc-7/0011-Fix-atomic-boolean-return-value.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-7/0011-Fix-atomic-boolean-return-value.patch b/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-7/0011-Fix-atomic-boolean-return-value.patch new file mode 100644 index 00000000..f4bc16e8 --- /dev/null +++ b/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-7/0011-Fix-atomic-boolean-return-value.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From a5957bdf7acfde0a65eeba90bae11f5619bf96af Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Sat, 26 Aug 2017 19:21:25 -0700 | ||
4 | Subject: [PATCH] Fix atomic boolean return value. | ||
5 | |||
6 | In atomic_compare_and_swapsi, fix boolean return value. Previously, it | ||
7 | contained zero if successful and non-zero if unsuccessful. | ||
8 | |||
9 | Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com> | ||
10 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
11 | Signed-off-by: Mahesh Bodapati <mbodapat@xilinx.com> | ||
12 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | ||
13 | Upstream-Status: Pending | ||
14 | --- | ||
15 | gcc/config/microblaze/sync.md | 7 ++++--- | ||
16 | 1 file changed, 4 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md | ||
19 | index edf4bdd811..aadb414728 100644 | ||
20 | --- a/gcc/config/microblaze/sync.md | ||
21 | +++ b/gcc/config/microblaze/sync.md | ||
22 | @@ -34,15 +34,16 @@ | ||
23 | (clobber (match_scratch:SI 8 "=&d"))] | ||
24 | "" | ||
25 | { | ||
26 | - output_asm_insn ("addc \tr0,r0,r0", operands); | ||
27 | + output_asm_insn ("add \t%0,r0,r0", operands); | ||
28 | output_asm_insn ("lwx \t%1,%y2,r0", operands); | ||
29 | output_asm_insn ("addic\t%8,r0,0", operands); | ||
30 | output_asm_insn ("bnei \t%8,.-8", operands); | ||
31 | - output_asm_insn ("cmp \t%0,%1,%3", operands); | ||
32 | - output_asm_insn ("bnei \t%0,.+16", operands); | ||
33 | + output_asm_insn ("cmp \t%8,%1,%3", operands); | ||
34 | + output_asm_insn ("bnei \t%8,.+20", operands); | ||
35 | output_asm_insn ("swx \t%4,%y2,r0", operands); | ||
36 | output_asm_insn ("addic\t%8,r0,0", operands); | ||
37 | output_asm_insn ("bnei \t%8,.-28", operands); | ||
38 | + output_asm_insn ("addi \t%0,r0,1", operands); | ||
39 | return ""; | ||
40 | } | ||
41 | ) | ||
42 | -- | ||
43 | 2.14.2 | ||
44 | |||