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
Sat Feb 8 12:47:33 PST 2014


Hi Oliver,

This patch is a bit elaborate, can you use Phab, please?

The logic seems correct, though I have to say I didn't go through
every corner case to make sure it's sound.

Your tests seem to capture the specific cases, but I fear the original
file had too few tests to make sure there won't be any side effect
elsewhere.

Some early comments:

+    const unsigned NumGPRs = 4;

This is declared too early and it's just a constant. I'm not sure it
deserves its own name in the grand scheme of things. It would be
clearer if the logic below would just use 4.

+  if (AllocatedVFP >= 16) {
+    // We use AllocatedVFP > 16 to signal that some CPRCs were allocated on
+    // the stack.
+    AllocatedVFP = 17;

Is this really necessary?

cheers,
--renato



More information about the cfe-commits mailing list