public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  1999-10-25 22:32 ` Jeffrey A Law
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * libobjc/thr-dce.c (__objc_thread_set_priority): PRI_FG_MIN_NP is not
	  available in all DCE ports. If not defined, return 0.
	  (__objc_thread_get_priority): If PRI_FG_MIN_NP not defined, default
	  to OBJC_THREAD_INTERACTIVE_PRIORITY.

*** egcs/libobjc/thr-dce.c	Mon Aug 30 21:50:50 1999
--- egcs-ss/libobjc/thr-dce.c	Mon Aug 30 21:53:02 1999
***************
*** 79,84 ****
--- 79,85 ----
  {
    int sys_priority = 0;
  
+ #ifdef PRI_FG_MIN_NP
    switch (priority)
      {
      case OBJC_THREAD_INTERACTIVE_PRIORITY:
***************
*** 99,104 ****
--- 100,108 ----
    else
      /* Failed */
      return -1;
+ #else
+     return 0;
+ #endif
  }
  
  /* Return the current thread's priority. */
***************
*** 107,112 ****
--- 111,117 ----
  {
    int sys_priority;
      
+ #ifdef PRI_FG_MIN_NP
    if ((sys_priority = pthread_getprio(pthread_self())) >= 0) {
      if (sys_priority >= PRI_FG_MIN_NP && sys_priority <= PRI_FG_MAX_NP)
        return OBJC_THREAD_INTERACTIVE_PRIORITY;
***************
*** 117,122 ****
--- 122,130 ----
  
    /* Failed */
    return -1;
+ #else
+   return OBJC_THREAD_INTERACTIVE_PRIORITY;
+ #endif
  }
  
  /* Yield our process time to another thread. */

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-07  8:42 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  1999-10-25 22:41 ` Jeffrey A Law
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-07  8:42 UTC (permalink / raw)
  To: Jeff Law; +Cc: gcc

In message < 4.1.19990906102304.00c72c80@garfield.dis.com >you write:

>> + #undef CPP_PREDEFINES
>> + #define CPP_PREDEFINES "-Dhppa -Dhp3000s900 -D__hp3000s900 -Dhp3k9
>> -Dmpeix -Dhp3000 -DREVARGV -Asystem(mpeix) -Acpu(hppa) -Amachine(hppa)"

>You should move the -D definitions into a CPP_SPEC string to avoid ANSI
>namespace pollution.

Hmmm. I just lifted the HP-UX code and change hp9000s800 to hp3000s900.
I'll change it as you suggest.

>  > + 
>  > + /* HPUX needs gcc_plt_call for gdb. Since gdb is not yet running on
>  > +  * MPE and I think that gcc_plt_call will need an MPE variant, use
>  > +  * the following in lieu of the DO_GLOBAL_DTORS_BODY declared in pa.h
>  > +  */
>What you'll need to do to find out is determine whether or not your runtime
>linker allows a return location from a call to be a stack address.

If you mean "does MPE allow the ability to execute code in the data stack?",
then, no. When I did the Java JIT for MPE for HP this was a major stumbling
area as MPE requires code to be in code pages, not data pages. The stack
area are all marked as data pages. I had to write some exotic kernel stuff
to create a code page that still got mapped into SR5 space to make the JIT
work. I suppose I can use the same techniques here. (I'll worry about that
when I get to the gdb port).

>  > + #undef  ASM_DECLARE_FUNCTION_NAME
>  > + #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
[snip]
>If the only difference is that you need a PRIV_LEV=3 on a static function, I
>see no reason we can't promote that into som.h.  I believe that would
>eliminate the need for a separate ASM_DECLARE_FUNCTION_NAME, right?

I would prefer this route too. BTW - you mean pa.h, don't you? :-)

>If you end up with a separate ASM_DECLARE_FUNCTION_NAME you certainly do
>not need TARGET_PORTABLE_RUNTIME support ;-)

Actually, MPE doesn't need it anyway.

>  > + #undef ASM_IDENTIFY_GCC
>  > + #define ASM_IDENTIFY_GCC(FILE)                                         
>  >         \
>  > +         do {
       \
>  > +                 fputs ("; gcc_compiled.:\n", FILE);
      \
>  > +                 fprintf (FILE, "\t.compiler \"%s %s %s\"\n",
       \
>  > +                         main_input_filename,
       \
>  > +                         "GNU_C_Compiler",
    \
>  > +                         version_string);
   \
>  > +         } while (0)
>Only problem with this is formatting.  I strongly recommend you read the GNU
>coding standards.

>Two space indention for nesting levels please, not tabs, not four spaces, but
>two.  

I seem to have a problem with my mailer and tabs as my version looks correct.
I'll remove the tabs completely.

It may be a couple of days before I'll resubmit as I need to rebuild and test
your suggested changes to the <control Y> stuff (mpebreak.asm).

Also, since you asked (long double) ... I'll also submit pa.c, pa.h and
pa.md. I know these will be more "controversial", but at least we can
begin the discussions.

Regards,


M.
--
Mark Klein                                    DIS International, Ltd.
http://www.dis.com                            415-892-8400
PGP Public Key Available
--

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-08  1:39 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

I'm not sure where this should go, but ...

HP tar (more correctly, MKS tar) has bugs such that it will report that
it failed, even if successful. This install wrapper is to work around 
that and allow a complete installation without being handheld.


Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * install.mpe: New file for MPE port.

diff -c -N -r -x CVS -x Entries -x Repository -x Root -x . egcs/install.mpe
egcs-ss/install.mpe
*** egcs/install.mpe	Wed Dec 31 16:00:00 1969
--- egcs-ss/install.mpe	Mon Aug 30 21:52:57 1999
***************
*** 0 ****
--- 1,17 ----
+ dirs="gcc etc hppa1.0-hp-mpeix/* texinfo"
+ for d in $dirs; do
+     if [ $d = gcc ] ; then
+ 	(echo Installing gcc;				\
+ 		cd gcc; 				\
+ 		make 	install-common install-libgcc	\
+ 			install-man lang.install-normal	\
+ 			install-driver;			\
+ 		make	TAROUTOPTS=xopvf install-headers\
+ 	)
+     else
+ 	(echo Installing $d;				\
+ 		cd $d;					\
+ 		make install				\
+ 	)
+     fi
+ done

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-08  1:41 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * libio/configure.in: Add mpeix.mt make fragment.

*** egcs/libio/configure.in	Mon Aug 30 21:50:49 1999
--- egcs-ss/libio/configure.in	Mon Aug 30 21:53:00 1999
***************
*** 49,54 ****
--- 49,55 ----
  frags=
  
  case "${target}" in
+   *-mpeix*)      frags="mpeix.mt" ;;
    *-hpux*)       frags=hpux.mt ;;
    alpha*-*-linux-gnulibc1)
  		 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-08  1:40 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * README.mpe: Special Instructions for MPE.

*** egcs/README.mpe	Wed Dec 31 16:00:00 1969
--- egcs-ss/README.mpe	Mon Aug 30 21:51:54 1999
***************
*** 0 ****
--- 1,26 ----
+ In order to build gcc under MPE, you will need to do the following:
+ 
+ Install MPE/iX 6.0 or obtain the MPEJXQ1B and PXJXQ1B patches from  
+ HP. You will also need to obtain /usr/contrib/include as it contains
+ certain header files not originally distributed with MPE. The JXQ1
+ patches allow certain special characters not defined in the POSIX
+ specs as part of a pathname. These are standard in MPE/iX 6.0.
+ 
+ Obtain the binary distribution of the GNU Freeware tools from
+ http://jazz.external.hp.com and install them. This is necessary
+ and you will not be able to bootstrap with the HP/C compiler alone.
+ You must minimally install GNUCORE and GNUGCC.
+ 
+ You will also need Perl from http://www.cccd.edu/~markb (also
+ linked to from Jazz). Once perl and at least the GNU Core have  
+ been installed, run the configure script for MPE:
+ 
+ ./configure.mpe
+ 
+ When this completes, cd into obj-MPE and make everything with:  
+ 
+ make
+ 
+ There are some problems with doing a complete automated installation
+ due to bugs in some of HP's tools. Instead of doing a make install
+ from the top level, I would suggest that you ./install.mpe.

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * pa/x-pa-mpeix: New file for the MPE port.

*** egcs/gcc/config/pa/x-pa-mpeix	Wed Dec 31 16:00:00 1969
--- egcs-ss/gcc/config/pa/x-pa-mpeix	Mon Aug 30 21:52:06 1999
***************
*** 0 ****
--- 1,17 ----
+ ALLOCA=alloca.o
+ X_CFLAGS=-I/usr/contrib/include -DSYSV -D_POSIX_SOURCE -D_SOCKET_SOURCE
-D_MPEIX_SOURCE -DPOSIX -D_MPEXL_SOURCE
+ CC=gcc
+ AR=/bin/ar
+ OLDAR_FLAGS=rc
+ OLDAR=/bin/ar
+ OLDCC=c89
+ TARGET_LIBGCC2_CFLAGS=
+ LIB2FUNCS_EXTRA= mpebreak.asm quadlib.asm
+ 
+ mpebreak.asm: $(srcdir)/config/pa/mpebreak.asm
+ 	rm -f mpebreak.asm
+ 	cp $(srcdir)/config/pa/mpebreak.asm .
+ 
+ quadlib.asm: $(srcdir)/config/pa/quadlib.asm
+ 	rm -f quadlib.asm
+ 	cp $(srcdir)/config/pa/quadlib.asm .

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-07  2:38 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

MPE does not use <control C> for interrupts but uses <control Y> 
instead. This is a kludge to allow <control Y> to have the same
semantics as a <control C>. It is done by installing a signal
handler in each program as part of the startup.


Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com>

        * pa/mpebreak.asm: New file for MPE port.

*** egcs/gcc/config/pa/mpebreak.asm	Wed Dec 31 16:00:00 1969
--- egcs-ss/gcc/config/pa/mpebreak.asm	Mon Aug 30 21:52:06 1999
***************
*** 0 ****
--- 1,87 ----
+ ;  Subroutines to arm <control Y> trap handler on MPEiX.
+ ;  Copyright (C) 1999 Free Software Foundation, Inc.
+ 
+ ;  This file is part of GNU CC.
+ 
+ ;  GNU CC is free software; you can redistribute it and/or modify
+ ;  it under the terms of the GNU General Public License as published by
+ ;  the Free Software Foundation; either version 2, or (at your option)
+ ;  any later version.
+ 
+ ;  GNU CC is distributed in the hope that it will be useful,
+ ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ ;  GNU General Public License for more details.
+ 
+ ; In addition to the permissions in the GNU General Public License, the
+ ; Free Software Foundation gives you unlimited permission to link the
+ ; compiled version of this file with other programs, and to distribute
+ ; those programs without any restriction coming from the use of this
+ ; file.  (The General Public License restrictions do apply in other
+ ; respects; for example, they cover modification of the file, and
+ ; distribution when not linked into another program.)
+ 
+ ;  You should have received a copy of the GNU General Public License
+ ;  along with GNU CC; see the file COPYING.  If not, write to
+ ;  the Free Software Foundation, 59 Temple Place - Suite 330,
+ ;  Boston, MA 02111-1307, USA.
+ 
+ 	.SPACE $PRIVATE$
+ 	.SUBSPA $DATA$,QUAD=1,ALIGN=8,ACCESS=31
+ 	.SUBSPA $BSS$,QUAD=1,ALIGN=8,ACCESS=31,ZERO,SORT=82
+ 	.SPACE $TEXT$
+ 	.SUBSPA $LIT$,QUAD=0,ALIGN=8,ACCESS=44
+ 	.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ 	.IMPORT $global$,DATA
+ 	.IMPORT $$dyncall,MILLICODE
+ 	.compiler "mpebreak.asm GNU_PA-RISC_Assembler 2.8.1"
+ 	.IMPORT XCONTRAP,CODE
+ 	.IMPORT __MPESubsystemBreakHandler,CODE
+ 	.SPACE $PRIVATE$
+ 	.SUBSPA $DATA$
+ 
+ 	.align 4
+ L$C0001
+ 	.word P%__MPESubsystemBreakHandler
+ 	.SPACE $TEXT$
+ 	.SUBSPA $CODE$
+ 
+ 	.align 4
+ 	.EXPORT __MPEArmSubsystemBreak,ENTRY,PRIV_LEV=3
+ __MPEArmSubsystemBreak
+ 	.PROC
+ 	.CALLINFO FRAME=128,CALLS,SAVE_RP
+ 	.ENTRY
+ 	stw %r2,-20(0,%r30)
+ 	ldo 128(%r30),%r30
+ 	addil LR'L$C0001-$global$,%r27
+ 	ldw RR'L$C0001-$global$(%r1),%r26
+ 	.CALL ARGW0=GR,ARGW1=GR
+ 	bl XCONTRAP,%r2
+ 	ldo -120(%r30),%r25
+ 	ldw -148(0,%r30),%r2
+ 	bv 0(%r2)
+ 	ldo -128(%r30),%r30
+ 	.EXIT
+ 	.PROCEND
+ 	.IMPORT RESETCONTROL,CODE
+ 	.IMPORT kill,CODE
+ 	.align 4
+ 	.EXPORT __MPESubsystemBreakHandler,ENTRY,PRIV_LEV=3
+ __MPESubsystemBreakHandler
+ 	.PROC
+ 	.CALLINFO FRAME=128,CALLS,SAVE_RP
+ 	.ENTRY
+ 	stw %r2,-20(0,%r30)
+ 	.CALL 
+ 	bl RESETCONTROL,%r2
+ 	ldo 128(%r30),%r30
+ 	ldi 0,%r26
+ 	.CALL ARGW0=GR,ARGW1=GR
+ 	bl kill,%r2
+ 	ldi 2,%r25
+ 	ldw -148(0,%r30),%r2
+ 	bv 0(%r2)
+ 	ldo -128(%r30),%r30
+ 	.EXIT
+ 	.PROCEND

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-08  1:49 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

Handle certain MPE nuances such as bcopy() not being able to do
overlapped moves. Invoke millicode instead of bcopy().

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * pa/xm-pampeix.h: New file for the MPE port.

*** egcs/gcc/config/pa/xm-pampeix.h	Wed Dec 31 16:00:00 1969
--- egcs-ss/gcc/config/pa/xm-pampeix.h	Mon Aug 30 21:52:06 1999
***************
*** 0 ****
--- 1,109 ----
+ /* Configuration for GNU C-compiler for PA-RISC.
+    Copyright (C) 1998 Free Software Foundation, Inc.
+    Contributed by Mark Klein (mklein@dis.com)           
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ 
+ #ifndef _POSIX_SOURCE
+ #define _POSIX_SOURCE
+ #endif
+ 
+ #define USG
+ 
+ /* Use System V memory functions.  */
+ #ifndef _BCMP_DEFINED
+ #define _BCMP_DEFINED
+ #ifndef BSTRING
+ #define BSTRING
+ #endif
+ #if !defined(bcopy) && !defined(HAS_BCOPY)
+ inline static void
+ bcopy(const void *src,void *dst,int len) {
+ 	asm volatile (
+ 			".import $$lr_unk_unk,MILLICODE;	
+ 			copy %0, %%r26;
+ 			copy %1, %%r25;
+ 			bl $$lr_unk_unk,%%r31;
+ 			copy %2, %%r24"
+ 					:
+ 					: "r" (src),
+ 					  "r" (dst),
+ 					  "r" (len)
+ 					: "%r24",
+ 					  "%r25",
+ 					  "%r26",
+ 					  "%r31");
+ }
+ #endif
+ #if !defined(bzero) && !defined(HAS_BZERO)
+ #define bzero(a,b) memset (a,0,b)
+ #endif
+ #if !defined(bcmp) && !defined(HAS_BCMP)
+ #define bcmp(a,b,c) memcmp (a,b,c)
+ #endif
+ #endif
+ 
+ #if !defined(rindex) && !defined(HAS_RINDEX)
+ #define rindex strrchr
+ #endif
+ #if !defined(index) && !defined(HAS_INDEX)
+ #define index strchr
+ #endif
+ 
+ /* #defines that need visibility everywhere.  */
+ #define FALSE 0
+ #define TRUE 1
+ 
+ /* This describes the machine the compiler is hosted on.  */
+ #define HOST_BITS_PER_CHAR 8
+ #define HOST_BITS_PER_SHORT 16
+ #define HOST_BITS_PER_INT 32
+ #define HOST_BITS_PER_LONG 32
+ #define HOST_BITS_PER_LONGLONG 64
+ 
+ /* Doubles are stored in memory with the high order word first.  This
+    matters when cross-compiling.  */
+ #define HOST_WORDS_BIG_ENDIAN 1
+ 
+ /* Place any machine-dependent include files here, in case we
+    are bootstrapping.  */
+ 
+ /* target machine dependencies.
+    tm.h is a symbolic link to the actual target specific file.   */
+ #include "tm.h"
+ 
+ /* Arguments to use with `exit'.  */
+ #define SUCCESS_EXIT_CODE 0
+ #define FATAL_EXIT_CODE 33
+ 
+ /* Don't try to use sys_siglist.  */
+ #define NO_SYS_SIGLIST
+ 
+ /* HP's compiler has problems with enum bitfields.  */
+ #define ONLY_INT_FIELDS
+ 
+ #ifndef _MPEIX_SOURCE
+ #define _MPEIX_SOURCE
+ #endif
+ 
+ /* If not compiled with GNU C, use C alloca.  */
+ #ifndef __GNUC__
+ #define USE_C_ALLOCA
+ #endif
+ 
+ #define STARTFILE_SPEC		""

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

This is a punt per your recommendation. :-)


Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * libio/mpeix.mt: New file for MPE port.

*** egcs/libio/config/mpeix.mt	Wed Dec 31 16:00:00 1969
--- egcs-ss/libio/config/mpeix.mt	Wed Sep  1 20:57:00 1999
***************
*** 0 ****
--- 1,20 ----
+ # Flags to pass to gen-params when building _G_config.h.
+ # For example: G_CONFIG_ARGS = size_t="unsigned long"
+ G_CONFIG_ARGS = DOLLAR_IN_LABEL=1 
+ 
+ #
+ # gen-params tries to determine whether or not printf_fp exists by
+ # simply compiling a test program. Since MPE is by definition a
+ # shared runtime environment, this won't work unless the resulting
+ # program is run. Simply run _G_config.h through a sed script to
+ # update the values accordingly.
+ #
+ _G_CONFIG_H = stmp-Gconfig
+ 
+ stmp-Gconfig: $(_G_CONFIG_H) 
+ 	sed -e "s/_G_HAVE_PRINTF_FP 1/_G_HAVE_PRINTF_FP 0/" \
+ 	    -e "s/_G_HAVE_LONG_DOUBLE_IO 1/_G_HAVE_LONG_DOUBLE_IO 0/" \
+ 	    <_G_config.h > tmp-config.h
+ 	mv -f tmp-config.h _G_config.h
+ 	touch stmp-Gconfig
+ 	$(MAKE) $(FLAGS_TO_PASS) _G_CONFIG_H=_G_config.h all

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:40 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:40 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

MPE/iX is a late binding OS, so simply compiling and linking a test
program to prove the existence of various routines won't work. I've
built a customized autoconf where the ac_link macro also attempts to
run what it links. It does so in a fashion such that if the final
bind is successful, then the program will not actually be run 
because in most cases, it will fail, which will still give a 
false negative. 

This script simply finds all cases of configure.in scripts that
are autoconf versions, not Cygnus versions.


Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * configure.mpe: New file for MPE port.

*** egcs/configure.mpe	Wed Dec 31 16:00:00 1969
--- egcs-ss/configure.mpe	Mon Aug 30 21:51:54 1999
***************
*** 0 ****
--- 1,31 ----
+ #
+ # MPE is by definition a "shared" environment and the configure scripts
+ # will fail to correctly determine whether or not something exists by
+ # simply doing a compile. Rerun autoconf to update the configure scripts.
+ # Use the autoconf from 
+ #   http://jazz.external.hp.com/src/gnu/gnu_tools/gnutools.html
+ #
+ # Find configure.in scripts containing AC_INIT and run autoconf in those
+ # directories.
+ for f in `find . -name configure.in` 
+ do
+ 	fgrep AC_INIT ${f} > /dev/null
+ 	if [ $? = 0 ] 
+ 	then
+ 		echo Processing ${f}
+ 		(cd `dirname ${f}`; autoconf)
+ 	fi
+ done
+ 
+ export CFLAGS="-I/usr/contrib/include -DSYSV -D_POSIX_SOURCE
-D_SOCKET_SOURCE \
+   -D_MPEIX_SOURCE -D_MPEXL_SOURCE"
+ export CXXFLAGS="$CFLAGS"
+ export CPPFLAGS="$CFLAGS"
+ export LDFLAGS="-lsocket -lcurses -lsvipc -ldce"
+ export CC=gcc
+ export CPP="gcc -E"
+ 
+ mkdir obj-MPE
+ cd obj-MPE
+ ../configure --with-gnu-as --disable-pic --disable-shared
--enable-threads=dce
+ # ../configure --with-gnu-as --disable-pic --disable-shared 

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:39 Mark Klein
  1999-09-07  3:20 ` Jeffrey A Law
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 2 replies; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:39 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * pa/pa-mpeix.h: New file for MPE port.

*** egcs/gcc/config/pa/pa-mpeix.h	Wed Dec 31 16:00:00 1969
--- egcs-ss/gcc/config/pa/pa-mpeix.h	Mon Aug 30 21:52:06 1999
***************
*** 0 ****
--- 1,240 ----
+ /* Definitions of target machine for GNU compiler, for MPEiX.
+    Contributed by Mark Klein <mklein@dis.com>
+    Copyright (C) 1998 Free Software Foundation, Inc.
+ 
+ This file is part of GNU CC.
+ 
+ GNU CC is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ 
+ GNU CC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ 
+ You should have received a copy of the GNU General Public License
+ along with GNU CC; see the file COPYING.  If not, write to
+ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+ 
+ #undef TARGET_DEFAULT
+ #define TARGET_DEFAULT (MASK_GAS | MASK_JUMP_IN_DELAY | MASK_USE_MILLICODE)
+ 
+ /* MPE (as of MPE/iX 6.5) still uses older millicode than HP-UX. */
+ #undef  TARGET_NEW_MILLICODE
+ #define TARGET_NEW_MILLICODE 0
+
+ /* Make GCC agree with types.h.  */
+ #undef SIZE_TYPE
+ #undef PTRDIFF_TYPE
+ 
+ #define SIZE_TYPE "unsigned int"
+ #define PTRDIFF_TYPE "int"
+ 
+ #undef LINK_SPEC
+ #define LINK_SPEC ""
+ 
+ #undef LIB_SPEC
+ #define LIB_SPEC "%{!p:%{!pg:%{!threads:-lc}}}%{p:-lc_p}%{pg:-lc_p}
%{threads:/SYS/PUB/start.o -WL,xl=threadxl.pub.sys}"
+ 
+ #undef CPP_PREDEFINES
+ #define CPP_PREDEFINES "-Dhppa -Dhp3000s900 -D__hp3000s900 -Dhp3k9
-Dmpeix -Dhp3000 -DREVARGV -Asystem(mpeix) -Acpu(hppa) -Amachine(hppa)"
+   
+ #undef LDD_SUFFIX
+ 
+ /* Readonly data on MPE must be in $DATA$ to be available across
+    space boundaries for the intrinsic mechanism.
+  */
+ #undef SELECT_RTX_SECTION
+ #define SELECT_RTX_SECTION(MODE,RTX) data_section ();
+ 
+ #undef READONLY_DATA_ASM_OP
+ #define READONLY_DATA_ASM_OP "\t.SPACE $PRIVATE$\n\t.SUBSPA $DATA$\n"
+   
+ /* Ugly hack, but I don't see any other way.
+  * Gotta enable the <Control Y> traps, otherwise SIG_INT won't work.
+  */
+ #undef DO_GLOBAL_CTORS_BODY
+ #define DO_GLOBAL_CTORS_BODY						\
+ do {									\
+   extern __MPEArmSubsystemBreak();					\
+   unsigned long nptrs = (unsigned long) __CTOR_LIST__[0];		\
+   unsigned i;								\
+   if (nptrs == -1)							\
+     for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++);		\
+   for (i = nptrs; i >= 1; i--)						\
+     __CTOR_LIST__[i] ();						\
+   __MPEArmSubsystemBreak();   						\
+ } while (0) 
+ 
+ /* HPUX needs gcc_plt_call for gdb. Since gdb is not yet running on
+  * MPE and I think that gcc_plt_call will need an MPE variant, use
+  * the following in lieu of the DO_GLOBAL_DTORS_BODY declared in pa.h
+  */
+ #undef DO_GLOBAL_DTORS_BODY
+ #define DO_GLOBAL_DTORS_BODY			\
+ do {						\
+   func_ptr *p;					\
+   for (p = __DTOR_LIST__ + 1; *p; )		\
+     (*p++) ();					\
+ } while (0)
+ 
+ 
+ /* Gotta worry about priv_lev on MPE, so this is different from
+  * the HP-UX defn.
+  */
+ #undef  ASM_DECLARE_FUNCTION_NAME
+ #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
+     do { tree fntype = TREE_TYPE (TREE_TYPE (DECL));			\
+ 	 tree tree_type = TREE_TYPE (DECL);				\
+ 	 tree parm;							\
+ 	 int i;								\
+ 	 if (TREE_PUBLIC (DECL) || TARGET_GAS)				\
+ 	   { extern int current_function_varargs;			\
+ 	     if (TREE_PUBLIC (DECL))					\
+ 	       {							\
+ 		 fputs ("\t.EXPORT ", FILE);				\
+ 		 assemble_name (FILE, NAME);				\
+ 		 fputs (",ENTRY,PRIV_LEV=3", FILE);			\
+ 	       }							\
+ 	     else							\
+ 	       {							\
+ 		 fputs ("\t.PARAM ", FILE);				\
+ 		 assemble_name (FILE, NAME);				\
+ 		 fputs (",PRIV_LEV=3", FILE);				\
+ 	       }							\
+ 	     if (TARGET_PORTABLE_RUNTIME)				\
+ 	       {							\
+ 		 fputs (",ARGW0=NO,ARGW1=NO,ARGW2=NO,ARGW3=NO,", FILE);	\
+ 		 fputs ("RTNVAL=NO\n", FILE);				\
+ 		 break;							\
+ 	       }							\
+ 	     for (parm = DECL_ARGUMENTS (DECL), i = 0; parm && i < 4;	\
+ 		  parm = TREE_CHAIN (parm))				\
+ 	       {							\
+ 		 if (TYPE_MODE (DECL_ARG_TYPE (parm)) == SFmode		\
+ 		     && ! TARGET_SOFT_FLOAT)				\
+ 		   fprintf (FILE, ",ARGW%d=FR", i++);			\
+ 		 else if (TYPE_MODE (DECL_ARG_TYPE (parm)) == DFmode	\
+ 			  && ! TARGET_SOFT_FLOAT)			\
+ 		   {							\
+ 		     if (i <= 2)					\
+ 		       {						\
+ 			 if (i == 1) i++;				\
+ 			 ASM_DOUBLE_ARG_DESCRIPTORS (FILE, i++, i++);	\
+ 		       }						\
+ 		     else						\
+ 		       break;						\
+ 		   }							\
+ 		 else							\
+ 		   {							\
+ 		     int arg_size =					\
+ 		       FUNCTION_ARG_SIZE (TYPE_MODE (DECL_ARG_TYPE (parm)),\
+ 					  DECL_ARG_TYPE (parm));	\
+ 		     /* Passing structs by invisible reference uses	\
+ 			one general register.  */			\
+ 		     if (arg_size > 2					\
+ 			 || TREE_ADDRESSABLE (DECL_ARG_TYPE (parm)))	\
+ 		       arg_size = 1;					\
+ 		     if (arg_size == 2 && i <= 2)			\
+ 		       {						\
+ 			 if (i == 1) i++;				\
+ 			 fprintf (FILE, ",ARGW%d=GR", i++);		\
+ 			 fprintf (FILE, ",ARGW%d=GR", i++);		\
+ 		       }						\
+ 		     else if (arg_size == 1)				\
+ 		       fprintf (FILE, ",ARGW%d=GR", i++);		\
+ 		     else						\
+ 		       i += arg_size;					\
+ 		   }							\
+ 	       }							\
+ 	     /* anonymous args */					\
+ 	     if ((TYPE_ARG_TYPES (tree_type) != 0			\
+ 		  && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (tree_type)))\
+ 		      != void_type_node))				\
+ 		 || current_function_varargs)				\
+ 	       {							\
+ 		 for (; i < 4; i++)					\
+ 		   fprintf (FILE, ",ARGW%d=GR", i);			\
+ 	       }							\
+ 	     if (TYPE_MODE (fntype) == DFmode && ! TARGET_SOFT_FLOAT)	\
+ 	       fputs (DFMODE_RETURN_STRING, FILE);			\
+ 	     else if (TYPE_MODE (fntype) == SFmode && ! TARGET_SOFT_FLOAT) \
+ 	       fputs (SFMODE_RETURN_STRING, FILE);			\
+ 	     else if (fntype != void_type_node)				\
+ 	       fputs (",RTNVAL=GR", FILE);				\
+ 	     fputs ("\n", FILE);					\
+ 	   }} while (0)
+ 
+ /* This is another ugly hack. Compilation units must be named
+  * if we ever want to extract them by name. Since making libgcc
+  * does this, I added a new pseudo command .compiler that is used
+  * to communicate the names to gas.
+  */
+ #undef ASM_IDENTIFY_GCC
+ #define ASM_IDENTIFY_GCC(FILE) 						\
+ 	do {								\
+ 		fputs ("; gcc_compiled.:\n", FILE);			\
+ 		fprintf (FILE, "\t.compiler \"%s %s %s\"\n",		\
+ 			 main_input_filename,				\
+ 			 "GNU_C_Compiler",				\
+ 			 version_string);				\
+ 	} while (0)
+ 
+ 
+ /*
+  * Long double support for MPE. The Quad functions are part of the PRO
+  * ABI, but it appears that I'm the only one interested in Quad support
+  * on PA, so I'll declare and support it only for MPE.
+  */
+ #undef LONG_DOUBLE_TYPE_SIZE
+ #define LONG_DOUBLE_TYPE_SIZE 128
+ 
+ /* This is how to output an assembler line defining a `long double'
constant. */
+ 
+ #undef ASM_OUTPUT_LONG_DOUBLE
+ #define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE)  \
+   do { long l[4];							\
+        REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, l);			\
+        fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", l[0], l[1]);	\
+        fprintf (FILE, "\t.word 0x%lx\n\t.word 0x%lx\n", l[2], l[3]);	\
+      } while (0)
+ 
+ #undef INIT_TARGET_OPTABS
+ #define INIT_TARGET_OPTABS						\
+   do {									\
+     add_optab->handlers[(int) TFmode].libfunc				\
+       = gen_rtx_SYMBOL_REF (Pmode, ADDTF3_LIBCALL);			\
+     sub_optab->handlers[(int) TFmode].libfunc				\
+       = gen_rtx_SYMBOL_REF (Pmode, SUBTF3_LIBCALL);			\
+     smul_optab->handlers[(int) TFmode].libfunc				\
+       = gen_rtx_SYMBOL_REF (Pmode, MULTF3_LIBCALL);			\
+     flodiv_optab->handlers[(int) TFmode].libfunc			\
+       = gen_rtx_SYMBOL_REF (Pmode, DIVTF3_LIBCALL);			\
+     neg_optab->handlers[(int) TFmode].libfunc				\
+       = gen_rtx_SYMBOL_REF (Pmode, NEGTF2_LIBCALL);			\
+     eqtf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EQTF2_LIBCALL);          \
+     netf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, NETF2_LIBCALL);          \
+     gttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GTTF2_LIBCALL);          \
+     getf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, GETF2_LIBCALL);          \
+     lttf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LTTF2_LIBCALL);          \
+     letf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, LETF2_LIBCALL);          \
+     trunctfsf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFSF2_LIBCALL);   \
+     trunctfdf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, TRUNCTFDF2_LIBCALL);   \
+     extendsftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDSFTF2_LIBCALL); \
+     extenddftf2_libfunc = gen_rtx_SYMBOL_REF (Pmode, EXTENDDFTF2_LIBCALL); \
+     floatsitf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATSITF2_LIBCALL);    \
+     floatditf_libfunc = gen_rtx_SYMBOL_REF (Pmode, FLOATDITF2_LIBCALL);    \
+     fixtfsi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFSI2_LIBCALL);  \
+     fixtfdi_libfunc = gen_rtx_SYMBOL_REF (Pmode, FIX_TRUNCTFDI2_LIBCALL);  \
+     fixunstfsi_libfunc							\
+       = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFSI2_LIBCALL);		\
+     fixunstfdi_libfunc							\
+       = gen_rtx_SYMBOL_REF (Pmode, FIXUNS_TRUNCTFDI2_LIBCALL);		\
+     sqrt_optab->handlers[(int) TFmode].libfunc			\
+ 	= gen_rtx_SYMBOL_REF (Pmode, "_U_Qfsqrt");			\
+   } while (0)
+ 
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (hppa - MPE Threaded)", stderr);

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:39 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:39 UTC (permalink / raw)
  To: law; +Cc: gcc

Explanation:

This provides the interface to the quad library as specified in the
PRO spec. This is implemented on MPE and HP-UX, but I don't know
about the other PA platforms. Long Double support is enabled by
default for MPE only.

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * pa/quadlib.asm: New file for long double support for the MPE port.

*** egcs/gcc/config/pa/quadlib.asm	Wed Dec 31 16:00:00 1969
--- egcs-ss/gcc/config/pa/quadlib.asm	Mon Aug 30 21:52:06 1999
***************
*** 0 ****
--- 1,359 ----
+ ;  Subroutines for long double support on the HPPA
+ ;  Copyright (C) 1999 Free Software Foundation, Inc.
+ 
+ ;  This file is part of GNU CC.
+ 
+ ;  GNU CC is free software; you can redistribute it and/or modify
+ ;  it under the terms of the GNU General Public License as published by
+ ;  the Free Software Foundation; either version 2, or (at your option)
+ ;  any later version.
+ 
+ ;  GNU CC is distributed in the hope that it will be useful,
+ ;  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ;  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ ;  GNU General Public License for more details.
+ 
+ ; In addition to the permissions in the GNU General Public License, the
+ ; Free Software Foundation gives you unlimited permission to link the
+ ; compiled version of this file with other programs, and to distribute
+ ; those programs without any restriction coming from the use of this
+ ; file.  (The General Public License restrictions do apply in other
+ ; respects; for example, they cover modification of the file, and
+ ; distribution when not linked into another program.)
+ 
+ ;  You should have received a copy of the GNU General Public License
+ ;  along with GNU CC; see the file COPYING.  If not, write to
+ ;  the Free Software Foundation, 59 Temple Place - Suite 330,
+ ;  Boston, MA 02111-1307, USA.
+ 
+ 	.SPACE $TEXT$
+ 	.SUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ 	.compiler "quadlib.asm GNU_PA-RISC_Assembler 2.9.4"
+ 	.IMPORT _U_Qfcmp,CODE
+ 	.IMPORT _U_Qfsub,CODE
+ 
+ 	.align 4
+ 	.NSUBSPA $CODE$,QUAD=0,ALIGN=8,ACCESS=44,CODE_ONLY
+ 	;
+ 	; Check two long doubles for equality
+ 	;
+ 	.EXPORT _U_Qfeq,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfeq
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	  ldi 4,%r24
+ 
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,= 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Check two long doubles for inequality
+ 	;
+ 	.EXPORT _U_Qfne,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfne
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	ldi 4,%r24
+ 	
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,<> 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30),%r30
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Check if opnd1 > opnd0                
+ 	;
+ 	.EXPORT _U_Qfgt,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfgt
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	ldi 23,%r24
+ 
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,= 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Check if opnd1 >= opnd0                
+ 	;
+ 	.EXPORT _U_Qfge,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfge
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	ldi 23,%r24
+ 
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,= 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Check if opnd1 < opnd0                
+ 	;
+ 	.EXPORT _U_Qflt,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qflt
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	ldi 9,%r24
+ 
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,= 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Check if opnd1 <= opnd0                
+ 	;
+ 	.EXPORT _U_Qfle,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfle
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Load the additional argument and call the comparison routine.
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	ldi 13,%r24
+ 
+ 	;
+ 	; The return from _U_Qfcmp is the masked C bit from the FP
+ 	; status register. Convert that to a 0 or 1.
+ 	;
+ 	comiclr,= 0,%r28,%r28
+ 	  ldi 1,%r28
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Negate opnd0 and store in ret0                 
+ 	;
+ 	.EXPORT _U_Qfneg,ENTRY,PRIV_LEV=3,ARGW0=GR,RTNVAL=GR
+ _U_Qfneg
+ 	.PROC
+ 	.CALLINFO FRAME=128,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 128(%r30),%r30
+ 
+ 	;
+ 	; copy the value to be negated to the frame.
+ 	;
+ 	ldw 0(0,%r26), %r25
+ 	ldw 4(0,%r26), %r24
+ 	ldw 8(0,%r26), %r23
+ 	ldw 12(0,%r26),%r1
+ 	stw %r25, -100(0,%r30)
+ 	stw %r24,  -96(0,%r30)
+ 	stw %r23,  -92(0,%r30)
+ 	stw %r1,   -88(0,%r30)
+ 	ldo -100(%r30), %r25
+ 
+ 	;
+ 	; ret0 contains a pointer to the location for the return
+ 	; value. Initialize it to zero and pass it as arg0 to
+ 	; _U_Qfsub.
+ 	;
+ 	copy %r28,%r26
+ 	stw %r0,0(0,%r26)
+ 	stw %r0,4(0,%r26)
+ 	stw %r0,8(0,%r26)
+ 	bl _U_Qfsub,%r2
+ 	  stw %r0,12(0,%r26)
+ 
+ 	;
+ 	; Return
+ 	;
+ 	ldw -148(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -128(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND
+ 
+ 	;
+ 	; Compare opnd0 and opnd1. If opnd0 == opnd1, return 0.
+ 	; If opnd0 is greater than opnd1, return 1.
+ 	; Otherwise, return -1.
+ 	;
+ 	.EXPORT _U_Qfcomp,ENTRY,PRIV_LEV=3,ARGW0=GR,ARGW1=GR,RTNVAL=GR
+ _U_Qfcomp
+ 	.PROC
+ 	.CALLINFO FRAME=64,CALLS,SAVE_RP
+ 	.ENTRY
+ 	;
+ 	; Build the frame
+ 	;
+ 	stw %r2,-20(0,%r30)
+ 	ldo 64(%r30),%r30
+ 
+ 	;
+ 	; Save arg0 and arg1.
+ 	;
+ 	stw %r26, -60(0,%r30)
+ 	stw %r25, -56(0,%r30)
+ 	;
+ 	; Check for equality
+ 	;
+ 	bl _U_Qfcmp,%r2
+ 	  ldi 4, %r24
+ 
+ 	comib,<> 0,%r28,done
+ 	  copy %r0, %r1
+ 
+ 	;
+ 	; Reset the parms and test for opnd0 > opnd1.
+ 	;
+ 	ldw -60(0,%r30),%r26
+ 	ldw -56(0,%r30),%r25
+ 	bl _U_Qfcmp,%r2
+ 	  ldi 22,%r24
+ 
+ 	ldi 1,%r1
+ 	comiclr,<> 0,%r28,0
+ 	  ldi -1,%r1
+ 
+ done
+ 	copy %r1,%r28
+ 	;
+ 	; Return
+ 	;
+ 	ldw -84(0,%r30),%r2
+ 	bv 0(%r2)
+ 	  ldo -64(%r30), %r30
+ 
+ 	.EXIT
+ 	.PROCEND

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: MPE Port
@ 1999-09-06 10:39 Mark Klein
  1999-09-30 18:02 ` Mark Klein
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-09-06 10:39 UTC (permalink / raw)
  To: law; +Cc: gcc

Sat Sep  4 18:00:00 PDT 1999 Mark Klein (mklein@dis.com)

        * configure.in: Add hppa1.0-*-mpeix for MPE port.


*** egcs/gcc/configure.in	Mon Aug 30 21:50:10 1999
--- egcs-ss/gcc/configure.in	Mon Aug 30 21:52:09 1999
***************
*** 1019,1024 ****
--- 1019,1033 ----
  		target_cpu_default="MASK_PA_11"
  		use_collect2=yes
  		;;
+ 	hppa1.0-*-mpeix*)
+ 		tm_file="${tm_file} pa/pa-mpeix.h"
+ 		xm_file=pa/xm-pampeix.h 
+ 		xmake_file=pa/x-pa-mpeix 
+ 		echo "You must use gas. Assuming it is already installed." 
+ 		install_headers_dir=install-headers-tar
+ 		fixincludes=Makefile.in
+ 		use_collect2=yes 
+ 		;; 
  	i370-*-mvs*)
  		;;
  changequote(,)dnl
--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread
* Re: HARD_REGNO_MODE_OK on PA-RISC (revisited)
@ 1999-08-27 17:20 Mark Klein
  1999-08-29  3:19 ` Jeffrey A Law
  0 siblings, 1 reply; 96+ messages in thread
From: Mark Klein @ 1999-08-27 17:20 UTC (permalink / raw)
  To: law; +Cc: gcc

At 03:59 PM 8/27/99 -0600, Jeffrey A Law wrote:

>My queue is over 200 patches deep.  And unfortunately MPE isn't anywhere near
>the top of the list.  Simply a matter of priorities.

OK. I'll keep tracking what you've got (thank heaven I ported CVS to MPE).
Let me know when you want me to repost them and I'll do so.

>:-)  I did something similar already.  We're still beating on it internally
>before we contribute it.

For sake of argument, here's mine. I reformatted it a bit to understand it
better. The only real changes are to handle the long double:

struct rtx_def *
function_arg(cum, mode, type, named)
  const CUMULATIVE_ARGS *cum;
  enum machine_mode mode;
  tree type;
  int named;
{
  rtx reg = 0;
  int basereg1 = 0;
  int basereg2 = 0;

  /*
   * See if there is at least one argument register still available.
   */
  if (4 >= cum->words + FUNCTION_ARG_SIZE (mode, type)) 
    {

    if (!TARGET_PORTABLE_RUNTIME        || 
        type == 0                       ||
        !FLOAT_MODE_P (mode)            ||
        TARGET_SOFT_FLOAT               ||
        cum->nargs_prototype > 0) 
      {
      if (FUNCTION_ARG_SIZE (mode, type) > 2)
        {
          /*
           * We're dealing with an argument greater than 2 words.
           * It must be passed in the frame by reference.
           */
          return 0;
        }

      if (FUNCTION_ARG_SIZE (mode, type) > 1)
        {
          /*
           * This is a multi-word parameter. If this is either a direct
           * call or the portable runtime and we're dealing with the
           * hardware FPU, place the argument in the argument into the
           * correct FARG, otherwise put it in a general register.
           */
          if ((!cum->indirect           || 
               TARGET_PORTABLE_RUNTIME) &&
               (mode) == DFmode         &&
               !TARGET_SOFT_FLOAT)
              basereg1 = (cum->words ? 38 : 34);
          else 
              basereg1 = (cum->words ? 23 : 25);
        }
      else 
        {
        /*
         * This is a single-word parameter. If this is either a direct
         * call or the portable runtime and we're dealing with the
         * hardware FPU, place the argument into the correct FARG,
         * otherwise put it into a general register.
         */
        if ((!cum->indirect             ||
             TARGET_PORTABLE_RUNTIME)   &&
             (mode) == SFmode           &&
             !TARGET_SOFT_FLOAT)
            basereg1 = (32 + 2 * cum->words);
        else 
            basereg1 = (27 - cum->words - FUNCTION_ARG_SIZE(mode, type));

        }
      /*
       * Generate the REG rtx for the current parameter.
       */
      reg = gen_rtx_REG (mode, basereg1);
      }
    else
      {
      /*
       * We need to place the argument in both floating args as well
       * as the general args.
       */
      if (FUNCTION_ARG_SIZE (mode, type) > 2)
        {
          /*
           * We're dealing with an argument greater than 2 words.
           * It must be passed in the frame by reference.
           */
          return 0;
        }

      if (FUNCTION_ARG_SIZE (mode, type) > 1)
        {
        basereg1 = (cum->words ? 38 : 34);
        basereg2 = (cum->words ? 23 : 25);
        }
      else
        {
        basereg1 = (32 + 2 * cum->words);
        basereg2 = (27 - cum->words - FUNCTION_ARG_SIZE (mode, type));
        }

      reg = gen_rtx_PARALLEL (mode, 
                gen_rtvec(2, 
                    gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (mode, basereg1),
                                       const0_rtx),
                    gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_REG (mode, basereg2),
                                       const0_rtx)));
      }
    }
    return reg;
}
/DIS/GNU/src/egcs-ss/gcc/config/pa(134): 

--
Mark Klein                                 DIS International, Ltd.
http://www.dis.com                         415-892-8400
PGP Public Key Available			

^ permalink raw reply	[flat|nested] 96+ messages in thread

end of thread, other threads:[~1999-11-30 23:37 UTC | newest]

Thread overview: 96+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-06 10:40 MPE Port Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:32 ` Jeffrey A Law
1999-10-26  6:51   ` Mark Klein
1999-10-26 19:05     ` Jeffrey A Law
1999-10-26 19:21       ` Mark Klein
1999-10-31 23:35         ` Mark Klein
1999-10-31 23:35       ` Jeffrey A Law
1999-10-31 23:35     ` Mark Klein
1999-10-31 23:35   ` Jeffrey A Law
  -- strict thread matches above, loose matches on Subject: below --
1999-09-07  8:42 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-10-25 22:41 ` Jeffrey A Law
1999-10-26  7:03   ` Mark Klein
1999-10-26 19:12     ` Jeffrey A Law
1999-10-26 19:52       ` Mark Klein
1999-10-31 23:35         ` Mark Klein
1999-10-31 23:35       ` Jeffrey A Law
1999-10-31 23:35     ` Mark Klein
1999-10-31 23:35   ` Jeffrey A Law
1999-09-06 10:40 Mark Klein
1999-09-08  1:39 ` Jeffrey A Law
1999-09-08  6:35   ` Mark Klein
1999-09-15  2:52     ` Jeffrey A Law
1999-09-15  8:26       ` Mark Klein
1999-09-30 18:02         ` Mark Klein
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:41 ` Jeffrey A Law
1999-09-08  6:37   ` Mark Klein
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:40 ` Jeffrey A Law
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-07  2:38 ` Jeffrey A Law
1999-09-07  6:39   ` Mark Klein
1999-09-08  0:45     ` Jeffrey A Law
1999-09-08 20:04       ` Mark Klein
1999-09-15  2:47         ` Jeffrey A Law
1999-09-15  8:32           ` Mark Klein
1999-09-30 18:02             ` Mark Klein
1999-09-30 18:02           ` Jeffrey A Law
1999-10-09 20:18           ` Mark Klein
1999-10-14  4:03             ` Jeffrey A Law
1999-10-14  7:20               ` Mark Klein
1999-10-14 10:45                 ` Jeffrey A Law
1999-10-14 11:05                   ` Mark Klein
1999-10-31 23:35                     ` Mark Klein
1999-10-31 23:35                   ` Jeffrey A Law
1999-10-31 23:35                 ` Mark Klein
1999-10-31 23:35               ` Jeffrey A Law
1999-10-31 23:35             ` Mark Klein
1999-11-08 19:34           ` Mark Klein
1999-11-08 19:54             ` Jeffrey A Law
1999-11-09  6:52               ` Mark Klein
1999-11-30 23:37                 ` Mark Klein
1999-11-30 23:37               ` Jeffrey A Law
1999-11-30 23:37             ` Mark Klein
1999-09-30 18:02         ` Mark Klein
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-08  1:49 ` Jeffrey A Law
1999-09-08 20:31   ` Mark Klein
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:40 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-07  3:20 ` Jeffrey A Law
1999-09-07  6:46   ` Mark Klein
1999-09-08  0:43     ` Jeffrey A Law
1999-09-30 18:02       ` Jeffrey A Law
1999-09-30 18:02     ` Mark Klein
1999-09-30 18:02   ` Jeffrey A Law
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-09-06 10:39 Mark Klein
1999-09-30 18:02 ` Mark Klein
1999-08-27 17:20 HARD_REGNO_MODE_OK on PA-RISC (revisited) Mark Klein
1999-08-29  3:19 ` Jeffrey A Law
1999-09-06 10:39   ` MPE Port Mark Klein
1999-09-30 18:02     ` Mark Klein

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).