Brad Bishop | 6f8dcde | 2018-10-16 10:47:12 +0800 | [diff] [blame] | 1 | From 63ce36396348e7c4c021cffa652d2e3d20f7963a Mon Sep 17 00:00:00 2001 |
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
| 3 | Date: Fri, 27 Jul 2018 17:51:54 +0800 |
| 4 | Subject: [PATCH 2/2] fix broken inline asm in tests on mips32-linux |
| 5 | |
| 6 | While build tests(`make check') with gcc 8.1.0 on mips32-linux, |
| 7 | there is a failure |
| 8 | [snip] |
| 9 | |mips-wrsmllib32-linux-gcc -meb -mabi=32 -mhard-float -march=mips32 |
| 10 | -c -o tc08_hbl2-tc08_hbl2.o `test -f 'tc08_hbl2.c' || echo '../../../ |
| 11 | valgrind-3.13.0/helgrind/tests/'`tc08_hbl2.c |
| 12 | |/tmp/cc37aJxQ.s: Assembler messages: |
| 13 | |/tmp/cc37aJxQ.s:275: Error: symbol `L1xyzzy1main' is already defined |
| 14 | |Makefile:1323: recipe for target 'tc08_hbl2-tc08_hbl2.o' failed |
| 15 | [snip] |
| 16 | |
| 17 | Remove the duplicated L1xyzzy1main, and use local symbol to replace. |
| 18 | http://tigcc.ticalc.org/doc/gnuasm.html#SEC46 |
| 19 | |
| 20 | Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=396906] |
| 21 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 22 | --- |
| 23 | helgrind/tests/tc08_hbl2.c | 4 ++-- |
| 24 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 25 | |
| 26 | diff --git a/helgrind/tests/tc08_hbl2.c b/helgrind/tests/tc08_hbl2.c |
| 27 | index 2a757a008..f660d82dd 100644 |
| 28 | --- a/helgrind/tests/tc08_hbl2.c |
| 29 | +++ b/helgrind/tests/tc08_hbl2.c |
| 30 | @@ -121,12 +121,12 @@ |
| 31 | #elif defined(PLAT_mips32_linux) || defined(PLAT_mips64_linux) |
| 32 | # define INC(_lval,_lqual) \ |
| 33 | __asm__ __volatile__ ( \ |
| 34 | - "L1xyzzy1" _lqual":\n" \ |
| 35 | + "1:\n" \ |
| 36 | " move $t0, %0\n" \ |
| 37 | " ll $t1, 0($t0)\n" \ |
| 38 | " addiu $t1, $t1, 1\n" \ |
| 39 | " sc $t1, 0($t0)\n" \ |
| 40 | - " beqz $t1, L1xyzzy1" _lqual \ |
| 41 | + " beqz $t1, 1b\n" \ |
| 42 | : /*out*/ : /*in*/ "r"(&(_lval)) \ |
| 43 | : /*trash*/ "t0", "t1", "memory" \ |
| 44 | ) |
| 45 | -- |
| 46 | 2.17.1 |
| 47 | |