[PATCH] AAPCS-VFP: double and long double have the same machine type

Oliver Stannard oliver.stannard at arm.com
Thu Feb 6 08:31:41 PST 2014


I'm not sure what you mean by "the original comparison", but I assume you
mean the outer of the two "if" statements. Your reasoning for when
"Context.getTypeSize(Base) != Context.getTypeSize(TyPtr)" will be true is
correct, but the outer "if" statement's condition will be true in all 4
cases for ARM and AArch64, because "Base->isVectorType()" will be false. 

 

I have tried running the test for AArch64 both with and without the extra
check, and it passes iff the check is present.

 

Having said that, it took long enough to convince myself that version two of
the patch is correct that I have re-written it to make it clearer, new
version of the patch is attached.

 

Oliver

 

From: Renato Golin [mailto:renato.golin at linaro.org] 
Sent: 06 February 2014 15:27
To: Oliver Stannard
Cc: Clang Commits
Subject: Re: [PATCH] AAPCS-VFP: double and long double have the same machine
type

 

On 6 February 2014 15:03, Oliver Stannard <oliver.stannard at arm.com> wrote:

I was mistaken, that check was required, because this code is shared between
ARM and AArch64.  I have attached an updated patch which puts the check back
in, and adds a test for this in AArch64.

 

Hi Oliver,

 

That's not what I meant... ;)

 

AFAICT, the ABI says that double and long double have the same size, so why
does the original comparison fail in the first place?

 

I mean, from what you said, this: Context.getTypeSize(Base) !=
Context.getTypeSize(TyPtr) should return false for the cases: {d, d}, {d,
ld}, {ld, d} and {ld, ld} on ARM, and true for the two central ones in
AArch64. No?

 

If it doesn't, it would be good to understand why not, and fix it at the
source. And if it can't be fixed at the source, than a good explanation of
why not on the comment is welcome.

 

cheers,

--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140206/1fc8a9bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hfa-long-double-4.patch
Type: application/octet-stream
Size: 3596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140206/1fc8a9bf/attachment.obj>


More information about the cfe-commits mailing list