--- gcc/config/out-m68k.c 2018/04/24 16:53:28 1.1.1.1 +++ gcc/config/out-m68k.c 2018/04/24 17:00:41 1.1.1.3 @@ -190,10 +190,17 @@ output_move_double (operands) latehalf[1] = const0_rtx; else if (GET_CODE (operands[1]) == CONST_DOUBLE) { +#ifndef HOST_WORDS_BIG_ENDIAN + latehalf[1] = gen_rtx (CONST_INT, VOIDmode, + CONST_DOUBLE_LOW (operands[1])); + operands[1] = gen_rtx (CONST_INT, VOIDmode, + CONST_DOUBLE_HIGH (operands[1])); +#else /* HOST_WORDS_BIG_ENDIAN */ latehalf[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_HIGH (operands[1])); operands[1] = gen_rtx (CONST_INT, VOIDmode, CONST_DOUBLE_LOW (operands[1])); +#endif /* HOST_WORDS_BIG_ENDIAN */ } } else @@ -285,6 +292,18 @@ find_addr_reg (addr) abort (); } +/* Test for -0.0. */ + +int +double_is_minus_zero (arg) + double arg; +{ + union { double d; int i[2];} u; + + u.d = arg; + return (u.i[1] == 0 && u.i[0] == 0x80000000); +} + char * output_move_const_double (operands) rtx *operands; @@ -360,8 +379,14 @@ standard_68881_constant_p (x) { union {double d; int i[2];} u; register double d; + +#ifdef HOST_WORDS_BIG_ENDIAN u.i[0] = CONST_DOUBLE_LOW (x); u.i[1] = CONST_DOUBLE_HIGH (x); +#else + u.i[0] = CONST_DOUBLE_HIGH (x); + u.i[1] = CONST_DOUBLE_LOW (x); +#endif d = u.d; if (d == 0)