This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix emitVoidPtrVAArg for non-zero default alloca address space
ClosedPublic

Authored by jrtc27 on Aug 19 2022, 8:57 AM.

Details

Summary

Indirect arguments are passed on the stack and so va_arg should use the
default alloca address space, not hard-code 0, for pointers to those.
The only in-tree target with a non-zero default alloca address space is
AMDGPU, but that does not support variadic arguments, so we cannot test
this upstream. However, downstream in CHERI LLVM (and Morello LLVM, a
further fork of that) we have targets that do both and so require this
change.

Diff Detail

Event Timeline

jrtc27 created this revision.Aug 19 2022, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2022, 8:57 AM
Herald added subscribers: kosarev, tpr. · View Herald Transcript
jrtc27 requested review of this revision.Aug 19 2022, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2022, 8:57 AM
arsenm accepted this revision.Sep 13 2022, 3:35 PM
This revision is now accepted and ready to land.Sep 13 2022, 3:35 PM