The repeated instructions make the file long and difficult to read.
Simplify them with .irp directives.
Skip PowerPC since AIX assembler doesn't support .irp
Paths
| Differential D139368
[libunwind] Use .irp directives. NFC ClosedPublic Authored by MaskRay on Dec 5 2022, 2:03 PM.
Details
Summary The repeated instructions make the file long and difficult to read. Skip PowerPC since AIX assembler doesn't support .irp
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 5 2022, 2:03 PM Herald added subscribers: libcxx-commits, StephenFan, s.egerton, simoncook. · View Herald Transcript Comment Actions This is definitely a nice cleanup. There is a way to use .irp to have it count, but this is fine for now. This revision is now accepted and ready to land.Dec 6 2022, 9:50 AM Comment Actions
Thanks. Unfortunately, AFAIK, MACRO-11 introduced .irp i,0,1,2,3 and .irpc i,0123 but no generalized iteration from X to Y... GNU as and LLVM MC inherited the directives from MACRO-11 but do not add a generalized iteration... This revision was landed with ongoing or failed builds.Dec 6 2022, 11:05 AM Closed by commit rG8482e95f75d0: [libunwind] Use .irp directives. NFC (authored by MaskRay). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions This broke the AIX CI: https://buildkite.com/llvm-project/libcxx-ci/builds/15656#0184eac6-521b-4d1e-8502-c226673e0ece. Unfortunately it seems the .irp directive isn't supported by the AIX assembler. Comment Actions Did the libc++/libc++abi/libunwind CI run on this patch? I thought it should, but if not, we can get that setup. Otherwise, I think this is a gentle reminder for folks not to ignore CI failures :-) Comment Actions
I don't know a libunwind CI. I personally checked the output is the same with multiple architectures, x86_64, aarch64, arm, riscv64, ppc32 linux, ppc64 linux, etc, but I couldn't have known that this did with AIX. Comment Actions
What chunks of code do AIX use? All __powerpc__ and __powerpc64__ with all variants including __VSX__? Comment Actions
Both chunks under __powerpc__ (32-bit mode) and __powerpc64__ (64-bit mode) are used for AIX. For __powerpc__, code guarded by __ALTIVEC__ is used. For __powerpc64__, code guarded by __VSX__ is used.
Revision Contents
Diff 480552 libunwind/src/UnwindRegistersRestore.S
libunwind/src/UnwindRegistersSave.S
|