Paul Edwards wrote: > 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.
Well, even on 32-bit you may get 64-bit integer constants, e.g. via the "long long" data type: long long x = 0x123456789abcdefLL; However, the real question in your case is whether those are represented as CONST_INT. This is only true if HOST_WIDE_INT is a 64-bit type; otherwise, such constants would be represented as a CONST_DOUBLE. Whether or not HOST_WIDE_INT is a 64-bit type now depends on which *host* you're building GCC as a cross-compiler on. If you only ever support 32-bit hosts, then HOST_WIDE_INT will always be a 32-bit type, and the code above should be fine. If you want to support 64-bit hosts as well, however, you will need to handle 64-bit CONST_INT values too. > 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? Yes, exactly. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE ulrich.weig...@de.ibm.com