HomePhabricator

[AIX][XCOFF] change the operand of branch instruction from symbol name to…
Audit Requirede9ac1495e208

Authored by DiggerLin on Aug 11 2020, 12:26 PM.

Description

[AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations

SUMMARY:

  1. in the patch , remove setting storageclass in function .getXCOFFSection and construct function of class MCSectionXCOFF

there are

XCOFF::StorageMappingClass MappingClass;
XCOFF::SymbolType Type;
XCOFF::StorageClass StorageClass;
in the MCSectionXCOFF class,
these attribute only used in the XCOFFObjectWriter, (asm path do not need the StorageClass)

we need get the value of StorageClass, Type,MappingClass before we invoke the getXCOFFSection every time.

actually , we can get the StorageClass of the MCSectionXCOFF from it's delegated symbol.

  1. we also change the oprand of branch instruction from symbol name to qualify symbol name.

for example change
bl .foo
extern .foo
to
bl .foo[PR]
extern .foo[PR]

  1. and if there is reference indirect call a function bar.

we also add

extern .bar[PR]

Reviewers: Jason liu, Xiangling Liao

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