[all-commits] [llvm/llvm-project] ad0345: [PowerPC] Emit gnu_attribute according to float-ab...

Qiu Chaofan via All-commits all-commits at lists.llvm.org
Tue Jan 25 21:31:08 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ad0345aed1e76f98c6ad55372b675c5647e16d28
      https://github.com/llvm/llvm-project/commit/ad0345aed1e76f98c6ad55372b675c5647e16d28
  Author: Qiu Chaofan <qiucofan at cn.ibm.com>
  Date:   2022-01-26 (Wed, 26 Jan 2022)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    A llvm/test/CodeGen/PowerPC/gnu-attribute.ll

  Log Message:
  -----------
  [PowerPC] Emit gnu_attribute according to float-abi metadata

According to GNU as documentation, PowerPC supports some .gnu_attribute
tags to represent the vector and float ABI type in the object file.
Some linkers like GNU ld respects the attribute and will prevent objects
with conflicting ABIs being linked.

This patch emits gnu_attribute value in assembly printer according to
the float-abi metadata. More attributes for soft-fp, hard single/double
and even vector ABI need to be supported in the future.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D117193




More information about the All-commits mailing list