From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: [PATCH kvm-unit-tests v3 01/11] s390x: fix TEST BLOCK tests Date: Tue, 13 Feb 2018 17:23:11 +0100 Message-ID: <20180213162321.20522-2-david@redhat.com> References: <20180213162321.20522-1-david@redhat.com> Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Thomas Huth , Cornelia Huck , Christian Borntraeger , David Hildenbrand To: kvm@vger.kernel.org Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35622 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934405AbeBMQXZ (ORCPT ); Tue, 13 Feb 2018 11:23:25 -0500 In-Reply-To: <20180213162321.20522-1-david@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: While new compilers like s390x-linux-gnu-gcc (GCC) 7.2.1 20170915 (Red Hat Cross 7.2.1-1) Complain, that R1 is missing, old compilers like gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16) will complain that R1 is not valid. Let's just specify the instruction explicitly. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand --- s390x/intercept.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/s390x/intercept.c b/s390x/intercept.c index 59e5fca..99dde0d 100644 --- a/s390x/intercept.c +++ b/s390x/intercept.c @@ -139,7 +139,7 @@ static void test_testblock(void) asm volatile ( " lghi %%r0,0\n" - " tb %1\n" + " .insn rre,0xb22c0000,0,%1\n" " ipm %0\n" " srl %0,28\n" : "=d" (cc) @@ -150,12 +150,12 @@ static void test_testblock(void) expect_pgm_int(); low_prot_enable(); - asm volatile (" tb %0 " : : "r"(4096)); + asm volatile (" .insn rre,0xb22c0000,0,%0\n" : : "r"(4096)); low_prot_disable(); check_pgm_int_code(PGM_INT_CODE_PROTECTION); expect_pgm_int(); - asm volatile (" tb %0 " : : "r"(-4096)); + asm volatile (" .insn rre,0xb22c0000,0,%0\n" : : "r"(-4096)); check_pgm_int_code(PGM_INT_CODE_ADDRESSING); } -- 2.14.3