Page MenuHomePhabricator

[Hexagon] Support for Linux/Musl ABI.

Authored by sidneym on Mar 4 2020, 12:48 PM.



The clang driver updates needed to support Hexagon's Linux ABI.

This builds on what was added by

Diff Detail

Event Timeline

sidneym created this revision.Mar 4 2020, 12:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2020, 12:48 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bcain added a comment.Mar 9 2020, 12:49 PM

In general, I recommend qualifying metric and threshold values with their associated units: bits, bytes, pages, etc. That way it's easy to see where the unit conversions are happening and easy to see whether the logic is correct without reasoning about how the value changes among lines.

Constants specified by the ABI should be designated with names and units [unless maybe this conflicts w/llvm project naming conventions?]


This 64 should probably be named something like HEXAGON_REGISTER_SIZE_BITS_MAX?


32 here should be HEXAGON_REGISTER_SIZE_BITS_MIN maybe?


I suggest:

uint64_t Offset = llvm::alignTo(CGF.getContext().getTypeSize(Ty) / CHAR_BIT, HEXAGON_MIN_STACK_ALIGN_BYTES);
int ArgSizeBytes = CGF.getContext().getTypeSize(Ty) / CHAR_BIT;
    return EmitVAArgFromMemory(CGF, VAListAddr, Ty);

@kparzysz do you have any thoughts about those review comments?

@kparzysz do you have any thoughts about those review comments?

@sidneym is this just pulling existing contents downstream to go upstream? If so let's expedite this please

I'm not sure if it's worth defining these macros especially if this is the only place where they are used. We'd need a more coordinated effort to replace all 32's with named constants where it refers to a register size, and I'm not even sure if we could classify whether a given 32 is tied to a register size or not.

kparzysz accepted this revision.Mar 25 2020, 12:47 PM
This revision is now accepted and ready to land.Mar 25 2020, 12:47 PM
sidneym updated this revision to Diff 252950.Mar 26 2020, 12:38 PM

update for new tidy checks.

This revision was automatically updated to reflect the committed changes.