Re: Re: Slightly off-topic: development machine for z/OS wanted

"Joe Monk [email protected] [H390-MVS]" <[email protected]> Sat, 12 Oct 2019 21:48:52 -0400
Newsgroups gmane.comp.emulators.hercules390.mvs
Message-ID <CAPcd4G9L84iHzcXrx0edV5CM5OADOoy9euZtT+LPSREfmZ5uvw@mail.gmail.com>
"Supporting 31-bit does not mean it supports the
assembler output of the s390 flavor of GCC."

From the S390.h file:

#define TARGET_SWITCHES                       \
{ { "hard-float",    1, N_("Use hardware fp")},               \
  { "soft-float",   -1, N_("Don't use hardware fp")},             \
  { "backchain",     2, N_("Set backchain")},                 \
  { "no-backchain", -2, N_("Don't set backchain (faster, but debug
harder")}, \
  { "small-exec",    4, N_("Use bras for execucable < 64k")},           \
  { "no-small-exec",-4, N_("Don't use bras")},                   \
  { "debug",         8, N_("Additional debug prints")},               \
  { "no-debug",     -8, N_("Don't print additional debug prints")},     \
  { "64",           16, N_("64 bit mode")},                       \
  { "31",          -16, N_("31 bit mode")},                             \
  { "mvcle",        32, N_("mvcle use")},                       \
  { "no-mvcle",    -32, N_("mvc&ex")},                                  \
  { "", TARGET_DEFAULT, 0 } }

from the s390.md file:

define_insn "adddi3_64"
  [(set (match_operand:DI 0 "register_operand" "=d,d,d")
        (plus:DI (match_operand:DI 1 "register_operand" "%0,0,0")
                 (match_operand:DI 2 "general_operand" "d,K,m") ) )
   (clobber (reg:CC 33))]
  "TARGET_64BIT"
  "@
   agr\\t%0,%2
   aghi\\t%0,%h2
   ag\\t%0,%2"
  [(set_attr "op_type"  "RRE,RI,RXE")
   (set_attr "atype"    "reg,reg,mem")])

(define_insn "adddi3_31"
  [(set (match_operand:DI 0 "register_operand" "=d,d")
        (plus:DI (match_operand:DI 1 "register_operand" "0,0")
                 (match_operand:DI 2 "general_operand" "d,m") ) )
   (clobber (reg:CC 33))]
  "!TARGET_64BIT"
  "*
{
   switch (which_alternative)
     {
     case 0: /* d <- d */
       output_asm_insn (\"ar\\t%0,%2\", operands);
       output_asm_insn (\"alr\\t%N0,%N2\", operands);
       break;

     case 1: /* d <- m */
       output_asm_insn (\"a\\t%0,%2\", operands);
       output_asm_insn (\"al\\t%N0,%N2\", operands);
       break;

     default:
       abort ();
     }

   output_asm_insn (\"brc\\t12,.+8\", operands);
   return \"ahi\\t%0,1\";
}"
  [(set_attr "op_type" "NN,NN")
   (set_attr "atype"   "reg,mem")
   (set_attr "type"    "o2,o2")
   (set_attr "length"  "12,16")])

Joe

On Sat, Oct 12, 2019 at 8:54 PM kerravon86-/[email protected] [H390-MVS] <
[email protected]> wrote:

>
>
> ---In [email protected], <joemonk64@...> wrote :
>
> >> That uses the i370 port, so can't be used to
> >> assemble s390 output.
>
> > Not according to the source files. They say that
> > the s390 target (31-bit) is supported.
>
> Supporting 31-bit does not mean it supports the
> assembler output of the s390 flavor of GCC.
> The ports of i370 and s390 are separate.
>
> BFN. Paul.
> 
>