Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 1 | From 0748ed5403a75c12ad9137b3fabf9d8397206ed8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Mark Wielaard <mark@klomp.org> |
| 3 | Date: Tue, 1 Dec 2020 13:57:39 +0100 |
| 4 | Subject: [PATCH] lmw, lswi and related PowerPC insns aren't allowed on ppc64le |
| 5 | |
| 6 | lmw, lswi and related PowerPC insns aren't allowed on ppc64le |
| 7 | |
| 8 | Newer binutils produce an error when the assembly contains lmw, stmw, |
| 9 | lswi, lswx, stswi, or stswx instructions in little-endian mode. |
| 10 | |
| 11 | Only build and run the lsw and ldst_multiple testcases on ppc64[be]. |
| 12 | |
| 13 | https://bugs.kde.org/show_bug.cgi?id=427870 |
| 14 | Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=74b74174d572fee4015b8f4e326db3cd949bcdc3] |
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 16 | --- |
| 17 | none/tests/ppc64/Makefile.am | 9 ++++++--- |
| 18 | none/tests/ppc64/ldst_multiple.vgtest | 1 + |
| 19 | 2 files changed, 7 insertions(+), 3 deletions(-) |
| 20 | |
| 21 | diff --git a/none/tests/ppc64/Makefile.am b/none/tests/ppc64/Makefile.am |
| 22 | index 9bc0d0a..9d1e8b7 100644 |
| 23 | --- a/none/tests/ppc64/Makefile.am |
| 24 | +++ b/none/tests/ppc64/Makefile.am |
| 25 | @@ -54,16 +54,20 @@ EXTRA_DIST = \ |
| 26 | |
| 27 | check_PROGRAMS = \ |
| 28 | allexec \ |
| 29 | - lsw jm-insns round \ |
| 30 | + jm-insns round \ |
| 31 | test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \ |
| 32 | test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \ |
| 33 | test_isa_2_07_part1 test_isa_2_07_part2 \ |
| 34 | test_isa_3_0 \ |
| 35 | subnormal_test \ |
| 36 | - test_tm test_touch_tm ldst_multiple data-cache-instructions \ |
| 37 | + test_tm test_touch_tm data-cache-instructions \ |
| 38 | power6_mf_gpr std_reg_imm \ |
| 39 | twi_tdi tw_td power6_bcmp |
| 40 | |
| 41 | +# lmw, stmw, lswi, lswx, stswi, stswx compile (and run) only on big endian. |
| 42 | +if VGCONF_PLATFORMS_INCLUDE_PPC64BE_LINUX |
| 43 | +check_PROGRAMS += lsw ldst_multiple |
| 44 | +endif |
| 45 | |
| 46 | AM_CFLAGS += @FLAG_M64@ |
| 47 | AM_CXXFLAGS += @FLAG_M64@ |
| 48 | @@ -175,4 +179,3 @@ test_isa_2_07_part2_LDADD = -lm |
| 49 | test_tm_LDADD = -lm |
| 50 | test_touch_tm_LDADD = -lm |
| 51 | test_isa_3_0_LDADD = -lm |
| 52 | - |
| 53 | diff --git a/none/tests/ppc64/ldst_multiple.vgtest b/none/tests/ppc64/ldst_multiple.vgtest |
| 54 | index 87e668e..22dd46c 100644 |
| 55 | --- a/none/tests/ppc64/ldst_multiple.vgtest |
| 56 | +++ b/none/tests/ppc64/ldst_multiple.vgtest |
| 57 | @@ -1 +1,2 @@ |
| 58 | +prereq: ../../../tests/is_ppc64_BE |
| 59 | prog: ldst_multiple |
| 60 | -- |
| 61 | 2.31.0 |
| 62 | |