This is an archive of the discontinued LLVM Phabricator instance.

Make CC mangling conditional on the ABI version
AbandonedPublic

Authored by rnk on Dec 17 2018, 11:39 AM.

Details

Event Timeline

rnk created this revision.Dec 17 2018, 11:39 AM
rnk added a comment.Dec 17 2018, 11:41 AM

@rsmith asked if we should make this mangling conditional on the ABI version. I implemented it here, let me know if you think it's worth the extra code complexity. Our mingw ABI hasn't been particularly stable, but I think going forward we'll want to start mangling new calling convention attributes (regcall, maybe?) this way, and we'll want to make it conditional on the ABI version using something like this code structure.

I think the core question is whether there are any vendors who care about ABI stability for these attributes who don't care about the bugfix. Speaking for Apple, we would rather have the bugfix. Sony might have different thoughts; CC'ing Paul.

Sorry for not noticing this sooner. The TL;DR is, the current patch does not affect PS4, so go ahead; but see the long version for other considerations.

First, the general point: The PS4 ABI does not fit neatly into the sequential ClangABI versioning scheme. We forked a while back, and adopted a few subsequent changes and didn't adopt other changes. Just to make everyone's life less boring. And give me migraines. So, whenever ABI-related things happen, we need to be conscious of that (not fitting neatly; my headaches are not a consideration).

Second, IIUC the PS4 ABI ignores all the calling-convention attributes that are handled specially by this patch. So to that degree, PS4 doesn't care. We don't support the MS-specific ones, in particular.

That said, I've discovered that there are at least a few of these non-target-specific CC attributes that we fail to ignore, such as vectorcall, and there's internal discussion to sort out what to do about that. None of which should prevent this patch from going forward.

Okay. In my opinion, then, we should just do this unconditionally.

rnk abandoned this revision.Jan 14 2019, 6:08 PM

Okay. In my opinion, then, we should just do this unconditionally.

Sounds good to me.