[PATCH] D76162: [AIX] discard the label in the csect of function description and use qualname for linkage
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 14:34:19 PDT 2020
DiggerLin created this revision.
DiggerLin added reviewers: hubert.reinterpretcast, jasonliu, daltenty, sfertile.
Herald added subscribers: llvm-commits, kbarton, hiraditya, nemanjai.
Herald added a project: LLVM.
DiggerLin retitled this revision from "[AIX] discard the label of the function description and use qualname for linkage" to "[AIX] discard the label in the csect of function description and use qualname for linkage ".
Herald added a subscriber: wuzish.
In current llvm,
cat > 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.
For the test cases which need to change from
.globl foo[DS] ---> .globl foo
I will create a NFC patch for it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76162
Files:
llvm/include/llvm/CodeGen/AsmPrinter.h
llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
llvm/include/llvm/Target/TargetLoweringObjectFile.h
llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/aix-func-dsc-gen.ll
llvm/test/CodeGen/PowerPC/aix-user-defined-memcpy.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll
llvm/test/CodeGen/PowerPC/test_func_desc.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76162.250303.patch
Type: text/x-patch
Size: 13366 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200313/722dc572/attachment-0001.bin>
More information about the llvm-commits
mailing list