This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: i370 port

Hi Ulrich.

I'm getting back to this after a long hiatus.

I have reviewed the 'W' code in PRINT_OPERAND:

else if (CODE == 'W')
   /* hand-built sign-extension of signed 32-bit to 64-bit */
   mvs_page_lit += 8;
   if (0 <=  INTVAL (XV)) {
      fprintf (FILE, "=XL8'00000000");
   } else {
      fprintf (FILE, "=XL8'FFFFFFFF");
   fprintf (FILE, "%08X'", INTVAL (XV));

and it looks to me like it is already correct. If movdi is given a
const_int as a parameter, then sign-extending to 64-bit is
exactly what needs to happen, isn't it?

I'm only expecting to compile programs as 32-bit, so I'm not
expecting more than 32-bit integers. The IFOX assembler
won't do more than that. In case that's the issue.

But regardless I don't know how to make this code:

mvs_check_page (0, 6, 8);
return \"MVC^I%O0(8,%R0),%1\";

make use of that 'W' operand.

Do I change that %1 to %W1 perhaps?

I'll give that a try tomorrow.

Thanks. Paul.

-----Original Message----- From: Ulrich Weigand Sent: Monday, August 22, 2011 10:22 PM To: Paul Edwards Cc: Subject: Re: i370 port

Paul Edwards wrote:

  if (operands[1] == const0_rtx)
    mvs_check_page (0, 6, 8);
    return \"MVC    %O0(8,%R0),=XL8'00'\";
  mvs_check_page (0, 6, 8);
  return \"MVC    %O0(8,%R0),%1\";
   [(set_attr "length" "8")]

forces it to use XL8'00' instead of the default F'0' and that
seems to work.  Does that seem like a proper solution to

Well, there isn't really anything special about const0_rtx. *Any* CONST_INT that shows up as second operand to the movdi pattern must be emitted into an 8 byte literal at this point.

You can do that inline; but the more usual way would be to
define an operand print format that encodes the fact that
a 64-bit operand is requested.

In fact, looking at the i370.h PRINT_OPERAND, there already
seems to be such a format: 'W'.  (Maybe not quite; since 'W'
sign-extends a 32-bit operand to 64-bit.  But since 'W'
doesn't seem to be used anyway, maybe this can be changed.)


 Dr. Ulrich Weigand
 GNU Toolchain for Linux on System z and Cell BE

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]