Re: [PATCH v2 04/42] arm64/sve: Make access to FFR optional

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

 



On Tue, Oct 19, 2021 at 03:39:11PM +0100, Mark Rutland wrote:
> On Tue, Oct 19, 2021 at 11:14:47AM +0100, Will Deacon wrote:

> > > +		sve_flush_live(true, vq_minus_one);

> > What does the pcs say about passing bools in registers? Can we guarantee
> > that false is a 64-bit zero?

> Per usual rules, bits [63:8] can be arbitrary -- AAPCS64 leaves it to the callee
> to extend values, with the upper bits being arbitrary, and it maps _Bool/bool
> to unsigned char, which covers bits [7:0].

> So a bool false in a register is not guaranteed to be a 64-bit zero. But
> since it *is* guarnateed to be either 0 or 1, we can use TBZ/TBNZ
> instead of CBZ/CBNZ. Either that, or extend it to a wider type in the
> function prototype.

I'll change it to tbz - if we use a wider type then people will notice
using true/false with it in the code.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux