On 14/11/2019 15:32, Kwok Cheung Yeung wrote:
This patch restricts non-kernel functions to using a maximum of 64 SGPRs and 24 VGPRs.

Kernels can request various pieces of information from the HSA runtime, and these will be loaded into the registers consecutively before the kernel executes. These registers are normally fixed. Since non-kernel functions cannot make these requests, they have to assume that the default set of information has been requested. If a non-leaf kernel requests information not in the defaults, a warning is now emitted as pieces of info needed by callees may have shifted locations. A leaf kernel can do whatever it wants.

I have setup FIXED_REGISTERS for the default case now - if a different set of startup info is requested (which should be rare), then the set of fixed registers will be adjusted accordingly by gcn_conditional_register_usage. Compared to before, v0, s2 and s3 are now unfixed (due to the newlib patch 'Stash reent marker in upper bits of s1 on AMD GCN' and the first patch in this series).

Okay to commit?

I think this is fine, but please check the white-space and formatting.

There's something odd going on. Probably the patch got mangled by Thunderbird. Please post future patches as attachments. I believe the GCC guidelines request using the "inline" content disposition setting you can only find in the TB config editor, but any kind of attachment is OK with me.

Andrew

Reply via email to