⛏️ index : buildtools.git

author Adrien Destugues <adrien.destugues@opensource.viveris.fr> 2023-12-13 13:54:29.0 +01:00:00
committer waddlesplash <waddlesplash@gmail.com> 2023-12-13 21:20:10.0 +00:00:00
commit
ab26199428a588efa1bc1eac98748f504add4b90 [patch]
tree
0bfc181f05c874d240a75e525b9b4840783c5ab5
parent
69b7412120ae0e040bdfbc46cd3dfafdcb3805d2
download
ab26199428a588efa1bc1eac98748f504add4b90.tar.gz

gcc: remove obsolete macro definitions

ASM_OUTPUT_MAX_SKIP_ALIGN has a generic definition in i386.h, we don't
need to provide our own anymore

ASM_OUTPUT_MAX_SKIP_PAD is an old name for ASM_OUTPUT_MAX_SKIP_ALIGN, it
was removed from gcc code in 2021 and is not used anywhere.

Change-Id: Ib9c3a5aeccce030c7875a1e4a4dbce46618b1a05
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/7206
Reviewed-by: waddlesplash <waddlesplash@gmail.com>

Diff

 gcc/gcc/config/i386/haiku.h   | 13 -------------
 gcc/gcc/config/i386/haiku64.h | 29 -----------------------------
 2 files changed, 42 deletions(-)

diff --git a/gcc/gcc/config/i386/haiku.h b/gcc/gcc/config/i386/haiku.h
index 4d43c6b..4db6266 100644
--- a/gcc/gcc/config/i386/haiku.h
+++ a/gcc/gcc/config/i386/haiku.h
@@ -63,19 +63,6 @@
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)

/* A C statement to output to the stdio stream FILE an assembler
   command to advance the location counter to a multiple of 1<<LOG
   bytes if it is within MAX_SKIP bytes.

   This is used to align code labels according to Intel recommendations.  */

#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP) \
  if ((LOG)!=0) \
    if ((MAX_SKIP)==0) fprintf ((FILE), "\t.p2align %d\n", (LOG)); \
    else fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP))
#endif

/* On 32-bit i386, because there are so few registers, keep the frame pointer disabled by default.
 * Other architectures have it always enabled for Haiku */
#undef CC1_SPEC
diff --git a/gcc/gcc/config/i386/haiku64.h b/gcc/gcc/config/i386/haiku64.h
index 1b56931..3781045 100644
--- a/gcc/gcc/config/i386/haiku64.h
+++ a/gcc/gcc/config/i386/haiku64.h
@@ -75,35 +75,6 @@
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  x86_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)

/* This is used to align code labels according to Intel recommendations.  */

#ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
#define ASM_OUTPUT_MAX_SKIP_ALIGN(FILE,LOG,MAX_SKIP)			\
  do {									\
    if ((LOG) != 0) {							\
      if ((MAX_SKIP) == 0) fprintf ((FILE), "\t.p2align %d\n", (LOG));	\
      else {								\
        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
        /* Make sure that we have at least 8 byte alignment if > 8 byte	\
           alignment is preferred.  */					\
        if ((LOG) > 3							\
            && (1 << (LOG)) > ((MAX_SKIP) + 1)				\
            && (MAX_SKIP) >= 7)						\
          fputs ("\t.p2align 3\n", (FILE));				\
      }									\
    }									\
  } while (0)
#undef  ASM_OUTPUT_MAX_SKIP_PAD
#define ASM_OUTPUT_MAX_SKIP_PAD(FILE, LOG, MAX_SKIP)			\
  if ((LOG) != 0)							\
    {									\
      if ((MAX_SKIP) == 0)						\
        fprintf ((FILE), "\t.p2align %d\n", (LOG));			\
      else								\
        fprintf ((FILE), "\t.p2align %d,,%d\n", (LOG), (MAX_SKIP));	\
    }
#endif


/* Output assembler code to FILE to call the profiler.  */
#define NO_PROFILE_COUNTERS 1