Re: [kvm-unit-tests PATCH] lib: s390x: css: Name inline assembly arguments and clean them up

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

 



On Tue,  4 Feb 2025 09:51:33 +0000
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> Less need to count the operands makes the code easier to read.
> 
> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> ---
> 
> This one has been gathering dust for a while.
> rfc->v1: Moved to Q constraint (thanks Heiko)
> 
> ---

[...]

>  	asm volatile(" .insn   rre,0xb25f0000,%2,0\n"
> -		     " ipm     %0\n"
> -		     " srl     %0,28\n"
> -		     : "=d" (cc), "=m" (p)
> +		     " ipm     %[cc]\n"
> +		     " srl     %[cc],28\n"
> +		     : [cc] "=d" (cc), "=m" (p)
>  		     : "d" (p), "m" (p)

this bit (which you did not touch) is actually the most confusing to me.
what's the point of separately specifying both "d" and "m" constraints
for (p) ? (and it also has a "=m" in the output clobberlist)

>  		     : "cc");
>  





[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