blob: 5058529ad51cc12c6466c7c00953ed45b4ac532c [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From 92015c19e5d1baabd62067bf1cfc4522e85d1b25 Mon Sep 17 00:00:00 2001
Brad Bishop286d45c2018-10-02 15:21:57 -04002From: Mahesh Bodapati <mbodapat@xilinx.com>
Brad Bishop26bdd442019-08-16 17:08:17 -04003Date: Thu, 12 Jan 2017 16:45:45 +0530
4Subject: [PATCH 10/54] [Patch, microblaze]: Fix atomic boolean return value.
5 In atomic_compare_and_swapsi, fix boolean return value. Previously, it
6 contained zero if successful and non-zero if unsuccessful.
Brad Bishop286d45c2018-10-02 15:21:57 -04007
8Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
9Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
Brad Bishop286d45c2018-10-02 15:21:57 -040010---
11 gcc/config/microblaze/sync.md | 7 ++++---
12 1 file changed, 4 insertions(+), 3 deletions(-)
13
14diff --git a/gcc/config/microblaze/sync.md b/gcc/config/microblaze/sync.md
Brad Bishop26bdd442019-08-16 17:08:17 -040015index 8e694e9..8ddb10d 100644
Brad Bishop286d45c2018-10-02 15:21:57 -040016--- a/gcc/config/microblaze/sync.md
17+++ b/gcc/config/microblaze/sync.md
18@@ -34,15 +34,16 @@
19 (clobber (match_scratch:SI 8 "=&d"))]
20 ""
21 {
22- output_asm_insn ("addc \tr0,r0,r0", operands);
23+ output_asm_insn ("add \t%0,r0,r0", operands);
24 output_asm_insn ("lwx \t%1,%y2,r0", operands);
25 output_asm_insn ("addic\t%8,r0,0", operands);
26 output_asm_insn ("bnei \t%8,.-8", operands);
27- output_asm_insn ("cmp \t%0,%1,%3", operands);
28- output_asm_insn ("bnei \t%0,.+16", operands);
29+ output_asm_insn ("cmp \t%8,%1,%3", operands);
30+ output_asm_insn ("bnei \t%8,.+20", operands);
31 output_asm_insn ("swx \t%4,%y2,r0", operands);
32 output_asm_insn ("addic\t%8,r0,0", operands);
33 output_asm_insn ("bnei \t%8,.-28", operands);
34+ output_asm_insn ("addi \t%0,r0,1", operands);
35 return "";
36 }
37 )
38--
Brad Bishop26bdd442019-08-16 17:08:17 -0400392.7.4
Brad Bishop286d45c2018-10-02 15:21:57 -040040