public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] add ASM_OUTPUT_MAX_SKIP_ALIGN to i386.h Date: Mon, 26 Apr 2021 17:33:54 +0000 (GMT) [thread overview] Message-ID: <20210426173354.7FE58394FC26@sourceware.org> (raw) https://gcc.gnu.org/g:2fb3e21d9afc1e01cd6f3e8eec0e4034973f4f17 commit 2fb3e21d9afc1e01cd6f3e8eec0e4034973f4f17 Author: Alexandre Oliva <oliva@adacore.com> Date: Mon Apr 26 14:31:31 2021 -0300 add ASM_OUTPUT_MAX_SKIP_ALIGN to i386.h Several i386 align tests expect p2align to be used, but not all configurations define ASM_OUTPUT_MAX_SKIP_ALIGN, even when HAVE_GAS_MAX_SKIP_P2ALIGN. i386.h has an equivalent ASM_OUTPUT_MAX_SKIP_PAD that is used in i386.c, so I'm adding an _ALIGN variant, as in x86-64.h, and an #undef to x86-64.h to avoid warnings over the duplicate def; perhaps I should remove them entirely? Should we even keep the x86-specific _PAD? for gcc/ChangeLog * config/i386/i386.h [HAVE_GAS_MAX_SKIP_P2ALIGN] (ASM_OUTPUT_MAX_SKIP_ALIGN): New, copied from... * config/i386/x86-64.h: ... here. Add undef before define. Diff: --- gcc/config/i386/i386.h | 10 ++++++++++ gcc/config/i386/x86-64.h | 1 + 2 files changed, 11 insertions(+) diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index 96b46bac238..26b1fda433e 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -2068,6 +2068,16 @@ extern int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER]; bytes if it is within MAX_SKIP bytes. */ #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN +#undef ASM_OUTPUT_MAX_SKIP_ALIGN +#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ + do { \ + if ((LOG) != 0) { \ + if ((MAX_SKIP) == 0 || (MAX_SKIP) >= (1 << (LOG)) - 1) \ + fprintf ((FILE), "\t.p2align %d\n", (LOG)); \ + else \ + fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP)); \ + } \ + } while (0) #undef ASM_OUTPUT_MAX_SKIP_PAD #define ASM_OUTPUT_MAX_SKIP_PAD(FILE, LOG, MAX_SKIP) \ if ((LOG) != 0) \ diff --git a/gcc/config/i386/x86-64.h b/gcc/config/i386/x86-64.h index 0cdd980f481..354bd60005d 100644 --- a/gcc/config/i386/x86-64.h +++ b/gcc/config/i386/x86-64.h @@ -75,6 +75,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define SUBALIGN_LOG 3 #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN +#undef ASM_OUTPUT_MAX_SKIP_ALIGN #define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \ do { \ if ((LOG) != 0) { \
next reply other threads:[~2021-04-26 17:33 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-26 17:33 Alexandre Oliva [this message] 2021-04-28 17:52 Alexandre Oliva
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210426173354.7FE58394FC26@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).