From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6359 invoked by alias); 26 Mar 2002 21:06:05 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 6306 invoked by uid 71); 26 Mar 2002 21:06:03 -0000 Date: Tue, 26 Mar 2002 13:06:00 -0000 Message-ID: <20020326210603.6299.qmail@sources.redhat.com> To: vmakarov@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Joel Sherrill Subject: Re: bootstrap/3589: GCC 3.0-CVS illegal instruction on hppa1.1-proelf Reply-To: Joel Sherrill X-SW-Source: 2002-03/txt/msg01005.txt.bz2 List-Id: The following reply was made to PR bootstrap/3589; it has been noted by GNATS. From: Joel Sherrill To: Vladimir Makarov Cc: gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org, vmakarov@gcc.gnu.org, joel@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: bootstrap/3589: GCC 3.0-CVS illegal instruction on hppa1.1-proelf Date: Tue, 26 Mar 2002 14:59:26 -0600 Vladimir Makarov wrote: > > Joel Sherrill wrote: > > > > Vladimir Makarov wrote: > > > > > > Joel Sherrill wrote: > > > > > > > > Vladimir Makarov wrote: > > > > > > > > > > Joel Sherrill wrote: > > > > > > > > > > >Is there any ifdef to check and decide which directives to use? > > > > > > > > > > > > And if there is any reference mapping between them, I would appreciate > > > > > > knowing about it. > > > > > > > > > > Here is the path solving the problem. > > > > > > > > > > You could find a description of the pseudoops and mapping them into elf > > > > > sections in > > > > > > > > > > http://segfault.net/~scut/cpu/hppa/HP_Assembler_Reference_Manual_HP9000_9th_Ed.pdf > > > > > > > > Thanks. > > > > > > > > Could the __PRO__ (or something similar) be part of the cpp predefines > > > > for this > > > > configuration so non-gcc assembly can do the right thing? I know that > > > > at least > > > > libgloss and RTEMS have hppa assembly. > > > > > > > > > > Yes, we could do it. But it is not urgent now. Libgloss has no > > > .subspace directive so it should be compiled without problems. > > > > OK. There are some in RTEMS but I am happy to disable them. The hppa > > port (when really active) was maintained on on an hpux box using gcc > > and native as/ld. So getting to the point where it is built using > > Here the rewritten patch is. __PRO__ is now always defined for > hppa1.1-*-pro* and hppa1.1-*-rtems*. Please ignore the previous patch > (__PRO__ was used only for libgcc compilation in it). I hate to say this but hppa1.1-*-rtems* includes config/pa/rtems.h after config/pa/pa-pro-end.h so ends up overriding the CPP_PREDEFINES settings. So -D__PRO__ has to be added to config/pa/rtems.h as well. It isn't obvious because the include order is from config.gcc but this is basically how all of the *-rtems* targets are constructed. We baseline another similar target and slightly modify it for RTEMS. :) --joel > 2002-03-26 Vladimir Makarov > > * pa/pa-pro-end.h (CPP_PREDEFINES): Add -D__PRO__. > > * pa/lib2funcs.asm: Don't use .SPACE and .SUBSPACE if __PRO__ is > defined. > > Index: pa/lib2funcs.asm > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/config/pa/lib2funcs.asm,v > retrieving revision 1.6 > diff -c -p -r1.6 lib2funcs.asm > *** lib2funcs.asm 2001/04/16 18:30:45 1.6 > --- lib2funcs.asm 2002/03/26 20:46:35 > *************** > *** 28,33 **** > --- 28,34 ---- > ; the Free Software Foundation, 59 Temple Place - Suite 330, > ; Boston, MA 02111-1307, USA. > > + #ifndef __PRO__ > .SPACE $PRIVATE$ > .SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31 > .SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82 > *************** > *** 35,45 **** > .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 > .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY > .SUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,SORT=8 > ! > .IMPORT $$dyncall,MILLICODE > .SPACE $TEXT$ > .SUBSPA $CODE$ > ! > ; Simply call with the address of the desired import stub in %r22 and > ; arguments in the normal place (%r26-%r23 and stack slots). > ; > --- 36,49 ---- > .SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44 > .SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY > .SUBSPA $MILLICODE$,QUAD=0,ALIGN=8,ACCESS=44,SORT=8 > ! #endif > .IMPORT $$dyncall,MILLICODE > + #ifndef __PRO__ > .SPACE $TEXT$ > .SUBSPA $CODE$ > ! #else > ! .text > ! #endif > ; Simply call with the address of the desired import stub in %r22 and > ; arguments in the normal place (%r26-%r23 and stack slots). > ; > Index: pa/pa-pro-end.h > =================================================================== > RCS file: /cvs/gcc/gcc/gcc/config/pa/pa-pro-end.h,v > retrieving revision 1.5 > diff -c -p -r1.5 pa-pro-end.h > *** pa-pro-end.h 2000/11/02 23:29:12 1.5 > --- pa-pro-end.h 2002/03/26 20:46:35 > *************** Boston, MA 02111-1307, USA. */ > *** 30,36 **** > #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: > -L/lib/libp/ -lc}" > > #undef CPP_PREDEFINES > ! #define CPP_PREDEFINES "-Dhppa -DPWB -Acpu=hppa -Amachine=hppa" > > /* hpux8 and later have C++ compatible include files, so do not > pretend they are `extern "C"'. */ > --- 30,36 ---- > #define LIB_SPEC "%{!p:%{!pg:-lc}}%{p: -L/lib/libp/ -lc}%{pg: > -L/lib/libp/ -lc}" > > #undef CPP_PREDEFINES > ! #define CPP_PREDEFINES "-Dhppa -DPWB -D__PRO__ -Acpu=hppa > -Amachine=hppa" > > /* hpux8 and later have C++ compatible include files, so do not > pretend they are `extern "C"'. */ -- Joel Sherrill, Ph.D. Director of Research & Development joel@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985