[all-commits] [llvm/llvm-project] fdfe41: [AIX] discard the label in the csect of function d...

diggerlin via All-commits all-commits at lists.llvm.org
Thu Mar 26 12:47:14 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fdfe411e7c9a844e7465bbe443fb6d1d9dbc4539
      https://github.com/llvm/llvm-project/commit/fdfe411e7c9a844e7465bbe443fb6d1d9dbc4539
  Author: diggerlin <digger.llvm at gmail.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
    M llvm/include/llvm/Target/TargetLoweringObjectFile.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    M llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
    M llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
    M llvm/test/CodeGen/PowerPC/test_func_desc.ll

  Log Message:
  -----------
  [AIX] discard the label in the csect of function description and use qualname for linkage

SUMMARY:

SUMMARY
for a source file  "test.c"

void foo() {};

llc will generate assembly code as (assembly patch)
     .globl  foo
     .globl  .foo
     .csect foo[DS]
foo:

        .long   .foo
        .long   TOC[TC0]
        .long   0

   and symbol table as (xcoff object file)
   [4]     m   0x00000004     .data     1  unamex                    foo
   [5]     a4  0x0000000c       0    0     SD       DS    0    0
   [6]     m   0x00000004     .data     1  extern                    foo
   [7]     a4  0x00000004       0    0     LD       DS    0    0

   After first patch, the assembly will be as

        .globl  foo[DS]                 # -- Begin function foo
        .globl  .foo
        .align  2
        .csect foo[DS]
        .long   .foo
        .long   TOC[TC0]
        .long   0

    and symbol table will as
   [6]     m   0x00000004     .data     1  extern                    foo
   [7]     a4  0x00000004       0    0     DS      DS    0    0
Change the code for the assembly path and xcoff objectfile patch for llc.

Reviewers: Jason Liu
Subscribers: wuzish, nemanjai, hiraditya

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




More information about the All-commits mailing list