[llvm-dev] [hexagon] bug fix for ELFHeaderEFlags

Rafael EspĂ­ndola via llvm-dev llvm-dev at lists.llvm.org
Sun Apr 24 07:21:27 PDT 2016


Test case?
On Apr 11, 2016 8:56 PM, "Mingjie Xing via llvm-dev" <
llvm-dev at lists.llvm.org> wrote:

> Hello,
>
> I run into a problem that llvm can't write the correct ELFHeaderEFlags
> for hexagonv4. The following patch can fix it.
>
> Index: lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp
> ===================================================================
> --- lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp    (revision
> 265917)
> +++ lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp    (working
> copy)
> @@ -122,7 +122,7 @@
>        : HexagonTargetStreamer(S) {
>      auto Bits = STI.getFeatureBits();
>      unsigned Flags;
> -    if (Bits.to_ullong() & llvm::Hexagon::ArchV5)
> +    if (Bits[Hexagon::ArchV5])
>        Flags = ELF::EF_HEXAGON_MACH_V5;
>      else
>        Flags = ELF::EF_HEXAGON_MACH_V4;
>
> Maybe hexagon port maintainer has a better solution to handle
> Hexagon::ArchV60 etc.
>
>
> Best regards,
> Mingjie
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160424/19568102/attachment.html>


More information about the llvm-dev mailing list