--- gcc/config/ns32k.md 2018/04/24 17:51:36 1.1.1.1 +++ gcc/config/ns32k.md 2018/04/24 17:59:48 1.1.1.3 @@ -6,7 +6,7 @@ ;; I.e., one cannot say "cmpd _p,@_x" ;; Implement unsigned multiplication?? -;;- Machine descrption for GNU compiler +;;- Machine description for GNU compiler ;;- ns32000 Version ;; Copyright (C) 1988 Free Software Foundation, Inc. ;; Contributed by Michael Tiemann (tiemann@mcc.com) @@ -242,8 +242,13 @@ return \"movf %1,tos\;movd tos,%0\"; return \"movf %1,%0\"; } -#if 0 -#ifndef GAS_SYNTAX +#if 0 /* Someone suggested this for the Sequent. Is it needed? */ + else if (GET_CODE (operands[1]) == CONST_DOUBLE) + return \"movf %1,%0\"; +#endif +/* There was a #if 0 around this, but that was erroneous + for many machines -- rms. */ +#ifndef MOVD_FLOAT_OK /* GAS understands floating constants in ordinary movd instructions but other assemblers might object. */ else if (GET_CODE (operands[1]) == CONST_DOUBLE) @@ -258,7 +263,6 @@ return \"movd %1,%0\"; } #endif -#endif else return \"movd %1,%0\"; }") @@ -829,10 +833,10 @@ if (which_alternative == 1) { int i = INTVAL (operands[2]); - if ( i < 0x40000000 && i >= -0x40000000 ) - return \"addr %c2(%1),%0\"; + if (NS32K_DISPLACEMENT_P (i)) + return \"addr %c2(%1),%0\"; else - return \"movd %1,%0\;addd %2,%0\"; + return \"movd %1,%0\;addd %2,%0\"; } if (GET_CODE (operands[2]) == CONST_INT) { @@ -1855,6 +1859,18 @@ return \"adjspb %$-4\"; }") +(define_insn "" + [(set (match_operand:SI 0 "general_operand" "=g<") + (zero_extract:SI (match_operand:SI 1 "register_operand" "g") + (match_operand:SI 2 "const_int_operand" "i") + (match_operand:SI 3 "general_operand" "rK")))] + "" + "* +{ if (GET_CODE (operands[3]) == CONST_INT) + return \"extsd %1,%0,%3,%2\"; + else return \"extd %3,%1,%0,%2\"; +}") + (define_insn "extzv" [(set (match_operand:SI 0 "general_operand" "=g<") (zero_extract:SI (match_operand:QI 1 "general_operand" "g") @@ -2179,19 +2195,25 @@ rtx temp = XEXP (operands[0], 0); if (CONSTANT_ADDRESS_P (temp)) { +#ifdef ENCORE_ASM + return \"bsr %?%0\"; +#else +#ifdef CALL_MEMREF_IMPLICIT operands[0] = temp; return \"bsr %0\"; -#if 0 +#else #ifdef GNX_V3 return \"bsr %0\"; #else return \"bsr %?%a0\"; #endif #endif +#endif } if (GET_CODE (XEXP (operands[0], 0)) == REG) +#if defined (GNX_V3) || defined (CALL_MEMREF_IMPLICIT) return \"jsr %0\"; -#if 0 +#else return \"jsr %a0\"; #endif } @@ -2212,19 +2234,25 @@ rtx temp = XEXP (operands[1], 0); if (CONSTANT_ADDRESS_P (temp)) { +#ifdef ENCORE_ASM + return \"bsr %?%1\"; +#else +#ifdef CALL_MEMREF_IMPLICIT operands[1] = temp; return \"bsr %1\"; -#if 0 +#else #ifdef GNX_V3 return \"bsr %1\"; #else return \"bsr %?%a1\"; #endif #endif +#endif } if (GET_CODE (XEXP (operands[1], 0)) == REG) +#if defined (GNX_V3) || defined (CALL_MEMREF_IMPLICIT) return \"jsr %1\"; -#if 0 +#else return \"jsr %a1\"; #endif }