Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Dec 2002 16:51:00 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        "David E. O'Brien" <obrien@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/gnu/usr.bin/binutils/as/ia64-freebsd Makefile 
Message-ID:  <20021206005100.447A62A7EA@canning.wemm.org>
In-Reply-To: <20021205184209.GA605@dhcp01.pn.xcllnt.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Marcel Moolenaar wrote:
> On Thu, Dec 05, 2002 at 10:24:34AM -0800, David E. O'Brien wrote:
> > obrien      2002/12/05 10:24:34 PST
> > 
> >   Modified files:
> >     gnu/usr.bin/binutils/as/ia64-freebsd Makefile 
> >   Log:
> >   Set WARNS=0 as a temp work around until I can get access to an IA-64 box
> >   to do this right.
> 
> Thanks!
> 
> As for the ia64 box:	pluto1.freebsd.org
> Peter added it yesterday.

Here's the ``fix'' (not really a fix, more of a hack which probably
isn't quite right) that we use on the ia64 p4 tree:

Index: contrib/binutils/gas/read.c
===========================================================================
--- contrib/binutils/gas/read.c	2002/12/05 16:20:01	#3
+++ contrib/binutils/gas/read.c	2002/12/05 16:20:01
@@ -1196,9 +1196,11 @@
 	frag_align_pattern (n, fill, len, max);
     }
 
+#ifndef __ia64__
 #ifdef md_do_align
  just_record_alignment:
 #endif
+#endif
 
   record_alignment (now_seg, n - OCTETS_PER_BYTE_POWER);
 }

The problem is that md_do_align() is implemented like this on the x86:

#define md_do_align(n, fill, len, max, around)                          \
if ((n) && !need_pass_2                                                 \
    && (!(fill) || ((char)*(fill) == (char)0x90 && (len) == 1))         \
    && subseg_text_p (now_seg))                                         \
  {                                                                     \
    frag_align_code ((n), (max));                                       \
    goto around;                                                        \
  }

Notice the goto of that label.

tc-arm.h does the same evil things:
#define md_do_align(N, FILL, LEN, MAX, LABEL)                                   \
  if (FILL == NULL && (N) != 0 && ! need_pass_2 && subseg_text_p (now_seg))     \
    {                                                                           \
      arm_frag_align_code (N, MAX);                                             \
      goto LABEL;                                                               \
    }

tc-s390.h does something similar too.

ia64 does not have a goto:
#define md_do_align(n,f,l,m,j)          ia64_md_do_align (n,f,l,m)

In order to get a real fix into the binutils tree, I'd suggest adding
a new macro, say md_do_align_label(label) that generates the goto label
on i386/arm/s390 and does nothing on ia64.  Or, add a new flag to tc-ia64.h,
perhaps something like this:
#define md_do_align_nolabel
and change the #ifdef in gas/read.c to this:

#if defined(md_do_align) && !defined(md_do_align_nolabel)
  just_record_alignment:
#endif

Cheers,
-Peter
--
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021206005100.447A62A7EA>