[PATCH] D88252: z_Linux_asm.S modifications for arm64 (AARCH64) for Darwin/macOS

Michael Pique via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 11:06:07 PDT 2020


Michael_Pique added a comment.

In D88252#2295244 <https://reviews.llvm.org/D88252#2295244>, @jdoerfert wrote:

> Can we use a macro to guard `.size` then?

Yes, that’s how the code in lines 170-189 (for ARCH_X86) and 191-210 (for ARCH_X86_64) handle this, by assuming that “if not DARWIN then must be LINUX*”.  Both those blocks are within an “if KMP_GOMP_COMPAT” (“support for unnamed common blocks”) lines 163-212. It isn’t clear to me that the .data (and .size) code fragment we’re discussing (1744-1754) should not also be within a KMP_GOMP_COMPAT guard and merged with 163-212.  A cleaner alternative to guarding individual .size directives might be a “SIZE” macro that conditionally emits or ignores .size directives.  I’m not hereby proposing such a reorganization, but the “#if” method has its limitations, and keeping the very similar .data creation code together would be more readable.

If we do simply guard the line 1752 .size, would it be “if not DARWIN”, or need we exclude other OS platforms?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88252/new/

https://reviews.llvm.org/D88252



More information about the llvm-commits mailing list