[PATCH] AAPCS: Cannot split argument between GPRs and the stack after a CPRC has been allocated to the stack
Renato Golin
renato.golin at linaro.org
Mon Feb 10 03:54:10 PST 2014
With the one comment, looks good to me.
cheers,
--renato
================
Comment at: lib/CodeGen/TargetInfo.cpp:3670
@@ -3597,2 +3669,3 @@
SizeRegs = (getContext().getTypeSize(Ty) + 63) / 64;
+ markAllocatedGPRs(AllocatedGPRs, 2, SizeRegs * 2);
}
----------------
Oliver Stannard wrote:
> Renato Golin wrote:
> > Why SizeRegs * 2? Wouldn't they be 8-byte aligned anyway?
> SizeRegs is in units of "number of 64-bit registers" (actually implemented as aligned pairs of GPRs), but markAllocatedGPRs expects the size in units of "number of 32-bit registers".
Ah, yes! Makes sense.
================
Comment at: lib/CodeGen/TargetInfo.cpp:3481
@@ -3457,1 +3480,3 @@
+ // the stack.
+ AllocatedVFP = 17;
return;
----------------
Oliver Stannard wrote:
> Renato Golin wrote:
> > Why are you saturating? Is there any place that especially check against 17? Or are all of them like this, >=16?
> On line 3336, we check whether AllocatedVFP > 16, as we need to know whether some CPRCs have been allocated on the stack.
Shouldn't we just change that check, then? I think it makes more sense.
http://llvm-reviews.chandlerc.com/D2726
More information about the cfe-commits
mailing list