[PATCH] AAPCS-VFP: Do not use any more VFP registers after allocating a CPRC to the stack

Oliver Stannard oliver.stannard at arm.com
Fri Feb 7 02:50:57 PST 2014


For the first line, the AAPCS states that all registers must be shadowed
("The NCRN is set to r4" in AAPCS terminology). I cannot think of any case
where the original version would cause incorrect behaviour, but I'm not
certain, and the modified version more explicitly reflects the intent of the
AAPCS.

 

As for the second line, again I cannot think of a case in which the original
version is incorrect, but it more explicitly reflects the AAPCS rule that no
GPRs should be used after a non-CPRC argument has been allocated on the
stack.

 

I have attached an updated patch which fixed the typo and alignment error.

 

I will mention the change to the GPR shadowing in the commit message.

 

Oliver

 

From: Renato Golin [mailto:renato.golin at linaro.org] 
Sent: 07 February 2014 10:19
To: James Molloy
Cc: Oliver Stannard; LLVM Commits
Subject: Re: [PATCH] AAPCS-VFP: Do not use any more VFP registers after
allocating a CPRC to the stack

 

On 7 February 2014 10:08, James Molloy <james.molloy at arm.com> wrote:

The first line did shadow just R3 but now shadows all registers. I suspect
that actually this was a bug, which you have now fixed incidentally? Your
patch description only mentions coprocessor registers so can you just
confirm this is deliberate?

 

The second line has changed behaviour - previously in the i32 case no
registers were shadowed - now R0-R3 are shadowed. Why is this correct? (not
saying it's not, but some justification would be good).

 

I assumed both cases were the same "fix" that weren't mentioned in the
commit message (and that's why I was unsure of the "fix").

 

If that's correct, I agree would be good to have a mention in the commit
message. ;)

 

cheers,

--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140207/232472c9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aapcs-vfp-register-shadowing-2.patch
Type: application/octet-stream
Size: 6106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140207/232472c9/attachment.obj>


More information about the llvm-commits mailing list