Re: [PATCH kvm-unit-tests 8/9] s390x: add vmalloc support

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

 



On 11/01/2018 13:24, Thomas Huth wrote:
>>>> +		"	st	%2,4(%0)\n"
>>>> +		/* load the target address for our new PSW */
>>>> +		"	larl	%1,cont\n"
>>>> +		"	stg	%1,8(%0)\n"
>>>> +		"	lpswe	0(%0)\n"
>>>> +		"cont:\n"
>>>> +		: : "a" (&psw), "r" (0), "r" (1), "r" (enable)
>>> The usage of "r" (0), "r" (1) looks wrong. I think you should rather put
>>> them into the output list instead, since they are modified within the
>>> assembler code. Or maybe even better, use fixed registers in the
>>> assembler code and mark the corresponding registers in the clobber list.
>> I tried to use the output list way and it would not let me specify
>> immediates (0). So I have to introduce local variables. Or is there
>> another way?
> Use "+r"(0) in the output list? ... if that does not work, I think I'd
> rather use the clobber list instead.

You'd have to introduce local variables, yes.  I think it's fine,
perhaps also more self-documenting than "0" and "1" to s390-impaired me.

Paolo



[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