On Wed, Apr 16, 2025 at 02:17:37PM +0200, Richard Biener wrote: > On Tue, Apr 15, 2025 at 4:33 PM Jeff Law <jeffreya...@gmail.com> wrote: > > > > > > > > On 4/15/25 7:57 AM, Andreas Schwab wrote: > > > * configure.tgt: Set LIBGCOBOL_SUPPORTED for riscv64-*-linux* with > > > 64-bit multilib. > > Can't say I'm happy with the amount of Cobol related churn at this phase > > in our cycle. But this should be exceedingly safe. So OK. > > For the record it now builds fine on s390x-linux (big endian) as well, but > test results are not that good. At least _some_ tests pass ... > > Native configuration is s390x-ibm-linux-gnu > > === cobol tests === > > > Running target unix > FAIL: cobol.dg/literal1.cob -O0 execution test > FAIL: cobol.dg/literal1.cob -O1 execution test > [... many FAILs stripped ...] > FAIL: cobol.dg/group2/floating-point_literals.cob -O3 -g output file test > FAIL: cobol.dg/group2/floating-point_literals.cob -Os output file test > > === cobol Summary === > > # of expected passes 2757 > # of unexpected failures 342 > # of expected failures 48 > # of unresolved testcases 54
E.g. uint128 temp = (uint128)product.i64[i] * multiplier; product.i64[i] = *(uint64_t *)(&temp); overflows[i+1] = *(uint64_t *)((uint8_t *)(&temp) + 8); (I think one of my pending patches fixed this but can submit it independently) is at least one of the obvious spots where it works solely for little endian. This one particular can be obviously done as uint128 temp = (uint128)product.i64[i] * multiplier; product.i64[i] = temp; overflows[i+1] = temp >> 64; But guess it is pretty much everything that works on the int256s: typedef struct int256 { union { unsigned char data[32]; uint64_t i64 [4]; uint128 i128[2]; }; }int256; whether loops on it iterate with increasing or decreasing index depends on the endianity, which bit is sign bit as well, ... Jakub