public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: mutazilah@gmail.com (Paul Edwards)
Cc: Ralf.Wildenhues@gmx.de (Ralf Wildenhues),
	        iant@google.com (Ian Lance Taylor),
	gcc@gcc.gnu.org
Subject: Re: i370 port - 3.4.6 to 4.4 upgrade attempt
Date: Tue, 24 Nov 2009 14:05:00 -0000	[thread overview]
Message-ID: <200911241405.nAOE5Jsd022678@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <149A2A5D1FF7444FB177D9AC58A500CB@Paullaptop> from "Paul Edwards" at Nov 23, 2009 09:32:07 PM

Paul Edwards wrote:

> So, given the scope below, can someone please explain what
> 4.4 changes are affecting me and what I need to do to overcome
> them?  Note that I have never had to do the machine changes
> myself - in the past I simply waiting for Dave Pitts to do the
> upgrade to the new version, and then with a working 370 code
> generator I would make all the changes necessary for MVS.

Most of the things seem just minor changes, e.g. "warning" got
another argument, or target macros were replaced by targetm
callbacks.

I can see one significant change: the GCC middle-end now no
longer supports base-16 floating point at all.  The old i370
port was the only user of this feature, and some time after
the port was removed, the middle-end support was removed as
well in order to simplify floating-point handling code.

The s390 port uses IEEE float instead of hex float throughout,
so it is not affected by this change.

> + i370-*-mvspdp)
> +     xm_defines='POSIX'  # 'FATAL_EXIT_CODE=12'
> +     xm_file="i370/xm-mvs.h"
> +     tm_file="i370/mvspdp.h i370/i370.h"
> +     tmake_file="i370/t-mvs i370/t-i370"
> +     c_target_objs="i370-c.o"
> +     cxx_target_objs="i370-c.o"
> +     ;;
> + s390-*-linux*)
> +  tm_file="s390/s390.h dbxelf.h elfos.h svr4.h linux.h s390/linux.h"
> +  tmake_file="${tmake_file} t-dfprules s390/t-crtstuff s390/t-linux"
> +  ;;

The s390 lines should not be added here.

> ! /* +++ c_lex has gone. however, we don't use it for anything important 
> anyway */
> ! #define c_lex(a)

Pragma handlers are now apparently supposed to use "pragma_lex" instead,
which is declared in the c-pragma.h header.  See e.g. config/sol2-c.c
for examples of pragma handlers.

>     /* We're 370 floating point, not IEEE floating point.  */
>     memset (real_format_for_mode, 0, sizeof real_format_for_mode);
> !   REAL_MODE_FORMAT (SFmode) = &i370_single_format;
> !   REAL_MODE_FORMAT (DFmode) = &i370_double_format;

This is a problem, see above.

>     /* We're 370 floating point, not IEEE floating point.  */
>     memset (real_format_for_mode, 0, sizeof real_format_for_mode);
> !   /*REAL_MODE_FORMAT (SFmode) = &i370_single_format;
> !   REAL_MODE_FORMAT (DFmode) = &i370_double_format;*/
> !   /* +++ this is wrong */
> !   REAL_MODE_FORMAT (SFmode) = &ibm_extended_format;
> !   REAL_MODE_FORMAT (DFmode) = &ibm_extended_format;

ibm_extended_format is certainly wrong here; that's the
64 + 64 "long double" format used on PowerPC.

>                 for (note = REG_NOTES (insn); note;  note = XEXP(note,1))
>                   {
> +                    /* +++ what is reg_label? */
> +                    /*
>                      if (REG_LABEL == REG_NOTE_KIND(note))
>                        {

Instead of REG_LABEL notes, the middle-end now generates two different
kinds of notes, REG_LABEL_TARGET and REG_LABEL_OPERAND.

REG_LABEL_TARGET is used in JUMP_INSNs to refer to a potential target
of this jump.  REG_LABEL_OPERAND is used in other insns to denote labels
that are used otherwise, e.g. to load the address into a register.

In the context of this code in i370.c, it would appear you're concerned
about the second type of usage here.  This means the REG_LABEL should
probably simply be replaced by REG_LABEL_OPERAND.

> ***************
> *** 1568,1574 ****
>     fprintf (f, "* Function %.*s prologue: stack = %ld, args = %d\n",
>              nlen, mvs_function_name,
>       l,
> !     current_function_outgoing_args_size);
>   #endif

current_function_outgoing_args_size must be replaced by crtl->outgoing_args_size
throughout.  There was no change in semantics, just where the value is stored.

>     fprintf (f, "* Function %.*s prologue: stack = %ld, args = %d\n",
>              nlen, mvs_function_name,
>       l,
> !     0 /*cfun->machine->frame_size*/);
>   #endif

The cfun->machine->frame_size stuff does not seem correct here; use
crtl->outgoing_args_size.

> + #if 0
> + This unused (in mvspdp) stuff is now poisoned
>   /* Macro to define tables used to set the flags.  This is a list in braces
>      of pairs in braces, each pair being { "NAME", VALUE }
>      where VALUE is the bits to set or minus the bits to clear.
> ***************
> *** 99,104 ****
> --- 101,107 ----
>     { "pickax", 2, "Experimental i370 PIC"}, \
>     { "no-pickax", -2, "Disable experimental i370 PIC"}, \
>     { "", TARGET_DEFAULT, 0} }
> + #endif

Command line options are now defined in a .opt file.  If you want to
keep those extra options, you should provide a config/i370/i370.opt
file.  See any of the other targets for examples.

> + #if 0 /* +++ now poisoned */
>   #define PREDICATE_CODES \
>     {"r_or_s_operand", { REG, SUBREG, MEM }}, \
>     {"s_operand", { MEM }},
> + #endif

Predicates must now be defined in a predicates.md file.  Again, see
other targets for examples.

> ! #if 0 /*def TARGET_PDPMAC*/
> ! +++ this variable is now poisoned - check structs still get returned
> ! properly
>   #define STRUCT_VALUE_REGNUM 0
> ! #elif 0 /*used to be else*/
>   #define STRUCT_VALUE_REGNUM 1
>   #endif

If something except the default is needed here, you now have to use the
TARGET_STRUCT_VALUE_RTX targetm callback.

>   /* For an arg passed partly in registers and partly in memory, this is the
>      number of registers used.  For args passed entirely in registers or
>      entirely in memory, zero.  */
> ! /* +++ now poisoned */
> ! #if 0
>   #define FUNCTION_ARG_PARTIAL_NREGS(CUM, MODE, TYPE, NAMED) 0
> + #endif

If something except the default is needed here, you now have to use the
TARGET_ARG_PARTIAL_BYTES targetm callback.

>   /* This macro definition sets up a default value for `main' to return.  */
> ! /* +++ now poisoned */
> ! #if 0
>   #define DEFAULT_MAIN_RETURN  c_expand_return (integer_zero_node)
> ! #endif

This is no longer supported.  C99 allows omitting the main return value
by default; in C89 this is not possible any longer.

>   /* When a prototype says `char' or `short', really pass an `int'.  */
> ! /* +++ now poisoned */
> ! #if 0
>   #define PROMOTE_PROTOTYPES 1
> + #endif

If something except the default is needed here, you now have to use the
TARGET_PROMOTE_PROTOTYPES targetm callback.

> - #ifdef TARGET_EBCDIC
> - #define TARGET_ESC 39
> - #define TARGET_BELL 47
> - #define TARGET_BS 22
> - #define TARGET_TAB 5
> - #define TARGET_NEWLINE 21
> - #define TARGET_VT 11
> - #define TARGET_FF 12
> - #define TARGET_CR 13
> - #endif

These are no longer needed now that the parser is charset-aware.

>   #define TEXT_SECTION_ASM_OP "* Program text area"
>   #define DATA_SECTION_ASM_OP "* Program data area"
>   #define INIT_SECTION_ASM_OP "* Program initialization area"
> + /* +++ now poisoned */
> + #if 0
>   #define SHARED_SECTION_ASM_OP "* Program shared data"
> + #endif

This is no longer needed; it was used to support -fshared-data
which is no longer present.


Note that I'd expect that with the above obvious issues fixed,
you may well run into additional problems in moving the port
forward ...  At some point, it will be necessary to be able
to debug the back-end and resolve problems.

Overall, I still think that adding HLASM support to the s390
back-end would probably be a simpler task ...

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  parent reply	other threads:[~2009-11-24 14:05 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-09 22:33 i370 port Paul Edwards
2009-09-14 15:42 ` Ulrich Weigand
2009-09-15 12:59   ` Paul Edwards
2009-09-15 13:51     ` Ulrich Weigand
2009-09-17 13:00       ` Paul Edwards
2009-09-17 17:55         ` Ulrich Weigand
2009-09-18  0:35           ` Paul Edwards
2009-09-18 12:06             ` Ulrich Weigand
2009-09-18 12:23               ` Paul Edwards
2009-09-18 13:27                 ` Ulrich Weigand
2009-09-18 13:42                   ` Paul Edwards
2009-09-18 16:08                     ` Ulrich Weigand
2009-09-19 12:57                       ` Paul Edwards
2009-09-25 10:19                       ` Paul Edwards
2009-09-25 15:20                         ` Ulrich Weigand
2009-09-30 17:24                           ` i370 port - constructing compile script Paul Edwards
2009-09-30 17:36                             ` Richard Henderson
2009-09-30 21:40                               ` Paul Edwards
     [not found]                                 ` <mcrpr98x9w8.fsf@dhcp-172-17-9-151.mtv.corp.google.com>
2009-10-01  0:16                                   ` Joseph S. Myers
2009-10-01 14:00                                     ` Paul Edwards
2009-10-02 12:41                                     ` Paul Edwards
2009-10-02 16:00                                       ` Ian Lance Taylor
2009-10-02 22:53                                         ` Paul Edwards
2009-10-04  4:11                                           ` Ian Lance Taylor
2009-10-04  5:14                                             ` Paul Edwards
2009-10-04  6:04                                               ` Ian Lance Taylor
2009-10-04  6:50                                                 ` Paul Edwards
2009-10-04 15:38                                                   ` Ulrich Weigand
2009-10-04 22:51                                                     ` Paul Edwards
2009-10-05 13:15                                                       ` Ulrich Weigand
2009-10-06  9:32                                                         ` Paul Edwards
2009-10-06 13:15                                                           ` Ulrich Weigand
2009-10-06 13:38                                                             ` Paul Edwards
2009-10-06 14:01                                                               ` Ulrich Weigand
2009-10-14 14:33                                                                 ` Paul Edwards
2009-10-19 14:19                                                         ` Paul Edwards
2009-10-19 17:37                                                           ` Ulrich Weigand
2009-10-20 14:18                                                             ` Paul Edwards
2009-10-20 15:30                                                               ` Ulrich Weigand
2009-11-12 14:03                                                             ` Paul Edwards
2009-11-12 20:06                                                               ` Ralf Wildenhues
2009-11-12 20:56                                                                 ` Paul Edwards
2009-11-13 11:43                                                                 ` Paul Edwards
2009-11-13 12:01                                                                   ` Ulrich Weigand
2009-11-13 12:18                                                                     ` Paul Edwards
2009-11-13 12:57                                                                       ` Ulrich Weigand
2009-11-14  8:52                                                                         ` Paul Edwards
2009-11-14 10:49                                                                           ` Ralf Wildenhues
2009-11-14 11:28                                                                             ` Paul Edwards
2009-11-22  0:51                                                                               ` Paolo Bonzini
2009-11-18 10:51                                                                             ` Paul Edwards
2009-11-19 14:27                                                                               ` Ulrich Weigand
2009-11-21 13:40                                                                                 ` Paul Edwards
2009-11-23 10:33                                                                                 ` i370 port - 3.4.6 to 4.4 upgrade attempt Paul Edwards
2009-11-23 10:43                                                                                   ` Andreas Schwab
2009-11-23 15:43                                                                                   ` Paolo Bonzini
2009-11-24 14:05                                                                                   ` Ulrich Weigand [this message]
2009-11-24 14:36                                                                                     ` Paul Edwards
2009-11-28 15:14                                                                                     ` i370 port - music/sp - possible generic gcc problem Paul Edwards
2009-11-28 16:03                                                                                       ` Richard Guenther
2009-11-28 16:35                                                                                         ` Paul Edwards
2009-11-28 17:03                                                                                           ` Richard Guenther
2009-11-28 23:44                                                                                             ` Paul Edwards
2010-05-26 14:40                                                                                         ` i370 port - status Paul Edwards
2021-03-14  5:55                                                                                         ` negative indexes Paul Edwards
2021-03-14  8:05                                                                                           ` Richard Biener
2021-03-14  8:12                                                                                             ` Paul Edwards
2021-03-14 13:37                                                                                               ` Richard Biener
     [not found]                                                                                                 ` <755065BE2A0B4B508DD3A262B2A83801@DESKTOP0OKG1VA>
2021-03-15  9:22                                                                                                   ` Richard Biener
2021-03-15 13:55                                                                                                     ` extended segments on 80386 Paul Edwards
2009-12-07 12:05                                                                                     ` i370 port - 3.4.6 to 4.4 upgrade attempt Paul Edwards
2009-12-08 13:55                                                                                       ` Ulrich Weigand
2009-11-15 14:22                                                                         ` i370 port - finally building Paul Edwards
2009-11-22  0:46                                                                   ` i370 port - constructing compile script Paolo Bonzini
2009-11-13 12:08                                                               ` Ulrich Weigand
2009-10-05 13:17                                                   ` Michael Matz
2009-10-05 13:38                                                     ` Paul Edwards
2009-10-05 13:46                                                       ` Michael Matz
2009-10-01 14:28                             ` Paul Brook
2009-10-01 16:00                               ` Paul Edwards
2009-10-01 18:36                                 ` Ian Lance Taylor
2009-10-01 23:43                                   ` Paul Edwards
2009-10-01 21:10                                 ` David Edelsohn
2009-10-01 22:22                                   ` Toon Moene
2009-10-02  0:19                                     ` Paul Edwards
2009-11-04  5:21                       ` i370 port Paul Edwards
2009-11-04 16:47                         ` Ulrich Weigand
2009-11-09 14:55                           ` Paul Edwards
2009-11-09 15:57                             ` Ian Lance Taylor
2009-11-09 23:10                               ` Paul Edwards
2009-11-10 14:58                               ` Paul Edwards
2009-11-10 15:36                                 ` Ian Lance Taylor
2009-11-10 15:51                               ` Paul Edwards
2009-11-10 15:56                                 ` Ian Lance Taylor
2009-12-02 22:03                                   ` Paul Edwards
2011-08-13  8:34                           ` Paul Edwards
2011-08-15 14:32                             ` Ulrich Weigand
2011-08-15 15:26                               ` Paul Edwards
2011-08-15 17:23                                 ` Ulrich Weigand
2011-08-16 11:20                                   ` Paul Edwards
2011-08-16 13:26                                     ` Ulrich Weigand
2011-08-18 12:15                                       ` Paul Edwards
2011-08-18 13:14                                         ` Ulrich Weigand
2011-08-18 14:18                                           ` Paul Edwards

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=200911241405.nAOE5Jsd022678@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=gcc@gcc.gnu.org \
    --cc=iant@google.com \
    --cc=mutazilah@gmail.com \
    /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: link
Be 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).