Re: [PATCH kvm-unit-tests 1/9] s390x: fix TEST BLOCK tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.01.2018 22:53, David Hildenbrand wrote:
> 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.
> 
> According to the architecture, R1 is valid but ignored. No idea why this
> was changed (in a way that programs no longer compile).

What a pity :-(

> Anyhow, let's just specify the instruction explicitly.
> 
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
> ---
>  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);
>  }
>  
> 

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux