This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/6] PowerPC64 sysdep.h tidy
Alan Modra <amodra@gmail.com> writes:
> .align on some targets takes a byte alignment, on others like powerpc,
> log2 of the byte alignment. It's a good idea to avoid .align,
> particularly since x86 and powerpc are different. This patch fixes
> the occurrences of .align in powerpc64/sysdep.h, renames DOT_LABEL
> since the macro doesn't have anything to do with adding dots, removes
> extraneous semicolons, and fixes some formatting.
>
> * sysdeps/powerpc/powerpc64/sysdep.h: Formatting.
> (FUNC_LABEL): Rename from DOT_LABEL.
> (ENTRY_1): Use FUNC_LABEL and remove leading space from label.
> Use .p2align rather than .align.
> (TRACEBACK, TRACEBACK_MASK): Use .p2align rather than .align.
> (ABORT_TRANSACTION): Likewise.
> (ENTRY_1, ENTRY_2, END_2, LOCALENTRY): Remove unnecessary semicolons,
> particularly at end. Add semicolon at invocation as necessary.
> (TRACEBACK, TRACEBACK_MASK, PSEUDO, PSEUDO_NOERRNO): Likewise.
> (PSEUDO_ERRVAL, PPC64_LOAD_FUNCPTR, OPD_ENT): Likewise.
> * sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY,
> END): Adjust to suit.
Looks good to me, but I have just one question...
> diff --git a/sysdeps/powerpc/powerpc64/sysdep.h b/sysdeps/powerpc/powerpc64/sysdep.h
> index 4347323..860420e 100644
> --- a/sysdeps/powerpc/powerpc64/sysdep.h
> +++ b/sysdeps/powerpc/powerpc64/sysdep.h
> @@ -106,25 +106,25 @@
> # define OPD_ENT(name) .quad BODY_LABEL (name), .TOC.@tocbase, 0
> #endif
>
> -#define ENTRY_1(name) \
> +#define ENTRY_1(name) \
> .type BODY_LABEL(name),@function; \
> .globl name; \
> .section ".opd","aw"; \
> - .align 3; \
> -name##: OPD_ENT (name); \
> - .previous;
> + .p2align 3;FUNC_LABEL(name): \
> + OPD_ENT (name); \
> + .previous
I'm just curious: is this format written somewhere or used somewhere else?
--
Tulio Magno