Commit Graph

232 Commits

Author SHA1 Message Date
Stephen Clarke 2ad65b0e91 sh.c (sh_adjust_cost): Special handling of SHMEDIA code.
Tue Jul  9 22:37:44 2002  Stephen Clarke <stephen.clarke@superh.com>
                          J"orn Rennecke <joern.rennecke@superh.com>

	* sh.c (sh_adjust_cost): Special handling of SHMEDIA code.
	* sh.md (attribute issues): Replace with:
	(attribute pipe_model).  All users changed.
	(attribute type): Change pt / ptabs to pt_media / ptabs_media.
	All users changed.
	(function units sh5issue, sh5fds): New.
	(attribute is_mac_media): New.
	(adddi3_media, subdi3_media, divsi3_i1_media, anddi3): Add type.
	(andcdi3, iordi3, xordi3, ashldi3_media, lshrdi3_media): Likewise.
	(ashrdi3_media, negdi_media, extendsidi2, movqi_media): Likewise.
	(movhi_media, shori_media, movv2sf_i, jump_media): Likewise.
	(call_media, call_value_media, sibcall_media): Likewise.
	(casesi_jump_media, casesi_shift_media, casesi_load_media): Likewise.
	(return_media_i, addsf3_media, subsf3_media, mulsf3_media): Likewise.
	(mac_media, divsf3_media, floatdisf2, floatsisf2_media): Likewise.
	(fix_truncsfdi2, fix_truncsfsi2_media, cmpeqsf_media): Likewise.
	(cmpgtsf_media, cmpgesf_media, cmpunsf_media, negsf2_media): Likewise.
	(sqrtsf2_media, abssf2_media, adddf3_media, subdf3_media): Likewise.
	(muldf3_media, divdf3_media, floatdidf2, floatsidf2_media): Likewise.
	(fix_truncdfdi2, fix_truncdfsi2_media, cmpeqdf_media): Likewise.
	(cmpgtdf_media, cmpgedf_media,cmpundf_media, negdf2_media): Likewise.
	(sqrtdf2_media, absdf2_media, extendsfdf2_media): Likewise.
	(truncdfsf2_media): Likewise.
	(movsi_media, movsi_media_nofpu, movdi_media): Use new types.
	(movdi_media_nofpui, movdf_media, movdf_media_nofpu): Likewise.

Co-Authored-By: J"orn Rennecke <joern.rennecke@superh.com>

From-SVN: r55346
2002-07-09 23:04:34 +01:00
J"orn Rennecke b6d3398326 sh.h (PREDICATE_CODES): Add general_extend_operand and inqhi_operand.
* sh.h (PREDICATE_CODES): Add general_extend_operand and inqhi_operand.
	* sh.c (general_extend_operand, inqhi_operand): New functions.
	* sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media): Collapse
	alternatives using 'N' modifier.  Add type.
	(adddi3z_media): Likewise.  Enable generator function generation.
	(movdicc_false, movdicc_true, addsi3_media, subsi3_media): Use more
	exact predicates / constraints.  Add type.
	(subsi3): Allow 0 for SHMEDIA.
	(udivsi3_i4_media): Use match_operand for input values
	rather than hard registers.
	(udivsi3 - TARGET_SHMEDIA_FPU case): Don't ferry values
	unnecessarily through hard registers.  Keep copies of pseudo
	registers outside of the libcall sequence.
	(mulsidi3_media, umulsidi3_media): Use more exact predicates.  Add type.
	(ashlsi3_media, ashrsi3_media, lshrsi3_media): Likewise.
	(zero_extendsidi2, zero_extendhidi2, zero_extendqidi2): Likewise.
	(extendhidi2, extendqidi2): Likewise.
	(andsi3_compact): Name.
	(andcdi3): Enable generator function generation.
	(zero_extendhisi2, zero_extendqisi2): Rename to
	(zero_extendhisi2_compact, zero_extendqisi2_compact).
	(extendhisi2, extendqisi2): Rename to
	(extendhisi2_compact, extendqisi2_compact).
	(rotldi3, rotldi3_mextr, rotrdi3, rotrdi3_mextr): New patterns.
	(loaddi_trunc, zero_extendhisi2, zero_extendhisi2_media): Likewise.
	(zero_extendhisi2_media+1, zero_extendqisi2): Likewise.
	(zero_extendqisi2_media, extendhisi2, extendhisi2_media): Likewise.
	(extendhisi2_media, extendhisi2_media+1, extendqisi2): Likewise.
	(extendqisi2_media, extendqisi2_media+1, truncdisi2): Likewise.
	(truncdihi2, truncdiqi2, reload_inqi, reload_inhi): Likewise.
	(shmedia32_initialize_trampoline_big): Likewise.
	(shmedia32_initialize_trampoline_little): Likewise.
	(nsb, nsbsi, nsbdi, ffsdi2, ffssi2, byterev): Likewise.
	(negdi2): Remove spurious T clobber.
	(zero_extendhidi2+1, extendhidi2+1, extendqidi2+1): Handle TRUNCATE.
	(movsi_media, movsi_media_nofpu): Remove spurious *k after b.
	(movdi_media, movdi_media_nofpu, pt, ptb): Likewise.
	(movsi_media_nofpu+2, movhi_media+1): Only do split after reload.
	(ic_invalidate_line_media): Write back data cache before invalidating
	instruction cache.  Add type.
	(movsf_media): Sign-extend when the destination is a general
	purpose register.  Add type.
	(bgt_media, bge_media, bgtu_media, bgeu_media, blt_media_i): Allow 0.
	(casesi_worker_0+1): Only increment ref count for proper label.
	(casesi_worker_0+2): Likewise.

From-SVN: r55345
2002-07-09 22:30:32 +01:00
J"orn Rennecke c8cc4417e4 sh.h (PRINT_OPERAND_PUNCT_VALID_P): Allow '\''.
* sh.h (PRINT_OPERAND_PUNCT_VALID_P): Allow '\''.
	(PREDICATE_CODES): Add entries for equality_comparison_operator,
	greater_comparison_operator and less_comparison_operator.
	* sh.c (print_operand): Add '\'' code.  Make 'o' handle
	more operators.
	(equality_comparison_operator): New function.
	(greater_comparison_operator, less_comparison_operator): Likewise.
	* sh.md (beq_media_i): Disable generator function generation.
	Use match_operator to handle a whole class of comparisons.  Add
	modifier in output template to provide branch prediction.  Add type.
	(bgt_media_i, ble_media_i): Likewise.  Allow zero operands.
	(bne_media_i, bge_media_i, bgtu_media_i, bgeu_media_i): Delete.
	(blt_media_i, bleu_media_i, bltu_media_i): Likewise.
	(bgt, blt, ble, bge, bgtu, bltu, bgeu, bleu): Allow zero operands.

From-SVN: r55305
2002-07-07 20:56:31 +01:00
J"orn Rennecke 52702ae16e sh.c (print_operand, case 'N'): Allow zero vector.
Tue Jul  2 18:45:45 2002  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.c (print_operand, case 'N'): Allow zero vector.
	(arith_reg_or_0_operand): Likewise.
	(zero_vec_operand): Check for CONST_VECTOR, not PARALLEL.
	* sh.h (CONST_COSTS): 0 has 0 cost.  Check OUTER_CODE for
	IOR, XOR, PLUS and SET and take their respective constant
	ranges into account.
	(PREDICATE_CODES, arith_reg_or_0_operand): Can be CONST_VECTOR.
	* sh.md (subdi3, subdi3_media): Allow zero operand.
	(movv8qi_i+3): Only vector that is not split is the zero vector.
	Fix operand 3 to simplify_subreg.
	(movv2si_i): Split alternative 1.
	(mshfhi_l_di_rev+1): New splitter.

Index: config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.155
diff -p -r1.155 sh.c
*** config/sh/sh.c	2 Jul 2002 04:01:04 -0000	1.155
--- config/sh/sh.c	2 Jul 2002 17:45:37 -0000
*************** print_operand (stream, x, code)
*** 434,440 ****
        break;

      case 'N':
!       if (x == const0_rtx)
  	{
  	  fprintf ((stream), "r63");
  	  break;
--- 434,441 ----
        break;

      case 'N':
!       if (x == const0_rtx
! 	  || (GET_CODE (x) == CONST_VECTOR && zero_vec_operand (x, VOIDmode)))
  	{
  	  fprintf ((stream), "r63");
  	  break;
*************** arith_reg_or_0_operand (op, mode)
*** 5940,5946 ****
    if (arith_reg_operand (op, mode))
      return 1;

!   if (GET_CODE (op) == CONST_INT && CONST_OK_FOR_N (INTVAL (op)))
      return 1;

    return 0;
--- 5941,5947 ----
    if (arith_reg_operand (op, mode))
      return 1;

!   if (EXTRA_CONSTRAINT_U (op))
      return 1;

    return 0;
*************** zero_vec_operand (v, mode)
*** 6222,6228 ****
  {
    int i;

!   if (GET_CODE (v) != PARALLEL
        || (GET_MODE (v) != mode && mode != VOIDmode))
      return 0;
    for (i = XVECLEN (v, 0) - 1; i >= 0; i--)
--- 6223,6229 ----
  {
    int i;

!   if (GET_CODE (v) != CONST_VECTOR
        || (GET_MODE (v) != mode && mode != VOIDmode))
      return 0;
    for (i = XVECLEN (v, 0) - 1; i >= 0; i--)
Index: config/sh/sh.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.h,v
retrieving revision 1.154
diff -p -r1.154 sh.h
*** config/sh/sh.h	1 Jul 2002 19:41:53 -0000	1.154
--- config/sh/sh.h	2 Jul 2002 17:45:37 -0000
*************** while (0)
*** 2689,2698 ****
    case CONST_INT:				\
      if (TARGET_SHMEDIA)				\
        {						\
  	if ((OUTER_CODE) == AND && and_operand ((RTX), DImode)) \
  	  return 0;				\
  	if (CONST_OK_FOR_J (INTVAL (RTX)))	\
!           return COSTS_N_INSNS (1);		\
  	else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \
  	  return COSTS_N_INSNS (2);		\
  	else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \
--- 2689,2704 ----
    case CONST_INT:				\
      if (TARGET_SHMEDIA)				\
        {						\
+ 	if (INTVAL (RTX) == 0)			\
+ 	  return 0;				\
  	if ((OUTER_CODE) == AND && and_operand ((RTX), DImode)) \
  	  return 0;				\
+ 	if (((OUTER_CODE) == IOR || (OUTER_CODE) == XOR \
+ 	     || (OUTER_CODE) == PLUS) \
+ 	    && CONST_OK_FOR_P (INTVAL (RTX)))	\
+ 	  return 0;				\
  	if (CONST_OK_FOR_J (INTVAL (RTX)))	\
!           return COSTS_N_INSNS ((OUTER_CODE) != SET);		\
  	else if (CONST_OK_FOR_J (INTVAL (RTX) >> 16)) \
  	  return COSTS_N_INSNS (2);		\
  	else if (CONST_OK_FOR_J ((INTVAL (RTX) >> 16) >> 16)) \
*************** extern int rtx_equal_function_value_matt
*** 3225,3231 ****
    {"arith_operand", {SUBREG, REG, CONST_INT}},				\
    {"arith_reg_dest", {SUBREG, REG}},					\
    {"arith_reg_operand", {SUBREG, REG}},					\
!   {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT}},			\
    {"binary_float_operator", {PLUS, MULT}},				\
    {"commutative_float_operator", {PLUS, MULT}},				\
    {"extend_reg_operand", {SUBREG, REG, TRUNCATE}},			\
--- 3231,3237 ----
    {"arith_operand", {SUBREG, REG, CONST_INT}},				\
    {"arith_reg_dest", {SUBREG, REG}},					\
    {"arith_reg_operand", {SUBREG, REG}},					\
!   {"arith_reg_or_0_operand", {SUBREG, REG, CONST_INT, CONST_VECTOR}},	\
    {"binary_float_operator", {PLUS, MULT}},				\
    {"commutative_float_operator", {PLUS, MULT}},				\
    {"extend_reg_operand", {SUBREG, REG, TRUNCATE}},			\
Index: config/sh/sh.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.md,v
retrieving revision 1.107
diff -p -r1.107 sh.md
*** config/sh/sh.md	1 Jul 2002 19:41:54 -0000	1.107
--- config/sh/sh.md	2 Jul 2002 17:45:38 -0000
***************
*** 546,552 ****
  ;; There is no way to model this with gcc's function units.  This problem is
  ;; actually mentioned in md.texi.  Tackling this problem requires first that
  ;; it is possible to speak about the target in an open discussion.
! ;;
  ;; However, simple double-precision operations always conflict.

  (define_function_unit "fp"    1 0
--- 546,552 ----
  ;; There is no way to model this with gcc's function units.  This problem is
  ;; actually mentioned in md.texi.  Tackling this problem requires first that
  ;; it is possible to speak about the target in an open discussion.
! ;;
  ;; However, simple double-precision operations always conflict.

  (define_function_unit "fp"    1 0
***************
*** 1048,1054 ****
    "@
  	addz.l	%1, %2, %0
  	addz.l	%1, r63, %0")
!
  (define_insn "adddi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(plus:DI (match_operand:DI 1 "arith_reg_operand" "%0")
--- 1048,1054 ----
    "@
  	addz.l	%1, %2, %0
  	addz.l	%1, r63, %0")
!
  (define_insn "adddi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(plus:DI (match_operand:DI 1 "arith_reg_operand" "%0")
***************
*** 1122,1128 ****
    "@
  	add.l	%1, %2, %0
  	addi.l	%1, %2, %0")
!
  (define_insn "*addsi3_compact"
    [(set (match_operand:SI 0 "arith_reg_operand" "=r")
  	(plus:SI (match_operand:SI 1 "arith_operand" "%0")
--- 1122,1128 ----
    "@
  	add.l	%1, %2, %0
  	addi.l	%1, %2, %0")
!
  (define_insn "*addsi3_compact"
    [(set (match_operand:SI 0 "arith_reg_operand" "=r")
  	(plus:SI (match_operand:SI 1 "arith_operand" "%0")
***************
*** 1138,1162 ****

  (define_expand "subdi3"
    [(set (match_operand:DI 0 "arith_reg_operand" "")
! 	(minus:DI (match_operand:DI 1 "arith_reg_operand" "")
  		  (match_operand:DI 2 "arith_reg_operand" "")))]
    ""
    "
  {
    if (TARGET_SH1)
      {
        emit_insn (gen_subdi3_compact (operands[0], operands[1], operands[2]));
        DONE;
      }
  }")
!
  (define_insn "*subdi3_media"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
! 	(minus:DI (match_operand:DI 1 "arith_reg_operand" "r")
  		  (match_operand:DI 2 "arith_reg_operand" "r")))]
    "TARGET_SHMEDIA"
!   "sub	%1, %2, %0")
!
  (define_insn "subdi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(minus:DI (match_operand:DI 1 "arith_reg_operand" "0")
--- 1138,1163 ----

  (define_expand "subdi3"
    [(set (match_operand:DI 0 "arith_reg_operand" "")
! 	(minus:DI (match_operand:DI 1 "arith_reg_or_0_operand" "")
  		  (match_operand:DI 2 "arith_reg_operand" "")))]
    ""
    "
  {
    if (TARGET_SH1)
      {
+       operands[1] = force_reg (DImode, operands[1]);
        emit_insn (gen_subdi3_compact (operands[0], operands[1], operands[2]));
        DONE;
      }
  }")
!
  (define_insn "*subdi3_media"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
! 	(minus:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rN")
  		  (match_operand:DI 2 "arith_reg_operand" "r")))]
    "TARGET_SHMEDIA"
!   "sub	%N1, %2, %0")
!
  (define_insn "subdi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(minus:DI (match_operand:DI 1 "arith_reg_operand" "0")
***************
*** 1558,1564 ****
  					   : \"__sdivsi3\")));

        if (TARGET_SHMEDIA)
! 	last = gen_divsi3_i1_media (operands[0],
  				    Pmode == DImode
  				    ? operands[3]
  				    : gen_rtx_SUBREG (DImode, operands[3],
--- 1559,1565 ----
  					   : \"__sdivsi3\")));

        if (TARGET_SHMEDIA)
! 	last = gen_divsi3_i1_media (operands[0],
  				    Pmode == DImode
  				    ? operands[3]
  				    : gen_rtx_SUBREG (DImode, operands[3],
***************
*** 1771,1777 ****
  		 (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))]
    "TARGET_SHMEDIA"
    "muls.l	%1, %2, %0")
!
  (define_insn "mulsidi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(mult:DI
--- 1772,1778 ----
  		 (sign_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))]
    "TARGET_SHMEDIA"
    "muls.l	%1, %2, %0")
!
  (define_insn "mulsidi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(mult:DI
***************
*** 1841,1847 ****
  		 (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))]
    "TARGET_SHMEDIA"
    "mulu.l	%1, %2, %0")
!
  (define_insn "umulsidi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(mult:DI
--- 1842,1848 ----
  		 (zero_extend:DI (match_operand:SI 2 "arith_reg_operand" "r"))))]
    "TARGET_SHMEDIA"
    "mulu.l	%1, %2, %0")
!
  (define_insn "umulsidi3_compact"
    [(set (match_operand:DI 0 "arith_reg_operand" "=r")
  	(mult:DI
***************
*** 3440,3446 ****
     (set_attr "type" "pcload,move,load,store,move,pcload,move,move")])

  ;; If the output is a register and the input is memory or a register, we have
! ;; to be careful and see which word needs to be loaded first.

  (define_split
    [(set (match_operand:DI 0 "general_movdst_operand" "")
--- 3441,3447 ----
     (set_attr "type" "pcload,move,load,store,move,pcload,move,move")])

  ;; If the output is a register and the input is memory or a register, we have
! ;; to be careful and see which word needs to be loaded first.

  (define_split
    [(set (match_operand:DI 0 "general_movdst_operand" "")
***************
*** 4195,4201 ****
  }")

  ;; If the output is a register and the input is memory or a register, we have
! ;; to be careful and see which word needs to be loaded first.

  (define_split
    [(set (match_operand:DF 0 "general_movdst_operand" "")
--- 4196,4202 ----
  }")

  ;; If the output is a register and the input is memory or a register, we have
! ;; to be careful and see which word needs to be loaded first.

  (define_split
    [(set (match_operand:DF 0 "general_movdst_operand" "")
***************
*** 4392,4398 ****
    DONE;
  }"
    [(set_attr "length" "8")])
!
  (define_expand "movv4sf"
    [(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m")
  	(match_operand:V4SF 1 "nonimmediate_operand" "f,m,f"))]
--- 4393,4399 ----
    DONE;
  }"
    [(set_attr "length" "8")])
!
  (define_expand "movv4sf"
    [(set (match_operand:V4SF 0 "nonimmediate_operand" "=f,f,m")
  	(match_operand:V4SF 1 "nonimmediate_operand" "f,m,f"))]
***************
*** 4444,4450 ****
    DONE;
  }"
    [(set_attr "length" "32")])
!
  (define_expand "movv16sf"
    [(set (match_operand:V16SF 0 "nonimmediate_operand" "=f,f,m")
  	(match_operand:V16SF 1 "nonimmediate_operand" "f,m,f"))]
--- 4445,4451 ----
    DONE;
  }"
    [(set_attr "length" "32")])
!
  (define_expand "movv16sf"
    [(set (match_operand:V16SF 0 "nonimmediate_operand" "=f,f,m")
  	(match_operand:V16SF 1 "nonimmediate_operand" "f,m,f"))]
***************
*** 4499,4505 ****
    REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]);
    REAL_VALUE_TO_TARGET_SINGLE (value, values);
    operands[2] = GEN_INT (values);
!
    operands[3] = gen_rtx_REG (DImode, true_regnum (operands[0]));
  }")

--- 4500,4506 ----
    REAL_VALUE_FROM_CONST_DOUBLE (value, operands[1]);
    REAL_VALUE_TO_TARGET_SINGLE (value, values);
    operands[2] = GEN_INT (values);
!
    operands[3] = gen_rtx_REG (DImode, true_regnum (operands[0]));
  }")

***************
*** 5410,5416 ****
  	  if (! SYMBOL_REF_FLAG (operands[0]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      emit_insn (gen_symGOTPLT2reg (reg, operands[0]));
  	      operands[0] = reg;
  	    }
--- 5411,5417 ----
  	  if (! SYMBOL_REF_FLAG (operands[0]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      emit_insn (gen_symGOTPLT2reg (reg, operands[0]));
  	      operands[0] = reg;
  	    }
***************
*** 5634,5640 ****
  	  if (! SYMBOL_REF_FLAG (operands[1]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      emit_insn (gen_symGOTPLT2reg (reg, operands[1]));
  	      operands[1] = reg;
  	    }
--- 5635,5641 ----
  	  if (! SYMBOL_REF_FLAG (operands[1]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      emit_insn (gen_symGOTPLT2reg (reg, operands[1]));
  	      operands[1] = reg;
  	    }
***************
*** 5841,5847 ****
  	  if (! SYMBOL_REF_FLAG (operands[0]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      /* We must not use GOTPLT for sibcalls, because PIC_REG
  		 must be restored before the PLT code gets to run.  */
  	      emit_insn (gen_symGOT2reg (reg, operands[0]));
--- 5842,5848 ----
  	  if (! SYMBOL_REF_FLAG (operands[0]))
  	    {
  	      rtx reg = gen_reg_rtx (Pmode);
!
  	      /* We must not use GOTPLT for sibcalls, because PIC_REG
  		 must be restored before the PLT code gets to run.  */
  	      emit_insn (gen_symGOT2reg (reg, operands[0]));
***************
*** 6167,6173 ****
     (use (label_ref (match_operand 1 "" "")))]
    "TARGET_SHMEDIA"
    "blink	%0, r63")
!
  ;; Call subroutine returning any type.
  ;; ??? This probably doesn't work.

--- 6168,6174 ----
     (use (label_ref (match_operand 1 "" "")))]
    "TARGET_SHMEDIA"
    "blink	%0, r63")
!
  ;; Call subroutine returning any type.
  ;; ??? This probably doesn't work.

***************
*** 6284,6290 ****
  	tr = gen_rtx_SUBREG (GET_MODE (operands[0]), tr, 0);

        insn = emit_move_insn (operands[0], tr);
!
        REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, equiv,
  					    REG_NOTES (insn));

--- 6285,6291 ----
  	tr = gen_rtx_SUBREG (GET_MODE (operands[0]), tr, 0);

        insn = emit_move_insn (operands[0], tr);
!
        REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, equiv,
  					    REG_NOTES (insn));

***************
*** 6370,6379 ****
    if (TARGET_SHMEDIA)
      {
        rtx reg = operands[2];
!
        if (GET_MODE (reg) != DImode)
  	reg = gen_rtx_SUBREG (DImode, reg, 0);
!
        if (flag_pic > 1)
  	emit_insn (gen_movdi_const_32bit (reg, operands[1]));
        else
--- 6371,6380 ----
    if (TARGET_SHMEDIA)
      {
        rtx reg = operands[2];
!
        if (GET_MODE (reg) != DImode)
  	reg = gen_rtx_SUBREG (DImode, reg, 0);
!
        if (flag_pic > 1)
  	emit_insn (gen_movdi_const_32bit (reg, operands[1]));
        else
***************
*** 6391,6397 ****
    REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, XVECEXP (XEXP (operands[1],
  								  0), 0, 0),
  					REG_NOTES (insn));
!
    DONE;
  }")

--- 6392,6398 ----
    REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EQUAL, XVECEXP (XEXP (operands[1],
  								  0), 0, 0),
  					REG_NOTES (insn));
!
    DONE;
  }")

***************
*** 7231,7237 ****
  				    (match_dup 2))))
  	      (set (reg:SI T_REG)
  		   (ne:SI (ior:SI (match_dup 1) (match_dup 2))
! 			  (const_int 0)))])]
    ""
    "
  {
--- 7232,7238 ----
  				    (match_dup 2))))
  	      (set (reg:SI T_REG)
  		   (ne:SI (ior:SI (match_dup 1) (match_dup 2))
! 			  (const_int 0)))])]
    ""
    "
  {
***************
*** 7282,7288 ****
  				    (match_dup 2))))
  	      (set (reg:SI T_REG)
  		   (ne:SI (ior:SI (match_operand 1 "" "") (match_dup 2))
! 			  (const_int 0)))])]
    "TARGET_SH1"
    "operands[2] = gen_reg_rtx (SImode);")

--- 7283,7289 ----
  				    (match_dup 2))))
  	      (set (reg:SI T_REG)
  		   (ne:SI (ior:SI (match_operand 1 "" "") (match_dup 2))
! 			  (const_int 0)))])]
    "TARGET_SH1"
    "operands[2] = gen_reg_rtx (SImode);")

***************
*** 8279,8285 ****
  ;;   "#"
  ;;   [(set_attr "length" "4")
  ;;    (set_attr "fp_mode" "double")])
! ;;
  ;; (define_split
  ;;   [(set (match_operand:SI 0 "arith_reg_operand" "=r")
  ;; 	(fix:SI (match_operand:DF 1 "arith_reg_operand" "f")))
--- 8280,8286 ----
  ;;   "#"
  ;;   [(set_attr "length" "4")
  ;;    (set_attr "fp_mode" "double")])
! ;;
  ;; (define_split
  ;;   [(set (match_operand:SI 0 "arith_reg_operand" "=r")
  ;; 	(fix:SI (match_operand:DF 1 "arith_reg_operand" "f")))
***************
*** 8320,8326 ****
    "* return output_ieee_ccmpeq (insn, operands);"
    [(set_attr "length" "4")
     (set_attr "fp_mode" "double")])
!
  (define_insn "cmpeqdf_media"
    [(set (match_operand:DI 0 "register_operand" "=r")
  	(eq:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
--- 8321,8327 ----
    "* return output_ieee_ccmpeq (insn, operands);"
    [(set_attr "length" "4")
     (set_attr "fp_mode" "double")])
!
  (define_insn "cmpeqdf_media"
    [(set (match_operand:DI 0 "register_operand" "=r")
  	(eq:DI (match_operand:DF 1 "fp_arith_reg_operand" "f")
***************
*** 8806,8815 ****
    "TARGET_SHMEDIA && reload_completed
     && GET_MODE (operands[0]) == GET_MODE (operands[1])
     && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0]))
!    && XVECEXP (operands[1], 0, 0) != const0_rtx
!    && (HOST_BITS_PER_WIDE_INT >= 64
!        || HOST_BITS_PER_WIDE_INT >= GET_MODE_BITSIZE (GET_MODE (operands[0]))
!        || sh_1el_vec (operands[1], VOIDmode))"
    [(set (match_dup 0) (match_dup 1))]
    "
  {
--- 8807,8813 ----
    "TARGET_SHMEDIA && reload_completed
     && GET_MODE (operands[0]) == GET_MODE (operands[1])
     && VECTOR_MODE_SUPPORTED_P (GET_MODE (operands[0]))
!    && ! zero_vec_operand (operands[1], VOIDmode)"
    [(set (match_dup 0) (match_dup 1))]
    "
  {
***************
*** 8819,8825 ****

    operands[0] = gen_rtx_REG (new_mode, true_regnum (operands[0]));
    operands[1]
!     = simplify_subreg (new_mode, operands[1], GET_MODE (operands[0]), 0);
  }")

  (define_expand "movv2hi"
--- 8817,8823 ----

    operands[0] = gen_rtx_REG (new_mode, true_regnum (operands[0]));
    operands[1]
!     = simplify_subreg (new_mode, operands[1], GET_MODE (operands[1]), 0);
  }")

  (define_expand "movv2hi"
***************
*** 8878,8884 ****
         || register_operand (operands[1], V2SImode))"
    "@
  	add	%1, r63, %0
! 	movi	%1, %0
  	#
  	ld%M1.q	%m1, %0
  	st%M0.q	%m0, %1"
--- 8876,8882 ----
         || register_operand (operands[1], V2SImode))"
    "@
  	add	%1, r63, %0
! 	#
  	#
  	ld%M1.q	%m1, %0
  	st%M0.q	%m0, %1"
***************
*** 9641,9647 ****
  /* These are useful to expand ANDs and as combiner patterns.  */
  (define_insn "mshfhi_l_di"
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")
! 	(ior:DI (lshiftrt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU")
                               (const_int 32))
  		(and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU")
  			(const_int -4294967296))))]
--- 9639,9645 ----
  /* These are useful to expand ANDs and as combiner patterns.  */
  (define_insn "mshfhi_l_di"
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")
! 	(ior:DI (lshiftrt:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU")
                               (const_int 32))
  		(and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU")
  			(const_int -4294967296))))]
***************
*** 9653,9663 ****
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")
  	(ior:DI (and:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU")
  			(const_int -4294967296))
! 		(lshiftrt:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU")
                               (const_int 32))))]
    "TARGET_SHMEDIA"
    "mshfhi.l	%N2, %N1, %0"
    [(set_attr "type" "arith_media")])

  (define_insn "mshflo_l_di"
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")
--- 9651,9680 ----
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")
  	(ior:DI (and:DI (match_operand:DI 1 "arith_reg_or_0_operand" "rU")
  			(const_int -4294967296))
! 		(lshiftrt:DI (match_operand:DI 2 "arith_reg_or_0_operand" "rU")
                               (const_int 32))))]
    "TARGET_SHMEDIA"
    "mshfhi.l	%N2, %N1, %0"
    [(set_attr "type" "arith_media")])
+
+ (define_split
+   [(set (match_operand:DI 0 "arith_reg_dest" "")
+ 	(ior:DI (zero_extend:DI (match_operand:SI 1
+ 					      "extend_reg_or_0_operand" ""))
+ 		(and:DI (match_operand:DI 2 "arith_reg_or_0_operand" "")
+ 			(const_int -4294967296))))
+    (clobber (match_operand:DI 3 "arith_reg_dest" ""))]
+   "TARGET_SHMEDIA"
+   [(const_int 0)]
+   "
+ {
+   emit_insn (gen_ashldi3_media (operands[3],
+ 				simplify_gen_subreg (DImode, operands[1],
+ 						     SImode, 0),
+ 				GEN_INT (32)));
+   emit_insn (gen_mshfhi_l_di (operands[0], operands[3], operands[2]));
+   DONE;
+ }")

  (define_insn "mshflo_l_di"
    [(set (match_operand:DI 0 "arith_reg_dest" "=r")

From-SVN: r55189
2002-07-02 19:45:49 +01:00
Roger Sayle a3acdc0cc1 sh.c (sh_media_init_builtins): Change use of poisoned identifier "bzero" to "memset".
* config/sh/sh.c (sh_media_init_builtins): Change use of poisoned
	identifier "bzero" to "memset".  Pass extra NULL_TREE argument to
	builtin_function.

From-SVN: r55171
2002-07-02 04:01:04 +00:00
J"orn Rennecke c1b92d0906 sh.c (langhooks.h): Include.
* sh.c (langhooks.h): Include.
	(sh_init_builtins, sh_media_init_builtins): New functions.
	(sh_expand_builtin, arith_reg_dest,and_operand): Likewise.
	(mextr_bit_offset, extend_reg_operand, zero_vec_operand): Likewise.
	(sh_rep_vec, sh_1el_vec, sh_const_vec): Likewise.
	(builtin_description): New struct tag.
	(signature_args, bdesc): New arrays.
	(TARGET_INIT_BUILTINS, TARGET_EXPAND_BUILTIN): Undef / define.
	(print_operand): Add 'N' modifier.
	* sh.h (VECTOR_MODE_SUPPORTED_P): Add SHmedia vector modes.
	(EXTRA_CONSTRAINT_U, EXTRA_CONSTRAINT_W): New macros.
	(EXTRA_CONSTRAINT): Add 'U' and 'W' cases.
	(CONST_COSTS): Add special case for SHmedia AND.
	(PREDICATE_CODES): Add and_operand, arith_reg_dest,
	extend_reg_operand, extend_reg_or_0_operand, mextr_bit_offset,
	sh_const_vec, sh_1el_vec, sh_rep_vec, zero_vec_operand.
	target_operand can also be const or unspec.
	* sh.md (UNSPEC_INIT_TRAMP, UNSPEC_FCOSA UNSPEC_FSRRA): New constants.
	(UNSPEC_FSINA, UNSPEC_NSB, UNSPEC_ALLOCO): Likewise.
	(attribute type): Add new types.
	(anddi3): Add splitter.
	(movdi_const_16bit+1): Add code to handle vector constants and
	bitmasks efficiently.
	(shori_media): Have generator function made.
	(movv8qi, movv8qi_i, movv8qi_i+1, movv8qi_i+2): New patterns.
	(movv8qi_i+3, movv2hi, movv2hi_i, movv4hi, movv4hi_i): Likewise.
	(movv2si, movv2si_i, absv2si2, absv4hi2, addv2si3, addv4hi3): Likewise.
	(ssaddv2si3, usaddv8qi3, ssaddv4hi3, negcmpeqv8qi): Likewise.
	(negcmpeqv2si, negcmpeqv4hi, negcmpgtuv8qi, negcmpgtv2si): Likewise.
	(negcmpgtv4hi, mcmv, mcnvs_lw, mcnvs_wb, mcnvs_wub): Likewise.
	(mextr_rl, mextr_lr, mextr1, mextr2, mextr3, mextr4, mextr5): Likewise.
	(mextr6, mextr7, mmacfx_wl, mmacfx_wl_i, mmacnfx_wl): Likewise.
	(mmacnfx_wl_i, mulv2si3, mulv4hi3, mmulfx_l, mmulfx_w): Likewise.
	(mmulfxrp_w, mmulhi_wl, mmullo_wl, mmul23_wl, mmul01_wl): Likewise.
	(mmulsum_wq, mmulsum_wq_i, mperm_w, mperm_w_little): LIkewise.
	(mperm_w_big, mperm_w0, msad_ubq, msad_ubq_i, mshalds_l): Likewise.
	(mshalds_w, ashrv2si3, ashrv4hi3, mshards_q, mshfhi_b): Likewise.
	(mshflo_b,  mshf4_b, mshf0_b, mshfhi_l, mshflo_l, mshf4_l): Likewsie.
	(mshf0_l, mshfhi_w, mshflo_w, mshf4_w, mshf0_w, mshfhi_l_di): Likewise.
	(mshfhi_l_di_rev, mshflo_l_di, mshflo_l_di_rev): Likewise.
	(mshflo_l_di_x, mshflo_l_di_x_rev, ashlv2si3, ashlv4hi3): Likewise.
	(lshrv2si3, lshrv4hi3, subv2si3, subv4hi3, sssubv2si3): Likewise.
	(ussubv8qi3, sssubv4hi3, fcosa_s, fsina_s, fipr, fsrra_s): Likewise.
	(ftrv): Likewise.

	(fpu_switch+1, fpu_switch+2): Remove constraint.

From-SVN: r55147
2002-07-01 20:41:54 +01:00
J"orn Rennecke e3ba8d11f8 sh-protos.h (sh_pr_interrupt): Declare.
* sh-protos.h (sh_pr_interrupt): Declare.
	* sh.c (sh_pr_interrupt): New function.
	(print_operand, calc_live_regs, sh_expand_prologue): Use it.
	(sh_hard_regno_rename_ok): Likewise.
	* sh.h (NORMAL_MODE): FP_MODE_NONE for interupt handlers.

From-SVN: r54756
2002-06-18 20:03:18 +01:00
Dhananjay R. Deshpande 03b8ec294f sh.h: Define HARD_REGNO_RENAME_OK
Fri Jun 14 12:04:02 2002  Dhananjay R. Deshpande <dhananjayd@kpit.com>

	* sh.h: Define HARD_REGNO_RENAME_OK
	* sh.c: sh_hard_regno_rename_ok: New. If current function has
	interrupt_handler attribute, only registers saved on stack are OK.
	* sh-protos.h: Declare sh_hard_regno_rename_ok.

From-SVN: r54612
2002-06-14 12:06:38 +01:00
J"orn Rennecke 9d7ed8065d sh.c (calc_live_regs): Don't use initial_value optimization for PR_MEDIA_REG.
* config/sh/sh.c (calc_live_regs): Don't use initial_value
	optimization for PR_MEDIA_REG.

From-SVN: r54600
2002-06-13 22:31:58 +01:00
David S. Miller 2f937369fa Delete SEQUENCE rtl usage outside of reorg and ssa passes.
2002-06-05  David S. Miller  <davem@redhat.com>

	Delete SEQUENCE rtl usage outside of reorg and ssa passes.
	* rtl.h (gen_sequence, emit_insns, emit_insns_before,
	emit_insns_before_scope, emit_insns_after,
	emit_insns_after_scope): Delete declaration.
	* ada/misc.c (insert_code_for): Use emit_insn* instead of
	emit_insns_foo.
	* config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE.
	(alpha_set_memflags): Fix comment.
	(set_frame_related_p): Use get_insns instead of gen_sequence.
	* config/alpha/alpha.md (setjmp receiver splitter): Avoid
	emitting no insns.
	* config/arm/arm.c (arm_finalize_pic): Use get_insns instead of
	gen_sequence.
	(arm_gen_load_multiple, arm_gen_store_multiple): Likewise.
	* config/fr30/fr30.c (fr30_move_double): Likewise.
	* config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr):
	Likewise.
	* config/ia64/ia64.c (spill_restore_mem): Likewise.
	* config/ia64/ia64.md (conditional move spliiter): Avoid emitting
	no insns.
	* config/m32r/m32r.c (gen_split_move_double): Use get_insns
	instead of gen_sequence.
	* config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise.
	(mips_expand_prologue, mips16_gp_pseudo_reg): Likewise.
	* config/sh/sh.c (sh_need_epilogue): Likewise.
	* config/sparc/sparc.md (current_function_calls_alloca, flat): New
	attributes.
	(setjmp pattern and split): Use them to avoid splitter which emits
	no RTL.
	* genattrtab.c (main): Emit include of function.h
	* config/stormy16/stormy16.c (xstormy16_split_cbranch): Use
	get_insns instead of gen_sequence.
	* config/cris/cris.c (cris_split_movdx): Likewise.
	* emit-rtl.c (emit_insns*): Kill.
	(try_split): Expect insn list instead of SEQUENCE.
	(make_jump_insn_raw, make_call_insn_raw): Fix comments.
	(emit_*insn*): Reimplement to work with INSN lists and PATTERNs.
	Make them abort if a SEQUENCE is given and RTL checking is
	enabled.
	(emit_*_scope): Don't forget to set scope on final insn.
	(gen_sequence): Move from here...
	* ssa.c (gen_sequence): To here as private function.
	* builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix
	comments.
	(expand_builtin_return, expand_builtin_mathfn): Likewise.
	(expand_builtin_strlen): Use get_insns instead of gen_sequence.
	(expand_builtin_saveregs): Use emit_insn_foo, fix comments.
	(expand_builtin_expect_jump): Use get_insns and fix comments.
	* calls.c (try_to_integrate): Use emit_insn_foo.
	(expand_call, emit_library_call_value_1): Likewise.
	* expr.c (emit_queue): Handle insn lists instead of SEQUENCE.
	(emit_move_insn_1): Use get_insns instead of gen_sequence.
	(expand_expr): Use emit_insn_foo.
	* cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo.
	* except.c (build_post_landing_pads): Likewise.
	* flow.c (attempt_auto_inc): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label,
	expand_nl_goto_receivers, expand_decl_cleanup): Likewise.
	* function.c (fixup_var_refs_insn): Use get_insns instead of
	gen_sequence.
	(fixup_var_refs_1): Likewise and expect insn list from gen_foo.
	(fixup_memory_subreg): Use get_insns instead of gen_sequence.
	(fixup_stack_1, purge_addressof_1, expand_main_function,
	get_arg_pointer_save_area): Likewise.
	(optimize_bit_field, instantiate_virtual_regs_1, assign_parms,
	expand_function_end): Use emit_insn_foo.
	(record_insns, keep_stack_depressed): Work with insn list instead
	of SEQUENCE, fix comments.
	* ifcvt.c (noce_emit_store_flag, noce_try_store_flag,
	noce_try_store_flag_constants, noce_try_store_flag_inc,
	noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith,
	noce_try_minmax, noce_try_abs): Use emit_insn_foo.
	(noce_process_if_block): Use get_insns instead of gen_sequence.
	* optabs.c (add_equal_note): Work with insn list, fix comments.
	(expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo.
	(expand_unop, expand_complex_abs, expand_unop_insn,
	expand_no_conflict_block): Likewise.
	(gen_move_insn): Use get_insns instead of gen_sequence.
	(gen_cond_trap): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(emit_initial_value_sets): Use emit_insn_foo.
	* reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise.
	(fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently
	now that RTL generators give insn lists.
	* sibcall.c (replace_call_placeholder): Use emit_insn_foo.
	* doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns
	instead of gen_sequence.
	(doloop_optimize): Work with insn lists instead of SEQUENCE rtl.
	* explow.c (emit_stack_save, emit_stack_restore): Use get_insns
	instead of gen_sequence.
	* loop.c (move_movables, emit_prefetch_instructions,
	gen_add_mult, check_dbra_loop, gen_load_of_final_value):
	Likewise.
	(loop_regs_update): Work with insn list instead of SEQUENCE rtl.
	(product_cheap_p): Likewise, and add commentary about RTL wastage
	here.
	* lcm.c (optimize_mode_switching): Use get_insns instead of
	gen_sequence.
	* profile.c (gen_edge_profiler): Likewise.
	* regmove.c (copy_src_to_dest): Likewise.
	* reg-stack.c (compensate_edge): Likewise and fix comment.
	* gcse.c (process_insert_insn): Likewise.
	(insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl.
	* jump.c (delete_prior_computation): Update comment.
	* genemit.c (gen_expand, gen_split, main): Use get_insns instead
	of gen_sequence, update comments to match.
	* recog.c (peephole2_optimize): Work with insn lists instead of
	SEQUENCE rtl.
	* sched-vis.c (print_pattern): Abort on SEQUENCE.
	* unroll.c (unroll_loop, find_splittable_givs, final_giv_value):
	Use get_insns instead of gen_sequence.
	(copy_loop_body): Likewise and don't emit dummy NOTE.
	* genrecog.c: Don't mention SEQUENCE rtl in comments.
	* combine.c (try_combine): Expect insn lists from split generator.
	* reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by
	hand.

From-SVN: r54497
2002-06-11 05:22:48 -07:00
J"orn Rennecke 2754d3c5ac Fix cfi generation for SH[1-4]:
* sh.c (frame_insn): New function.
	(output_stack_adjust): Add parameter emit_fn.  All callers changed.
	(push): Now returns rtx.  Use frame_insn.
	(sh_expand_prologue): Clear RTX_FRAME_RELATED_P for second push
	of a DF register.
	* sh.h (INCOMING_RETURN_ADDR_RTX, DWARF_FRAME_RETURN_COLUMN): Define.

From-SVN: r54445
2002-06-10 18:15:13 +01:00
J"orn Rennecke eaeb7de8cb sh.c (machine_dependent_reorg): Don't set RTX_UNCHANGING_P on an UNSPEC.
* sh.c (machine_dependent_reorg): Don't set RTX_UNCHANGING_P
	on an UNSPEC.

From-SVN: r54318
2002-06-06 16:14:39 +01:00
Geoffrey Keating e2500fedef Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
2002-06-04 07:11:05 +00:00
Toshiyasu Morita 62526ec32f * config/sh/sh.c: Include real.h for REAL_VALUE_TYPE.
From-SVN: r53975
2002-05-28 23:43:31 +01:00
J"orn Rennecke f1a58d928b config/sh reorganization to factor out endianness and coff:
* config/sh/little.h: New file.
        * config/sh/sh.h (TARGET_ENDIAN_DEFAULT): If not already
        defined, define to 0 to select big-endian.
	(SUBTARGET_ASM_ENDIAN_SPEC): Define according to TARGET_ENDIAN_DEFAULT.
        (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT.
        * config/sh/sh64.h (TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT.
        * config/sh/t-be: New file.
        * config/sh/t-le: New file.

	* sh.h (SDB_DEBUGGING_INFO, #include "dbxcoff.h"): Moved to sh/coff.h.
	(SDB_DELIM, MAX_OFILE_ALIGNMENT, IDENT_ASM_OP): Likewise.
	(TARGET_ASM_NAMED_SECTION, ASM_OUTPUT_SKIP): Likewise.
	(USER_LABEL_PREFIX, LOCAL_LABEL_PREFIX): Likewise.
	(ASM_GENERATE_INTERNAL_LABEL, ASM_OUTPUT_INTERNAL_LABEL): Likewise.
	(ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
	(ASM_FILE_END, ASM_DECLARE_FUNCTION_NAME): Deleted.
	(CPP_SPEC, SUBTARGET_CPP_ENDIAN_SPEC): Likewise.
	(SUBTARGET_CPP_SPEC, CPP_DEFAULT_CPU_SPEC, CPP_PREDEFINES): Likewise.
	(EXTRA_SPECS): Remove SUBTARGET_CPP_ENDIAN_SPEC and
	CPP_DEFAULT_CPU_SPEC.  Add LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL,
	SUBTARGET_LINK_EMUL_SUFFIX and SUBTARGET_LINK_SPEC.
	(LINK_SPEC): Define to SH_LINK_SPEC.
	(TARGET_CPU_CPP_BUILTINS, SH_LINK_SPEC): Define.
	(LINK_EMUL_PREFIX, LINK_DEFAULT_CPU_EMUL): Likewise.
	(SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise.
	(CPP_SPEC): Reduce to %(subtarget_cpp_spec).
	(TARGET_ENDIAN_DEFAULT): Define if not already defined.
	* config/sh/coff.h: New file.
	(TARGET_ASM_NAMED_SECTION): Now default_coff_asm_named_section
	(TARGET_OBJFMT_CPP_BUILTINS): Define.
	* config/sh/elf.h (IDENT_ASM_OP): No need to #undef at the start.
	(ASM_FILE_END, ASM_OUTPUT_SOURCE_LINE): Likewise.
	(DBX_OUTPUT_MAIN_SOURCE_FILE_END, TARGET_ASM_NAMED_SECTION): Likewise.
	(ASM_DECLARE_FUNCTION_NAME, MAX_OFILE_ALIGNMENT, SIZE_TYPE): Likewise.
	(PTRDIFF_TYPE): Likewise.
	("dbxelf.h", "elfos.h", "svr4.h"): Don't #include.
	(CPP_PREDEFINES): Don't define.
	(TARGET_OBJFMT_CPP_BUILTINS): Define.
	(LINK_SPEC): Define to SH_LINK_SPEC.
	(LINK_EMUL_PREFIX): Redefine.
	* config/sh/linux.h: (SUBTARGET_CPP_SPEC): Remove -fpic / -fPIC cases.
	(SUBTARGET_CPP_ENDIAN_SPEC, CPP_DEFAULT_CPU_SPEC): Remove redefinition.
	(CPP_PREDEFINES, SUBTARGET_ASM_ENDIAN_SPEC): Likewise.
	(CC1_SPEC, CC1PLUS_SPEC, LINK_SPEC): Likewise.
	(TARGET_OS_CPP_BUILTINS): Define.
	(TARGET_DEFAULT): Redefine.
	(SUBTARGET_LINK_EMUL_SUFFIX, SUBTARGET_LINK_SPEC): Likewise.
	* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Remove.
	(LINK_SPEC): Don't redefine.
	(LINK_DEFAULT_CPU_EMUL): Redefine.
	(TARGET_DEFAULT): Include TARGET_ENDIAN_DEFAULT.
	* sh.c (sh_asm_named_section): Don't declare / define.
	* t-linux (MULTILIB_OPTIONS): Rely on pre-set endianness option.
	* config.gcc (sh-*-elf* tm_file): Add dbxelf.h elfos.h svr4.h.
	(sh64-*-elf* tm_file): Likewise.
	(sh-*-rtemself* tm_file): Likewise.
	(sh-*-linux* tm_file): Likewise.  Add sh/little.h.
	(sh-*-linux* tmake_file): Add sh/t-le.
	(sh-*-rtems* tm_file): Add sh/coff.h
	(sh-*-* tm_file): Likewise.


	* sh.h (LEGITIMATE_PIC_OPERAND_P): Check for SYMBOL_REF before using
	CONSTANT_POOL_ADDRESS_P.

	* coff.h (HAS_INIT_SECTION, INVOKE__MAIN): Define.

Co-Authored-By: Jason R. Thorpe <thorpej@wasabisystems.com>

From-SVN: r53974
2002-05-28 23:26:43 +01:00
Richard Henderson 47754fd548 target-def.h (TARGET_BINDS_LOCAL_P): New.
* target-def.h (TARGET_BINDS_LOCAL_P): New.
	* target.h (struct gcc_target): Move boolean fields to the end.
	Add binds_local_p.
	* varasm.c (default_binds_local_p): New.
	* output.h: Declare it.

	* config/alpha/alpha.c (alpha_encode_section_info): Use the new hook.
	* config/cris/cris.c (cris_encode_section_info): Likewise.
	* config/i386/i386.c (i386_encode_section_info): Likewise.
	* config/ia64/ia64.c (ia64_encode_section_info): Likewise.
	* config/sh/sh.c (sh_encode_section_info): Likewise.

	* doc/tm.texi (TARGET_IN_SMALL_DATA_P): New.
	(TARGET_BINDS_LOCAL_P): New.

From-SVN: r53620
2002-05-19 02:50:27 -07:00
Richard Henderson 772c526579 system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
	* output.h (STRIP_NAME_ENCODING): Remove.
	(default_strip_name_encoding): Declare.
	* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
	* target.h (strip_name_encoding): New.
	* varasm.c (default_strip_name_encoding): New.

	* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
	config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
	config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
	config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
	config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
	config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
	config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
	config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
	config/v850/v850.h: Use the hook, not the macro.

	* config/darwin-protos.h, config/darwin.c, config/darwin.h,
	config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
	config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
	config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
	config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
	config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
	config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
	config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
	config/v850/v850.c, config/v850/v850.h:
	Move STRIP_NAME_ENCODING to out-of-line function and add
	TARGET_STRIP_NAME_ENCODING.

	* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
	config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
	with TARGET_STRIP_NAME_ENCODING referencing existing function;
	make function static.

	* xcoffout.c: Include target.h
	* Makefile.in (xcoffout.o): Update.

	* config/avr/avr.c (avr_encode_section_info): Correct prototype.
	* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
	* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
	reloc argument unused.
	* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.

	* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
	STRIP_NAME_ENCODING docs.

From-SVN: r53615
2002-05-19 00:55:48 -07:00
Richard Henderson fb49053ffd system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
	* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
	* target.h (encode_section_info): New.
	* varasm.c (make_decl_rtl, output_constant_def): Use it.
	* hooks.c (hook_tree_int_void): New.
	* hooks.h: Declare it.

	* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
	config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
	config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
	config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
	config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
	config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
	config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
	config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/mcore/mcore-protos.h, config/mcore/mcore.c,
	config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
	config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
	config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
	config/stormy16/stormy16.c, config/stormy16/stormy16.h:
	Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
	referencing existing function.  Make function static.

	* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
	config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
	config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
	config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
	config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
	config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
	config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
	config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
	config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
	config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
	config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
	config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
	config/xtensa/xtensa.c, config/xtensa/xtensa.h:
	Move ENCODE_SECTION_INFO to out-of-line function and add
	TARGET_ENCODE_SECTION_INFO.

	* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
	(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.

	* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
	from SUBTARGET_*
	(switch_to_section): Replace in_rdata case with in_readonly_data.

	* config/h8300/h8300.c (h8300_encode_label): Make static.
	* config/h8300/h8300-protos.h: Update.

	* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
	from rs6000_encode_section_info; make static.
	(rs6000_xcoff_encode_section_info): New.

	* config/v850/v850.c (v850_encode_data_area): Make static.
	* config/v850/v850-protos.h: Update.

	* config/vax/vax.c: Include flags.h.
	(vms_select_section): Fix typo.

	* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
	ENCODE_SECTION_INFO docs.

From-SVN: r53606
2002-05-18 22:23:27 -07:00
J"orn Rennecke f78ec36a71 sh.c (sh_builtin_saveregs): If starting with an odd fp register...
* sh.c (sh_builtin_saveregs): If starting with an odd fp register,
	make sure that buffer starts on odd word address.
	(sh_va_arg): Skip odd fp registers when reading a double precision
	value.

From-SVN: r53337
2002-05-09 18:41:56 +01:00
Vladimir Makarov fae15c9379 2002-04-29 Vladimir Makarov <vmakarov@redhat.com>
Merging code from dfa-branch:

From-SVN: r52915
2002-04-29 22:34:36 +00:00
J"orn Rennecke 5e039e6b12 sh.c (sh_va_arg): If argument was passed by reference, dereference the pointer.
* sh.c (sh_va_arg): If argument was passed by reference,
	dereference the pointer.

From-SVN: r52734
2002-04-24 23:12:32 +01:00
J"orn Rennecke 12e85a0e1d sh.c (calc_live_regs, [...]): Use of PR_MEDIA_REG / PR_REG depends on TARGET_SHMEDIA, not TARGET_SH5.
* sh.c (calc_live_regs, sh_pr_n_sets): Use of PR_MEDIA_REG / PR_REG
	depends on TARGET_SHMEDIA, not TARGET_SH5.

From-SVN: r52220
2002-04-12 13:14:33 +01:00
J"orn Rennecke 18778292a0 sh.c (broken_move): Constant 0.
* sh.c (broken_move): Constant 0. / 1. load is OK if there is
	no r0 clobber.

From-SVN: r52214
2002-04-12 11:55:32 +01:00
J"orn Rennecke 1951818c2f config.gcc (sh-*-elf*): Use sh/embed-elf.h instead of sh/elf.h.
* config.gcc (sh-*-elf*): Use sh/embed-elf.h instead of sh/elf.h.
	(sh64-*-elf*, sh-*-rtemself*): Likewise.
	* config/sh/embed_bb.c: New file.
	* config/sh/embed-elf.h: New file.
	* sh.h (CPP_SPEC): Supply __SIZE_TYPE__ and __PTRDIFF_TYPE__
	if -m[12345]* option is given.  Don't use subtarget_cpp_ptr_spec.
	(CPP_DEFAULT_CPU_SPEC): Add settings for __SIZE_TYPE__ and
	__PTRDIFF_TYPE__ .
	(SUBTARGET_CPP_PTR_SPEC): Don't define.
	(EXTRA_SPECS): Remove subtarget_cpp_ptr_spec.
	Add subtarget_asm_endian_spec.
	(ASM_SPEC): Use subtarget_asm_endian_spec.
	(SUBTARGET_ASM_ENDIAN_SPEC): Define.
	(RETURN_ADDR_RTX): Use PR_MEDIA_REG for TARGET_SH5.
	(WCHAR_UNSIGNED): Define.
	(SH_ELF_WCHAR_TYPE, SH_DBX_REGISTER_NUMBER): Define.
	(DBX_REGISTER_NUMBER): Use SH_DBX_REGISTER_NUMBER.
	(ALLOCATE_INITIAL_VALUE): Use PR_MEDIA_REG for TARGET_SH5.
	Fix value.
	* sh.c (calc_live_regs): Use PR_MEDIA_REG for TARGET_SH5.
	(sh_adjust_cost): Likewise.
	sh64.h (CPP_DEFAULT_CPU_SPEC): Add settings for __SIZE_TYPE__ and
	__PTRDIFF_TYPE__ .
	(SUBTARGET_CPP_PTR_SPEC, WCHAR_TYPE): Don't #undef/ #define.
	(WCHAR_TYPE_SIZE): Likewise.
	(ASM_SPEC): Use subtarget_asm_endian_spec.
	(SH_ELF_WCHAR_TYPE): #undef/ #define.
	(MAX_WCHAR_TYPE_SIZE): Don't #undef.
	* config/sh/elf.h (WCHAR_UNSIGNED): #undef .
	(MAX_WCHAR_TYPE_SIZE): Don't #define .
	(WCHAR_TYPE, WCHAR_TYPE_SIZE): #undef / #define .
	(USER_LABEL_PREFIX): Don't #undef /#define .
	(DBX_REGISTER_NUMBER): Use SH_DBX_REGISTER_NUMBER.
	* config/elf/linux.h (USER_LABEL_PREFIX): Don't #undef /#define .
	(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE, WCHAR_TYPE_SIZE): Likewise.
	(ASM_SPEC): Likewise.
	(SUBTARGET_ASM_ENDIAN_SPEC): #undef / #define .
	(CC1_SPEC): don't supply -m3 for -m4*, -m5*.
	* t-sh: (LIB1ASMFUNCS): Use LIB1ASMFUNCS_CACHE.
	(LIB2FUNCS_EXTRA): Define.
	* t-sh64 (LIB2FUNCS_EXTRA): Define.
	* config/sh/t-linux (LIB1ASMFUNCS): Don't redefine.
	(LIB1ASMFUNCS_CACHE): Define.
	(LIB2FUNCS_EXTRA): Redefine empty.

From-SVN: r52091
2002-04-09 21:07:15 +01:00
Kaveh R. Ghazi 0139adcaa7 c4x.c (c4x_fp_reglist): Const-ify.
* c4x.c (c4x_fp_reglist): Const-ify.
	* cris.c (cris_print_operand): Likewise.
	* i386.c (ix86_va_arg): Likewise.
	* ia64/unwind-ia64.c (unw_decode_table): Likewise.
	* m32r.c (m32r_hard_regno_mode_ok): Likewise.
	* m32r.h (m32r_hard_regno_mode_ok): Likewise.
	* mcore.c (regno_reg_class, mcore_unique_section): Likewise.
	* mcore.h (regno_reg_class): Likewise.
	* mips.c (gen_int_relational): Likewise.
	* ns32k.c (ns32k_reg_class_contents, regclass_map): Likewise.
	* ns32k.h (ns32k_reg_class_contents, regclass_map): Likewise.
	* pdp11.c (pdp11_assemble_integer): Likewise.
	* pj.h (INITIALIZE_TRAMPOLINE): Likewise.
	* s390.c (s390_branch_condition_mnemonic, regclass_map):
	Likewise.
	* s390.h (regclass_map): Likewise.
	* sh.c (shift_amounts): Likewise.
	* sh.md (rot_tab): Likewise.

From-SVN: r50517
2002-03-10 01:39:04 +00:00
J"orn Rennecke 7ab562744f sh.h (current_function_anonymous_args): Remove.
* sh.h (current_function_anonymous_args): Remove.
	(SETUP_INCOMING_VARARGS): Don't set it - just check that one
	of current_function_varargs and current_function_stdarg is set.
	* sh.c (sh_expand_prologue): Check current_function_varargs /
	current_function_stdarg / TARGET_SH5 instead of
	current_function_anonymous_args.

	* sh64.h (TARGET_VERSION): Define.

Fix comments that to refer to SH architecture -
the architecture is no longer exclusive to Hitachi.

From-SVN: r49931
2002-02-21 16:42:28 +00:00
Alexandre Oliva 2b1fd83f62 sh.c (expand_prologue): Fix mis-applied 2001-11-09's patch.
* config/sh/sh.c (expand_prologue): Fix mis-applied 2001-11-09's
patch.

From-SVN: r49631
2002-02-09 03:51:25 +00:00
Alexandre Oliva fa5322fa58 Contribute sh64-elf.
2002-02-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to...
(sh_cannot_modify_jumps_p): New function.
2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to...
(sh_ms_bitfield_layout_p): New function.
2002-02-04  Alexandre Oliva  <aoliva@redhat.com>
	    Zack Weinberg  <zack@codesourcery.com>
* config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use
expand_simple_binop instead of expand_binop.
2002-02-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable
use of .quad and .uaquad.
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP,
TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movdi_const, movdi_const_32bit,
movdi_const_16bit): Make sure all CONSTs have modes.
(sym2PIC): Ditto, but by adjusting all callers.
* config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live
if the prologue calls the SHmedia argument decoder or register
saver.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define.
(TARGET_ASM_ALIGNED_DI_OP): Likewise.
(sh_expand_epilogue): Don't emit USE of return target register.
(prepare_move_operands): Legitimize DImode PIC addresses.
(sh_media_register_for_return): Skip tr0, used to initialize the
PIC register.
(sh_expand_prologue): Remove explicit USE of return register.
(nonpic_symbol_mentioned_p): PC is non-PIC.  Don't recurse in
CONST_DOUBLEs.  UNSPEC_GOTPLT is PIC.
* config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete.
(OVERRIDE_OPTIONS): Don't disable PIC on SH5.
(EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of
EXTRA_CONSTRAINT_T.
(GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New.
(MOVI_SHORI_BASE_OPERAND_P): New.
(NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New.
(EXTRA_CONSTRAINT_T): Define in terms of them.
(OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT.
* config/sh/sh.md (movsi_media, movsi_media_nofpu,
movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to
alternatives supporting TARGET_REGS.
(UNSPEC_GOTPLT): New constant.
(movdi split): Move incrementing of LABEL_NUSES...
(movdi_const, movdi_const_32bit): Here.  Use
MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T.
(movdi_const_16bit): New.
(call, call_value) [flag_pic]: Use GOTPLT.
(call_pop, call_value_pop): New expands.
(call_pop_compact, call_pop_rettramp): New insns.
(call_value_pop_compact, call_value_pop_rettramp): New insns.
(sibcall) [flag_pic]: Use GOT.
(builtint_setjmp_receiver): Remove bogus, unused expand.
(GOTaddr2picreg): Implement for SHcompact and SHmedia.
(*pt, *ptb, ptrel): New insns.
(sym2GOT): Handle DImode GOT.
(sym2GOTPLT, symGOTPLT2reg): New expands.
(sym2PIC): New expand.
(shcompact_return_tramp): Use GOTPLT to return trampoline.
(shcompact_return_tramp_i): Use return register explicitly.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't
disable flag_reorder_blocks.
2002-01-19  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Reorder return, uses and
clobbers, for clarity.
(sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and
restoring of r0 in macl as MAYBE_DEAD.
2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define.
* config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of
alter_subreg all over.
(jump) [TARGET_SHMEDIA]: FAIL to create new jumps after
reload, instead of emitting instructions that would require
reloading.
(casesi_load_media): Add missing modes.
2001-11-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (sh_expand_prologue): Mark the PIC register
as used if the argument decoder is called.
2001-08-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in
Pmode, then extend it to DImode if necessary.
2001-08-28  Stephen Clarke  <Stephen.Clarke@st.com>
* config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode
constants in FPU-enabled SHmedia, let them be loaded from memory.
2001-08-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media):
Adjust whitespace in assembly output templates.
2001-08-28  Stephen Clarke  <Stephen.Clarke@st.com>
* config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust
mode of if_then_else.
2001-08-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in
sh.h.
2001-07-26  Andrew Haley  <aph@cambridge.redhat.com>
	    Joern Rennecke <amylaar@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New.
(SUBTARGET_CPP_PTR_SPEC): New.
(SUBTARGET_CPP_SPEC): Remove.
2001-07-06  Chandrakala Chavva  <cchavva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Fix typo in previous checkin.
2001-07-11  Chandrakala Chavva  <cchavva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations.
2001-07-10  Chandrakala Chavva  <cchavva@cygnus.com>
	    Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than
what single FP register can hold for SHmedia target.
2001-07-06  Chandrakala Chavva  <cchavva@redhat.com>
	    Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Do not split into SUBREG.
2001-06-14  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures
and added new functions as specified in SH5 ABI r9.
2001-06-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an
8-byte boundary.
2001-06-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (dump_table): Add const0_rtx in calls of
gen_consttable_4 and gen_consttable_8.  Emit multiple labels
and consttable_window_ends.
2001-06-03  Graham Stott  <grahams@redhat,com>
* config/sh/sh.md (movdi split): Remove unused variable last_insn.
2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (print_operand): Handle floating-point pair,
vector and matrix registers.
* config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer
vector modes into account.
* config/sh/sh.md (movv2sf): Split move between registers into
movdf.
(movv4sf, movv16sf): Introduce insns that get split only after
reload.
* config/sh/shmedia.h: Fix Copyright dates.
* config/sh/ushmedia.h: Likewise.  Move loop counter
declarations into conditionals that uses them.
(sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in
loop boundary.
* config/sh/sshmedia.h: Fix Copyright dates.
(sh_media_PUTCFG): Fix constraints.
2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to
ptrmemfunc_vbit_in_delta for SH5.
2001-05-08  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (TARGET_SWITCHES): Document -m5-*.
* invoke.texi: Likewise.
2001-04-14  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_push_shmedia_regs,
GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs,
GCC_pop_shmedia_regs_nofpu): New global symbols.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add them.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro.
* config/sh/sh.c (calc_live_regs): Account for PR's saving in
compact function with nonlocal labels.
(sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed.
(sh_expand_epilogue) [SHcompact]: Pop them when appropriate.
(initial_elimination_offset): Account for their stack space.
* config/sh/sh.md (shmedia_save_restore_regs_compact): New insn.
* config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media,
movhi_media, movdi_media, movdi_media_nofpu, movdf_media,
movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at
least one of the operands to be a register.
(movv2sf): Likewise.  Renamed to movv2sf_i.
(movdi, movdf, movv2sf, movv4sf, movv16sf, movsf):
prepare_move_operands() before emitting SHmedia insns.
2001-04-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]:
Don't save nor initialize r12.  Don't mis-align the stack.
Pad the code with a nop.
* config/sh/crti.asm: Don't restore r12.  Don't mis-align the
stack.
2001-03-13  Alexandre Oliva  <aoliva@redhat.com>
* gcc/longlong.h (__umulsidi3, count_leading_zeros)
[__SHMEDIA__]: Implement.
2001-03-11  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md: Set latency of `pt' closer to reality.
(movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu,
movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu):
Set move, load and store type attributes.
* config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable
profiling.
* config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode.
* config/sh/sh-protos.h (sh_media_register_for_return): Declare.
* config/sh/sh.c (sh_media_register_for_return): New function.
(sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available
branch-target register.
(sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it.
* config/sh/sh.md (return_media_i): Use any call-clobbered
branch-target register.
(return_media): If r18 wasn't copied in the prologue, copy it
here.
* config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]:
Clear class FP0_REGS.
* config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied
from elf.h.
2001-03-08  DJ Delorie  <dj@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA.
2001-02-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Set fp_mode to single.
2001-02-07  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'.
2001-02-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode
return value correctly for call_cookie.
2001-02-01  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crt1.asm (start): Modified so as to call
___setup_argv_and_call_main.
2001-01-26  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in
SHmedia mode.
2001-01-20  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro.
(STRIP_NAME_ENCODING): Use it.
(ASM_OUTPUT_LABELREF): Likewise.  Don't call assemble_name().
2001-01-19  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of
prepare_scc_operands().
* config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"...
(DATALABEL_SYMNAME_P): ... so that we don't need memcmp here.
2001-01-17  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'.
2001-01-13  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Use R0_REG.
* config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants,
used in shcompact_incoming_args.
* config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous
change.
* config/sh/crt1.asm (start) [SH5]: Switch to single-precision
mode.
* config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr):
Adjust accordingly.
* config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue):
Simplify.  Adjust.  Add sanity check.
* config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set
FPU_SINGLE_BIT.
* config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match
TARGET_SHCOMPACT.
(udivsi3, divsi3): Use them.
(force_mode_for_call): New insn.
(call, call_value, sibcall_value): Emit it before SHcompact
calls.
2001-01-11  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (call, call_value, sibcall): Make sure the
call cookie is non-NULL before taking its value.
2001-01-10  Alexandre Oliva  <aoliva@redhat.com>
* config.gcc (sh64): Set target_requires_64bit_host_wide_int.
2001-01-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Set argument memory
block.
* config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as
temporary for stack adjusts.  Use MACL and MACH to pass
arguments to shcompact_incoming_args.
* config/sh/sh.md (shcompact_incoming_args): Adjust.  Don't
clobber r1.
* config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise.
(nested_trampoline): Load static chain address into r1.
* config/sh/sh.md (movdi_media splits): Fix sign-extension.
2001-01-07  Alexandre Oliva  <aoliva@redhat.com
* config/sh/sh.c (fpul_operand) [SHMEDIA]: Just call
fp_arith_reg_operand().
2001-01-06  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (casesi): Sign-extend the first two operands,
and use signed compares for them.
* config/sh/sh.c (dump_table): Don't emit 8-byte constants after
4-byte ones.  Instead, inter-leave them, maintaining the 8-byte
ones properly aligned.
(find_barrier): Account for extra alignment needed for 8-byte wide
constants.
(machine_dependent_reorg): Require a label for the second 4-byte
constant after an 8-byte one.
* config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's
change.
2001-01-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset
last_float when switching float modes.
* config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer
auto-increment for general-purpose registers.
* config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the
result.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary
for stack adjust.
* config/sh/sh.c (sh_builtin_saveregs): Support using all
registers for varargs.
2001-01-01  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify.
* config/sh/sh.h (CALL_COOKIE_STACKSEQ,
CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros.
(CALL_COOKIE_INT_REG_SHIFT): Adjust.
(FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK.  Adjust
call_cookie accordingly.
(FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK.
(SHCOMPACT_BYREF): Likewise.
(SHCOMPACT_FORCE_ON_STACK): New macro.
* config/sh/sh.c (sh_expand_prologue): Use new call_cookie format.
(sh_builtin_saveregs): Likewise.
* config/sh/lib1funcs.asm (shcompact_call_trampoline,
shcompact_incoming_args): Use new shift values.  Support
sequences of consecutive and non-consecutive pushes/pops.
* config/sh/sh.md (return): Don't explicitly use PR_REG.
2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
* config/sh/sh.h (TEXT_SECTION): Define.
* config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP.
2001-01-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro.
* config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for
return values on FPU-enabled SHmedia.
(FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on
FPU-enabled SHmedia.
(INIT_CUMULATIVE_ARGS): Set up return trampoline only if
value is returned in a non-FP reg and is not returned by
reference.
* config/sh/sh.md (shcompact_return_tramp_i): Change type to
jump_ind.
2000-01-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New.
(FUNCTION_ARG_CALLEE_COPIES): Require argument to be
quad-aligned to be passed by callee-copy reference.
2001-01-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define.
* config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine.
2001-01-02  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in
copying low-numbered FP regs to r7 and r8.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of
FP regs to general-purpose regs only if the copy was passed on the
stack.
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in
copying FP reg to r9.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to
copy FP regs to general-purpose regs only in outgoing calls.
* config/sh/sh.md (movdf_media, movsf_media): Revert incorrect
change from 	2000-10-30.  Adjust for 64-bit (or 32-bit)
HOST_WIDE_INT.
* config/sh/sh.h (struct sh_args): Document all fields.
(FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments
passed partially on the stack should not consider making
sibcalls.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to
stack_regs only for incoming calls.  When passing FP args,
make sure there are FP regs available before modifying
call_cookie.
(SHCOMPACT_BYREF): Pass double args in general-purpose
registers by reference.
2000-12-30  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't
attempt to generate sibcalls if the caller got any arguments
by reference.
* config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double.
* config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode
to 8-byte boundaries.
* config/sh/sh.md (shcompact_preserve_incoming_args): New insn.
* config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro.
* config/sh/sh.c (sh_expand_prologue): Preserve args that will be
stored in the stack.
* config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange
for the offsets to have the ISA bit set.
(shcompact_call_trampoline): Document.  Swap r0 and r1, to match
invocation.  Use beq instead of bgt to mark end of sequence of
loads.
(shcompact_incoming_args): Fix store of r2.  Use beq instead of
bgt to mark end of sequence of stores.
* config/sh/sh.c (arith_operand): Don't check whether
CONST_OK_FOR_J for now.
* config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT
instead of long for conversion.
2000-12-29  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (print_operand_address): Convert INTVAL to int
before passing it to fprintf.
2000-12-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit.
Call set_fpscr before reading/writing SR.
* config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR.
Call set_fpscr.
* config/sh/lib1funcs.asm: Add `.align 2' directives before
SHmedia code.
(FMOVD_WORKS): Define on SH5 with FPU.
(set_fpscr): Define on SH5.  Remove separate _fpscr_values
setting.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of
_fpscr_values.
2000-12-28  Hans-Peter Nilsson  <hpn@cygnus.com>
* config/sh/lib1funcs.asm (ct_main_table): Align contents to even
address.
(ia_main_table): Ditto.
2000-12-27  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define.
* config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate
the definitions from sh.h.
* config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on
TARGET_SH5.
(SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined.
* config/sh/elf.h (PTRDIFF_TYPE): Likewise.
* config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise.
2000-12-26  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes.
Increment LABEL_NUSES.

From-SVN: r49630
2002-02-09 03:08:08 +00:00
Kazu Hirata e03f5d43cb avr.c: Fix comment typos.
* config/avr/avr.c: Fix comment typos.
	* config/c4x/c4x.md: Likewise.
	* config/dsp16xx/dsp16xx.h: Likewise.
	* config/dsp16xx/dsp16xx.md: Likewise.
	* config/i386/i386.md: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/m32r/m32r.h: Likewise.
	* config/m68hc11/m68hc11.md: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10200/mn10200.c: Likewise.
	* config/romp/romp.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/stormy16/stormy16.h: Likewise.
	* config/stormy16/stormy16.md: Likewise.

From-SVN: r48496
2002-01-03 05:04:34 +00:00
Kazu Hirata 6f317ef34f darwin-tramp.asm: Fix comment formatting.
* config/rs6000/darwin-tramp.asm: Fix comment formatting.
	* config/rs6000/freebsd.h: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/sh.h: Likewise.

From-SVN: r48362
2001-12-29 09:07:56 +00:00
Kaveh R. Ghazi 0b5826acc8 arc.c (arc_hard_regno_mode_ok): Const-ify.
* arc.c (arc_hard_regno_mode_ok): Const-ify.
	* arc.h (arc_hard_regno_mode_ok): Likewise.
	* i386.c (x86_64_reg_class_name): Make static.
	* m68k.c (regno_reg_class): Const-ify.
	* m68k.h (regno_reg_class): Likewise.
	* mcore.c (reg_class_from_letter): Likewise.
	* mcore.h (reg_class_from_letter): Likewise.
	* sh.c (reg_class_from_letter, ashiftrt_insns, shift_insns,
	ext_shift_insns, ext_shift_amounts): Likewise.
	* sh.h (reg_class_from_letter): Likewise.
	* sparc.c (hard_regno_mode_classes, hard_32bit_mode_classes,
	hard_64bit_mode_classes): Likewise.
	* sparc.h (hard_regno_mode_classes): Likewise.

	* gcc.c (modify_target): Make static.
	* gengenrtl.c (defs, formats): Likewise.
	* reload1.c (elim_table_1, init_elim_table): Const-ify.
	* tradcpp.c (directive, directive_table, handle_directive,
	skip_if_group, run_directive): Likewise.

cp:
	* decl2.c (lang_f_options): Const-ify.

f:
	* com.c (ffecom_gfrt_volatile_, ffecom_gfrt_complex_,
	ffecom_gfrt_const_, ffecom_gfrt_type_): Const-ify.

java:
	* Make-lang.in (keyword.h): Pass -C to gperf to const-ify
	the static arrays that are output.
	* jvspec.c (jvgenmain_spec): Make static.
	* keyword.gperf (struct java_keyword, java_keyword): Const-ify.
	* keyword.h: Regenerate.
	* lang.c (string_option, process_option_with_no, lang_f_options,
	lang_W_options): Const-ify.
	* lex.c (java_lex): Likewise.

From-SVN: r48290
2001-12-23 16:07:16 +00:00
Richard Sandiford 301d03af8a target.h (asm_out.byte_op, [...]): New fields.
* target.h (asm_out.byte_op, asm_out.aligned_op, asm_out.unaligned_op,
	asm_out.integer): New fields.
	* target-def.h (TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_[HSDT]I_OP,
	TARGET_ASM_UNALIGNED_[HSDT]I_OP, TARGET_ASM_INTEGER): New initialisers.
	(TARGET_ASM_ALIGNED_INT_OP, TARGET_ASM_UNALIGNED_INT_OP): Collect
	the individual initialisers together.
	(TARGET_ASM_OUT): Add the new initialisers.
	* output.h (assemble_integer): Return bool.
	(integer_asm_op): Declare.
	(default_assemble_integer): Declare.
	(assemble_aligned_integer): New interface to assemble_integer.
	* varasm.c (integer_asm_op): New function to select pseudo-op.
	(default_assemble_integer): Default implementation of asm_out.integer.
	(assemble_integer): Use the new target hook.  Split objects into
	words or bytes if the target hook fails.  Return bool.
	* doc/tm.texi (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_OUTPUT_SHORT,
	ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT, ASM_OUTPUT_QUADRUPLE_INT,
	UNALIGNED_SHORT_ASM_OP,	UNALIGNED_INT_ASM_OP,
	UNALIGNED_DOUBLE_INT_ASM_OP): Undocument.
	Document new target hooks.

	* defaults.h (ASM_OUTPUT_ADDR_VEC_ELT): Use integer_asm_op.
	* dwarf2asm.c (unaligned_integer_asm_op): Remove.
	(dw2_assemble_integer): New.
	(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
	dw2_asm_output_pcrel, dw2_asm_output_addr, dw2_asm_output_addr_rtx,
	dw2_asm_output_encoded_addr_rtx): Use it.
	(dw2_asm_output_nstring): Use assemble_integer for the null terminator.
	(dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Use
	integer_asm_op to get the byte pseudo-op.  Use assemble_integer
        if it returns NULL.
	* dwarf2asm.h (dw2_assemble_integer): Declare.
	* dwarfout.c: Include dwarf2asm.h.  Use dwarf2 functions for the
	default	implementation of most macros.
	(output_unsigned_leb128): Use dw2_asm_output_data.
	(output_signed_leb128, dwarfout_source_line): Likewise.
	(output_reg_number): Use dw2_assemble_integer.
	(generate_macinfo_entry): Separate the type and offset arguments.
	Use assemble_integer to write the value.
	(dwarfout_start_source_file): Update generate_macinfo_entry usage.
	(dwarfout_end_source_file, dwarfout_define, dwarfout_undef): Likewise.
	* final.c (output_addr_const): Don't put brackets round a subtracted
	symbol value or ".".
	* halfpic.c (half_pic_finish): Use assemble_aligned_integer.

	* config/1750a/1750a.c (assemble_integer_1750a): New,
	* config/alpha/alpha.h (literal_section): Avoid ASM_OUTPUT_INT.
	* config/arc/arc.c (arc_assemble_integer): New.
	* config/arc/arc.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/arm/arm.c (arm_poke_function_name): Likewise.
	(arm_assemble_integer): New, extracted from...
	* config/arm/arm.h (OUTPUT_INT_ADDR_CONST): ...here, now removed.
	(ARM_TRAMPOLINE_TEMPLATE, ARM_FUNCTION_PROFILER): Avoid ASM_OUTPUT_INT.
	(ARM_FUNCTION_PROFILER): Likewise.
	* config/avr/avr-protos.h (asm_output_byte): Remove.
	(asm_output_char, asm_output_short): Remove.
	* config/avr/avr.c (avr_assemble_integer): New.
	(asm_output_byte, asm_output_char, asm_output_short): Remove.
	* config/clipper/clipper.h (ASM_LONG): Remove.
	* config/dsp16xx/dsp16xx-protos.h (asm_output_long): Remove.
	* config/dsp16xx/dsp16xx.c (asm_output_long): Remove.
	* config/elxsi/elxsi.c (elxsi_assemble_integer): New.
	* config/i370/i370.c (i370_hlasm_assemble_integer): New.
	* config/i370/i370.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
	(ASM_BYTE, ASM_SHORT, ASM_LONG): Delete.
	* config/i386/att.h, (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i386/linux.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
	ASM_LONG instead of UNALIGNED_INT_ASM_OP.
	* config/i386/sco5.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i386/sysv4.h (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Use
	ASM_LONG instead of UNALIGNED_INT_ASM_OP.
	* config/i860/fx2800.h (ASM_FILE_END): Avoid ASM_LONG.
	* config/i860/i860.c (i860_output_function_epilogue): Likewise.
	* config/i860/i860.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	(ASM_SHORT, ASM_LONG): Undefine.
	* config/i860/paragon.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.
	* config/i960/i960.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/ia64/ia64.c (ia64_assemble_integer): New.
	* config/ia64/ia64.h (ASM_OUTPUT_DWARF_OFFSET): Use integer_asm_op.
	(ASM_OUTPUT_DWARF_PCREL): Likewise.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_DIFF_ELT, ASM_OUTPUT_ADDR_VEC_ELT): Avoid ASM_LONG.
	(ASM_SHORT, ASM_LONG): Remove.
	* config/m68k/m68k.h (INT_OP_GROUP): New macro.
	(INT_OP_STANDARD, INT_OP_DOT_WORD, INT_OP_NO_DOT, INT_OP_DC): New
	macros, the allowed values for INT_OP_GROUP.
	* config/m68k/amix.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP
	* config/m68k/atari.h (ASM_OUTPUT_ASCII): Likewise
	* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Likewise
	* config/m68k/auxas.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
	(INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m68k/dpx2.h (ASM_LONG): Undefine.
	(INT_OP_GROUP): Define to INT_OP_DC.
	* config/m68k/dpx2g.h (ASM_LONG): Undefine.
	* config/m68k/hp320.h (INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m68k/lynx.h (ASM_LONG): Undefine.
	* config/m68k/dpx2g.h (ASM_LONG): Undefine.
	* config/m68k/m68kelf.h (ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/m68k/m68kv4.h (ASM_OUTPUT_ASCII): Likewise.
	(TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_*.
	* config/m68k/mot3300.h (INT_OP_GROUP): Define to INT_OP_STANDARD
	for GAS and INT_OP_NO_DOT otherwise.
	(ASM_CHAR, ASM_BYTE, ASM_SHORT, ASM_LONG): Remove.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid ASM_LONG.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/m68k/sgs.h (BYTE_ASM_OP, WORD_ASM_OP, LONG_ASM_OP): Remove.
	(INT_OP_GROUP): Define to INT_OP_STANDARD.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT,
	ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Avoid LONG_ASM_OP.
	(ASM_OUTPUT_ASCII): Avoid BYTE_ASM_OP.
	* config/m68k/tower-as.h (ASM_LONG): Remove.
	(INT_OP_GROUP): Define to INT_OP_NO_DOT.
	* config/m88k/m88k.c (output_tdesc): Avoid ASM_LONG.
	* config/m88k/m88k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	(ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid ASM_LONG.
	* config/mips/iris5.h (TARGET_IRIX5): Define.
	* config/mips/mips.c (mips_assemble_integer): New.
	* config/mips/sni-svr4.h (ASM_LONG): Undefine.
	* config/mmix/mmix-protos.h (mmix_asm_output_double_int): Remove.
	* config/mmix/mmix.c (mmix_assemble_integer): New.
	(mmix_asm_output_double_int): Remove.
	(mmix_print_operand): Call mmix_output_octa directly.
	* config/mmix/mmix.h (ASM_LONG): Remove.
	* config/ns32k/ns32k.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_INT.
	* config/pa/pa.c (pa_assemble_integer): New.
	(pa_override_options): Only use aligned DI ops on 64-bit targets.
	Only use the unaligned ops if TARGET_GAS.
	* config/pdp11/pdp11.c (pdp11_assemble_integer): New.
	* config/pdp11/pdp11.h (TRAMPOLINE_TEMPLATE): Avoid ASM_OUTPUT_SHORT.
	* config/pj/pj.h (ASM_LONG): Undefine.
	* config/rs6000/linux64.h (RELOCATABLE_NEEDS_FIXUP): Undefine.
	* config/rs6000/rs6000.c (rs6000_assemble_integer): New, mostly
	extracted from ASM_OUTPUT_INT in sysv4.h.  Use in_text_section()
	and in_toc_section() rather than the in_section variable.
	(rs6000_override_options): Only use DI ops when TARGET_POWERPC64.
	* config/rs6000/sysv4.h (TOC_SECTION_FUNCTION): Add in_toc_section().
	(RELOCATABLE_NEEDS_FIXUP): Define.
	* config/rs6000/xcoff.h (DOUBLE_INT_ASM_OP): Change space to tab.
	* config/s390/linux.h (ASM_SHORT, ASM_LONG, ASM_QUAD): Remove.
	(ASM_OUTPUT_ADDR_VEC_ELT, ASM_OUTPUT_ADDR_DIFF_ELT): Use integer_asm_op
	to get the word directive.
	(ASM_OUTPUT_ASCII): Avoid ASM_BYTE_OP.
	* config/s390/s390.c (s390_assemble_integer): New.
	* config/s390/s390.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY): Use
	integer_asm_op to get the word directive.
	* config/sparc/sol2.h (ASM_SHORT, ASM_LONG): Remove.
	* config/sparc/sparc-protos.h (output_double_int): Remove.
	* config/sparc/sparc.c (output_double_int): Move to...
	(sparc_assemble_integer): ...this new function.
	(sparc_override_options): Only use .uaxword if TARGET_ARCH64.
	* config/sparc/sparc.h (ASM_SHORT, ASM_LONG, ASM_LONGLONG): Remove.
	* config/sparc/sysv4.h (ASM_LONG): Remove.
	(ASM_OUTPUT_LONG_DOUBLE, ASM_OUTPUT_DOUBLE, ASM_OUTPUT_FLOAT): Avoid
	ASM_LONG.
	* config/vax/vax.h (TRAMPOLINE_TEMPLATE): Use assemble_aligned_integer.
	* config/we32k/we32k.h (TRAMPOLINE_TEMPLATE): Likewise.

	* config/1750a/1750a.c, config/a29k/a29k.c, config/alpha/alpha.c,
	config/arc/arc.c, config/arm/arm.c, config/avr/avr.c, config/c4x/c4x.c,
	config/clipper/clipper.c, config/convex/convex.c, config/cris/cris.c,
	config/d30v/d30v.c, config/dsp16xx/dsp16xx.c, config/elxsi/elxsi.c,
	config/fr30/fr30.c, config/h8300/h8300.c, config/i370/i370.c,
	config/i386/i386.c, config/i860/i860.c, config/i960/i960.c,
	config/ia64/ia64.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
	config/m68k/m68k.c, config/m88k/m88k.c, config/mips/mips.c,
	config/mmix/mmix.c, config/mn10200/mn10200.c, config/mn10300/mn10300.c,
	config/ns32k/ns32k.c, config/pa/pa.c, config/pdp11/pdp11.c,
	config/sh/sh.c, config/sparc/sparc.c, config/stormy16/stormy16.c,
	config/v850/v850.c, config/vax/vax.c, config/we32k/we32k.c
	(TARGET_ASM_BYTE_OP, TARGET_ASM_ALIGNED_HI_OP,
	TARGET_ASM_ALIGNED_SI_OP, TARGET_ASM_ALIGNED_DI_OP,
	TARGET_ASM_UNALIGNED_HI_OP, TARGET_ASM_UNALIGNED_SI_OP,
	TARGET_ASM_UNALIGNED_DI_OP, TARGET_ASM_INTEGER): Redefine as
	appropriate.

	* config/defaults.h, config/darwin.h, config/elfos.h, config/svr3.h,
	config/1750a/1750a.h, config/a29k/a29k.h, config/alpha/alpha.h,
	config/arc/arc.h, config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
	config/clipper/clipper.h, config/convex/convex.h, config/cris/cris.h,
	config/d30v/d30v.h, config/dsp16xx/dsp16xx.h, config/elxsi/elxsi.h,
	config/fr30/fr30.h, config/h8300/h8300.h, config/i370/i370.h,
	config/i386/bsd.h, config/i386/djgpp.h, config/i386/i386.h,
	config/i386/sco5.h, config/i386/sol2.h, config/i386/sun386.h,
	config/i860/i860.h, config/i960/i960.h, config/ia64/ia64.h,
	config/m32r/m32r.h, config/m68hc11/m68hc11.h, config/m68k/auxas.h,
	config/m68k/dpx2.h, config/m68k/hp320.h, config/m68k/m68k.h,
	config/m68k/mot3300.h, config/m68k/sgs.h, config/m68k/tower-as.h,
	config/m88k/m88k.h, config/mcore/mcore-elf.h, config/mcore/mcore.h,
	config/mips/iris5.h, config/mips/iris6.h, config/mips/mips.h,
	config/mmix/mmix.h, config/mn10200/mn10200.h, config/mn10300/mn10300.h
	config/ns32k/encore.h, config/ns32k/ns32k.h, config/pa/pa-64.h,
	config/pa/pa.h, config/pdp11/pdp11.h, config/pj/pj.h,
	config/romp/romp.h, config/rs6000/linux64.h, config/rs6000/rs6000.h,
	config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/linux.h,
	config/sh/sh.h, config/sparc/linux64.h, config/sparc/sol2.h,
	config/sparc/sp64-elf.h, config/sparc/sparc.h, config/sparc/sysv4.h,
	config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vax.h,
	config/we32k/we32k.h (ASM_OUTPUT_CHAR, ASM_OUTPUT_BYTE, ASM_BYTE_OP,
	ASM_BYTE, ASM_OUTPUT_SHORT, ASM_OUTPUT_INT, ASM_OUTPUT_DOUBLE_INT,
	UNALIGNED_SHORT_ASM_OP, UNALIGNED_INT_ASM_OP,
	UNALIGNED_DOUBLE_INT_ASM_OP): Undefine, where defined.

From-SVN: r48101
2001-12-17 15:05:40 +00:00
Kaveh R. Ghazi 11f9ed1a84 avr.c (avr_simplify_comparision_p, [...]): Don't use the 'U' suffix.
* avr.c (avr_simplify_comparision_p, adjust_insn_length,
	mask_one_bit_p, output_reload_insisf): Don't use the 'U' suffix.
	* avr.h (reg_class): Likewise.
	* avr.md: Likewise.
	* mcore.c (try_constant_tricks, mcore_byte_offset,
	mcore_halfword_offset): Likewise.
	* sh.c (shl_sext_kind, gen_block_redirect, split_branches): Likewise.
	* v850.c (not_power_of_two_operand): Likewise.

From-SVN: r48073
2001-12-16 16:09:06 +00:00
Kaveh R. Ghazi ede75ee868 h8300.c (h8300_asm_named_section): Wrap with !OBJECT_FORMAT_ELF.
* h8300.c (h8300_asm_named_section): Wrap with !OBJECT_FORMAT_ELF.
	* m88k.c (m88k_svr3_asm_out_constructor,
	m88k_svr3_asm_out_destructor): Wrap with CTOR_LIST_BEGIN &&
	!OBJECT_FORMAT_ELF.
	* mcore.c (mcore_asm_named_section): Wrap with OBJECT_FORMAT_ELF.
	* sh.c (sh_asm_named_section): Wrap with !OBJECT_FORMAT_ELF.
	* sparc.c (sparc_elf_asm_named_section): Wrap with OBJECT_FORMAT_ELF.

From-SVN: r47515
2001-12-01 17:27:11 +00:00
Richard Kenner a06ef755a3 alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
* alias.c (nonoverlapping_memrefs): Use REGNO_PTR_FRAME_P.
	* emit-rtl.c (change_address): Fix typo in default alignment.
	(adjust_address_1): Use mode of NEW, not MODE, when setting size.
	* expr.c (highest_pow2_factor, case WITH_RECORD_EXPR): New case.
	* rtl.h (REGNO_PTR_FRAME_P): New macro.

	* expr.c (store_field): Pass tree instead of max size; callers changed.
	Change handling of alignment.
	Only copy to_rtx if is TARGET.
	(expand_expr_unaligned): Delete; callers now use expand_expr.
	(emit_cmp_insn): No longer take ALIGN parm; all callers changed.
	(expand_assignment): Change handling of alignment.
	Only copy to_rtx if was original.
	(get_inner_reference): No longer return alginment; callers changed.
	(expand_expr, case COMPONENT_REF): Change handling of alignment.
	(expand_expr, case ADDR_EXPR): Make copy if not sufficiently aligned.
	(compare_from_rtx): Delete ALIGN parm; all callers changed.
	(do_compare_rtx_and_jump): Likewise.
	* expr.h: Reflect above changes.
	* tree.h: Likewise.
	* dwarf2out.c (loc_descriptor_from_tree): Remove ALIGN parameter
	to get_inner_reference.
	* except.c: Remove ALIGN parameter in call to emit_cmp_and_jump_insns.
	* explow.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	(prepare_cmp_insn): Now static; remove ALIGN parm.  Callers changed.
	(emit_cmp_and_jump_insns): Remove ALIGN parm; all callers changed.
	* fold-const.c: Remove PALIGN in calls to get_inner_reference.
	* function.c (assign_stack_temp_for_type): No longer static.
	* optabs.h (emit_cmp_insn): Remove ALIGN parm.
	(prepare_cmp_insn): Delete declaration.
	* rtl.h (assign_stack_temp_for_type): Add declaration.
	* config/d30v/d30v.c: Reflect above changes.
	* config/i860/i860.c, config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c, config/sh/sh.c: Likewise.
	* ada/trans.c, ada/utils2.c: Remove PALIGN parameter to
	get_inner_reference.

From-SVN: r47075
2001-11-15 18:44:58 -05:00
Kaveh R. Ghazi 950a3816a7 alpha.c (unicosmk_special_name): Prototype.
* alpha.c (unicosmk_special_name): Prototype.
	(unicosmk_ssib_name): Delete unused variable.
	* alpha/unicosmk.h (common_section, ssib_section): Prototype.
	* alpha/vms.h (PREFIX): Undef before defining.
	* arm/pe.h (SUBTARGET_NAME_ENCODING_LENGTHS): Likewise.
	* i370/i370.c (mvs_hash_alias): Prototype.  Wrap with macro
	controlling usage.  Const-ify.
	(alias_number): Delete unused variable.
	* m32r/m32r.c (m32r_sched_init): Add missing argument.
	(m32r_expand_block_move): Fix uninitialized warnings.
	* mn10300/mn10300.h (REGNO_IN_RANGE_P): Fix 'unsigned >=0 is
	always true' warnings.
	* openbsd.h (TARGET_MEM_FUNCTIONS): Don't redefine.
	* sh/sh.c: Include "integrate.h".
	(output_far_jump): Fix uninitialized warning.
	* final.c (shorten_branches): Avoid automatic aggregate
	initialization.
	* integrate.c (subst_constants): Likewise.

From-SVN: r46932
2001-11-11 21:20:03 +00:00
Kaveh R. Ghazi 55710451f2 convex.c (convex_output_function_prologue): Fix format specifier warning.
* convex.c (convex_output_function_prologue): Fix format specifier
	warning.
	(asm_declare_function_name): Fix signed/unsigned warning.
	(print_operand): Fix format specifier warning.
	* convex.h (S_REGNO_P, A_REGNO_P): Fix signed/unsigned warning.
	* dsp16xx-protos.h (uns_comparison_operator,
	num_1600_core_shifts): Prototype.
	* dsp16xx.c: Include tm_p.h, not dsp16xx-protos.h.
	(frame_size, frame_pointer_offset): Delete.
	(dsp16xx_output_function_prologue, dsp16xx_output_function_epilogue):
	Make static.  Fix format specifier warnings.
	* dsp16xx.h (IS_ACCUM_REG): Fix unsigned>=0 warning.
	(EXTRA_SECTION_FUNCTIONS): Prototype const_section.
	* dsp16xx.md: Add default case in switches.
	* fr30.h (IN_RANGE): Delete.
	* ia64.h (ASM_OUTPUT_MI_THUNK): Fix format specifier warnings.
	* mcore-protos.h (mcore_output_cmov): Const-ify.
	* mcore.c (mcore_output_cmov): Likewise.
	* mcore.h (switch_to_section): Make static and prototype.
	* mn10200.h (REGNO_OK_FOR_INDEX_P, REG_OK_FOR_INDEX_P): Fix
	unsigned>=0 warnings.
	* mn10300.h (REGNO_IN_RANGE_P): Likewise.
	* rs6000-protos.h (read_only_data_section,
	read_only_private_data_section): Prototype.
	* rs6000.h (ASM_OUTPUT_BYTE): Fix format specifier warning.
	* sh.c (sh_adjust_cost): Mark parameter with ATTRIBUTE_UNUSED.
	* sh.h (GENERAL_REGISTER_P): Fix unsigned>=0 warning.

From-SVN: r46758
2001-11-04 02:40:39 +00:00
Joseph Myers 91d231cb91 Table-driven attributes.
* c-decl.c, config/alpha/alpha.c, config/arc/arc.c,
	config/arm/arm.c, config/arm/pe.c, config/avr/avr.c,
	config/avr/avr.h, config/d30v/d30v.h, config/fr30/fr30.h,
	config/h8300/h8300.c, config/i386/cygwin.h, config/i386/winnt.c,
	config/m32r/m32r.c, config/mcore/mcore.c, config/sh/sh.c,
	config/stormy16/stormy16.h, config/v850/v850.c, doc/c-tree.texi,
	doc/tm.texi, ggc-common.c, integrate.c, print-tree.c, tree.c,
	tree.h: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
	* tree.h (struct tree_decl): Change machine_attributes to
	attributes.
	* doc/c-tree.texi: Document that all attributes are now attached
	to decls and types.
	* c-common.c (add_attribute, attrtab, attrtab_idx,
	default_valid_lang_attribute, valid_lang_attribute): Remove.
	(attribute_tables, attributes_initialized,
	c_common_attribute_table, default_lang_attribute_table): New
	variables.
	(handle_packed_attribute, handle_nocommon_attribute,
	handle_common_attribute, handle_noreturn_attribute,
	handle_unused_attribute, handle_const_attribute,
	handle_transparent_union_attribute, handle_constructor_attribute,
	handle_destructor_attribute, handle_mode_attribute,
	handle_section_attribute, handle_aligned_attribute,
	handle_weak_attribute, handle_alias_attribute,
	handle_no_instrument_function_attribute,
	handle_no_check_memory_usage_attribute, handle_malloc_attribute,
	handle_no_limit_stack_attribute, handle_pure_attribute): New
	functions.
	(init_attributes, decl_attributes): Rewrite to implement
	table-driven attributes.
	* c-common.h (enum attribute_flags): Move to tree.h.
	* c-format.c (decl_handle_format_attribute,
	decl_handle_format_arg_attribute): Rename to
	handle_format_attribute and handle_format_arg_attribute.  Update
	for table-driven attributes.
	* c-common.h (decl_handle_format_attribute,
	decl_handle_format_arg_attribute): Remove prototypes.
	(handle_format_attribute, handle_format_arg_attribute): Add
	prototypes.
	* c-decl.c (grokdeclarator): Handle attributes nested inside
	declarators.
	* c-parse.in (setattrs, maybe_setattrs): Remove.
	(maybe_type_quals_setattrs): Rename to maybe_type_quals_attrs.
	Update to handle nested attributes properly.
	(maybe_resetattrs, after_type_declarator,
	parm_declarator_nostarttypename, notype_declarator, absdcl1_noea,
	absdcl1_ea, direct_absdcl1): Update to handle nested attributes
	properly.
	(make_pointer_declarator): Update to handle nested attributes
	properly.
	* doc/extend.texi: Update documentation of limits of attributes
	syntax.  Warn about problems with attribute semantics in C++.
	* target.h (struct target): Remove valid_decl_attribute and
	valid_type_attribute.  Add attribute_table and
	function_attribute_inlinable_p.
	* target-def.h (TARGET_VALID_DECL_ATTRIBUTE,
	TARGET_VALID_TYPE_ATTRIBUTE): Remove.
	(TARGET_ATTRIBUTE_TABLE, TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P):
	Add.
	(TARGET_INITIALIZER): Update.
	* integrate.c (FUNCTION_ATTRIBUTE_INLINABLE_P): Remove default
	definition.
	(function_attribute_inlinable_p): New function.  Check for the
	presence of any machine attributes before using
	targetm.function_attribute_inlinable_p.
	(function_cannot_inline_p): Update.
	* Makefile.in (integrate.o): Update dependencies.
	* doc/tm.texi: Update documentation of target attributes and
	example definition of TARGET_VALID_TYPE_ATTRIBUTE.
	* tree.c (default_valid_attribute_p, valid_machine_attribute):
	Remove.
	(default_target_attribute_table,
	default_function_attribute_inlinable_p): New.
	(lookup_attribute): Update comment to clarify handling of multiple
	attributes with the same name.
	(merge_attributes, attribute_list_contained): Allow multiple
	attributes with the same name but different arguments to appear in
	the same attribute list.
	* tree.h (default_valid_attribute_p): Remove prototype.
	(struct attribute_spec): New.
	(default_target_attribute_table): Declare.
	(enum attribute_flags): Move from c-common.h.  Add
	ATTR_FLAG_TYPE_IN_PLACE.
	(default_function_attribute_inlinable_p): Declare.
	* config/alpha/alpha.c (vms_valid_decl_attribute_p): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(vms_attribute_table): New.
	* config/arc/arc.c (arc_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(arc_attribute_table, arc_handle_interrupt_attribute): New.
	* config/arm/arm.c (arm_valid_type_attribute_p,
	arm_valid_decl_attribute_p, arm_pe_valid_decl_attribute_p):
	Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
	define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(arm_attribute_table, arm_handle_fndecl_attribute,
	arm_handle_isr_attribute): New.
	* config/avr/avr.c (avr_valid_type_attribute,
	avr_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE, TARGET_VALID_TYPE_ATTRIBUTE): Don't
	define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(avr_attribute_table, avr_handle_progmem_attribute,
	avr_handle_fndecl_attribute): New.
	* config/c4x/c4x.c (c4x_valid_type_attribute_p): Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(c4x_attribute_table, c4x_handle_fntype_attribute): New.
	* config/h8300/h8300.c (h8300_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(h8300_attribute_table, h8300_handle_fndecl_attribute,
	h8300_handle_eightbit_data_attribute,
	h8300_handle_tiny_data_attribute): New.
	* config/i386/i386-protos.h (ix86_valid_type_attribute_p,
	i386_pe_valid_decl_attribute_p, i386_pe_valid_type_attribute_p):
	Remove prototypes.
	(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New
	declarations.
	* config/i386/i386.c (ix86_valid_type_attribute_p: Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE, TARGET_VALID_DECL_ATTRIBUTE): Don't
	define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(ix86_attribute_table, ix86_handle_cdecl_attribute,
	ix86_handle_regparm_attribute): New.
	* config/i386/winnt.c (i386_pe_valid_decl_attribute_p,
	i386_pe_valid_type_attribute_p): Remove.
	(ix86_handle_dll_attribute, ix86_handle_shared_attribute): New.
	* config/ia64/ia64.c (ia64_valid_type_attribute): Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(ia64_attribute_table): New.
	* config/m32r/m32r.c (m32r_valid_decl_attribute, interrupt_ident1,
	interrupt_ident2, model_ident1, model_ident2): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(init_idents): Update.
	(m32r_attribute_table, m32r_handle_model_attribute): New.
	* config/m68hc11/m68hc11.c (m68hc11_valid_type_attribute_p):
	Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(m68hc11_attribute_table, m68hc11_handle_fntype_attribute): New.
	* config/mcore/mcore.c (mcore_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(mcore_attribute_table, mcore_handle_naked_attribute): New.
	* config/ns32k/ns32k.c (ns32k_valid_type_attribute_p): Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(ns32k_attribute_table, ns32k_handle_fntype_attribute): New.
	* config/rs6000/rs6000.c (rs6000_valid_type_attribute_p): Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(rs6000_attribute_table, rs6000_handle_longcall_attribute): New.
	* config/sh/sh.c (sh_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(sh_attribute_table, sh_handle_interrupt_handler_attribute,
	sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
	New.
	* config/stormy16/stormy16.c (stormy16_valid_type_attribute):
	Remove.
	(TARGET_VALID_TYPE_ATTRIBUTE): Don't define
	(TARGET_ATTRIBUTE_TABLE): Define.
	(stormy16_attribute_table, stormy16_handle_interrupt_attribute):
	New.
	* config/v850/v850.c (v850_valid_decl_attribute): Remove.
	(TARGET_VALID_DECL_ATTRIBUTE): Don't define.
	(TARGET_ATTRIBUTE_TABLE): Define.
	(v850_attribute_table, v850_handle_interrupt_attribute,
	v850_handle_data_area_attribute): New.
	* config/v850/v850-c.c (mark_current_function_as_interrupt):
	Return void.  Call decl_attributes instead of
	valid_machine_attribute.

cp:
	Table-driven attributes.
	* decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
	* decl2.c (cplus_decl_attributes): Only take one attributes
	parameter.
	* cp-tree.c (cplus_decl_attributes): Update prototype.
	* class.c (finish_struct), decl.c (start_decl, start_function),
	decl2.c (grokfield), friend.c (do_friend), parse.y
	(parse_bitfield): Update calls to cplus_decl_attributes.
	* decl.c (grokdeclarator): Take a pointer to a single ordinary
	attribute list.
	* decl.h (grokdeclarator): Update prototype.
	* decl2.c (grokfield): Take a single ordinary attribute list.
	* friend.c (do_friend): Likewise.
	* decl.c (shadow_tag, groktypename, start_decl,
	start_handler_parms, grokdeclarator, grokparms, start_function,
	start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
	parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
	(process_template_parm, do_decl_instantiation): Pass single
	ordinary attribute lists around.
	* decl.c (grokdeclarator): Correct handling of nested attributes.
	Revert the patch
	1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
		* decl.c (grokdeclarator): Embedded attrs bind to the right,
		not the left.
	.
	* cp-tree.h (cp_valid_lang_attribute): Remove declaration
	(cp_attribute_table): Declare.
	* decl.c (valid_lang_attribute): Don't define.
	(lang_attribute_table): Define.
	(init_decl_processing): Initialize lang_attribute_table instead of
	valid_lang_attribute.
	* tree.c (cp_valid_lang_attribute): Remove.
	(handle_java_interface_attribute, handle_com_interface_attribute,
	handle_init_priority_attribute): New functions.
	(cp_attribute_table): New array.
	* decl2.c (import_export_class): Don't use
	targetm.valid_type_attribute.

testsuite:
	Table-driven attributes.
	* g++.dg/ext/attrib1.C: New test.

From-SVN: r45718
2001-09-21 02:27:06 +01:00
J"orn Rennecke 3007d592bf sh-protos.h (sh_pr_n_sets): Declare.
* sh-protos.h (sh_pr_n_sets): Declare.
	* sh.c (calc_live_regs): If the initial value for PR has been copied,
	look at the copy to determine if PR needs to be saved.
	sh_pr_n_sets: New function.
	* sh.h (RETURN_ADDR_RTX): Use get_hard_reg_initial_val.
	(ALLOCATE_INITIAL_VALUE): Define.

	* sh.c (initial_elimination_offset):
	Fix RETURN_ADDRESS_POINTER_REGNUM case.

From-SVN: r45717
2001-09-21 01:53:28 +01:00
J"orn Rennecke c762ab6ebb sh.c (shiftcosts): Don't use shiftcosts array for modes wider than SImode.
* sh.c (shiftcosts): Don't use shiftcosts array for modes wider
	than SImode.

From-SVN: r45709
2001-09-20 15:25:11 +01:00
Alexandre Oliva 300c545386 Whitespace fixes.
From-SVN: r45587
2001-09-14 05:02:00 +00:00
Andreas Jaeger 6b8c9327ed gcse.c (add_label_notes): REG_LABEL is an INSN_LIST.
* gcse.c (add_label_notes): REG_LABEL is an INSN_LIST.
	* loop.c (add_label_notes): Likewise.
	* reload.c (find_reloads): Likewise.
	* config/sh/sh.c (machine_dependent_reorg): Likewise.

From-SVN: r45320
2001-08-31 16:49:37 +02:00
Zack Weinberg c237e94a5f haifa-sched.c: Convert to target hooks.
* haifa-sched.c: Convert to target hooks.  Macros replaced
	are ISSUE_RATE, ADJUST_COST, ADJUST_PRIORITY, MD_SCHED_INIT,
	MD_SCHED_REORDER, MD_SCHED_REORDER2, MD_SCHED_VARIABLE_ISSUE,
	MD_SCHED_FINISH, and HAVE_cycle_display.
	* target-def.h (TARGET_SCHED_ADJUST_COST,
	TARGET_SCHED_ADJUST_PRIORITY, TARGET_SCHED_ISSUE_RATE,
	TARGET_SCHED_VARIABLE_ISSUE, TARGET_SCHED_INIT,
	TARGET_SCHED_FINISH, TARGET_SCHED_REORDER,
	TARGET_SCHED_REORDER2, TARGET_SCHED_CYCLE_DISPLAY):
	New hook #defines to be overridden.
	(TARGET_SCHED): Bring them all together.
	(TARGET_INITIALIZER): Update.
	* target.h: Don't forward declare struct rtx_def.  Use 'rtx'
	instead of 'struct rtx_def *' throughout.
	(struct sched): New set of hooks for the scheduler.
	* Makefile.in (haifa-sched.o): Depend on target.h.
	* doc/tm.texi: Document the new scheduler hooks, together in
	their own section, instead of scattered around.
	Fix a bunch of underfull/overfull hboxes.

	* a29k.h, alpha.h, arm.h, c4x.h, convex.h, d30v.h, i386.h,
	ia64.h, m32r.h, m88k.h, mips.h, pa.h, rs6000.h, s390.h, sh.h,
	sparc.h: Don't define any of the old scheduler macros.

	* a29k.c, alpha.c, arm.c, c4x.c, convex.c, d30v.c, i386.c,
	ia64.c, m32r.c, m88k.c, mips.c, pa.c, rs6000.c, s390.c, sh.c,
	sparc.c: Create hook functions from code extracted from
	corresponding target header, or make existing hooks static, as
	appropriate.  Set the appropriate entries in targetm.

	* alpha-protos.h, arm-protos.h, c4x-protos.h, d30v-protos.h,
	i386-protos.h, ia64-protos.h, m32r-protos.h, pa-protos.h,
	rs6000-protos.h, s390-protos.h, sparc-protos.h:
	Remove prototypes for functions which are now static.

	* d30v.h, d30v.c, m32r.h, m32r.c: Remove #ifdef HAIFA and
	related gunk; the Haifa scheduler is now the only choice.

From-SVN: r45009
2001-08-18 20:25:54 +00:00
Richard Henderson 715bdd29f3 varasm.c (named_section_flags): Remove align parameter.
* varasm.c (named_section_flags): Remove align parameter.
        * varasm.c, dwarf2out.c: Update all callers.
        * output.h: Update prototypes.

        * target.h (target.asm_out.named_section): Remove align parameter.
        * varasm.c, config/a29k/a29k.c, config/alpha/alpha.c,
        config/arm/arm.c, config/c4x/c4x.c, config/h8300/h8300.c,
        config/i386/i386.c, config/i386/winnt.c, config/m68k/m68k.c,
        config/mcore/mcore.c, config/mips/mips.c, config/rs6000/rs6000.c,
        config/sh/sh.c, config/sparc/sparc.c: Update implementations to match.

        * varasm.c (in_named_entry_eq, in_named_entry_hash): New.
        (get_named_section_flags, set_named_section_flags): New.
        (named_section_flags): Use them.
        (named_section): Do decl vs section flags check here...
        (default_section_type_flags): ... not here.
        (init_varasm_once): Create in_named_htab.
        (resolve_unique_section): Mark reloc unused.

From-SVN: r44953
2001-08-16 19:33:41 -07:00
Zack Weinberg e78d8e5137 expr.h: Split out optab- and libfunc-related code to...
* expr.h: Split out optab- and libfunc-related code to...
	* optabs.h, libfuncs.h: ... these new headers.

	* Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
	(OPTABS_H): New.
	(various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
	dependencies.
	* mkconfig.sh: Don't include insn-codes.h from config.h.

	* reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
	enum insn_code is available.  Move reload_in_optab and
	reload_out_optab array declarations to optabs.h.
	* regmove.c (gen_add3_insn): Move to optabs.c, export from
	there, prototype in expr.h.
	* gencodes.c: Cleanup: zap global variables, don't use
	printf where puts will do, don't bother defining MAX_INSN_CODE
	which nothing uses, let CODE_FOR_nothing get its value implicitly.

	* genemit.c, genopinit.c: Include optabs.h in generated file.
	* genoutput.c: Include insn-codes.h in generated file.
	* builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
	expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c,
	reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c,
	config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
	config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
	Include optabs.h.
	* builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c,
	optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
	config/m88k/m88k.c, config/sparc/sparc.c:
	Include libfuncs.h.
	* reload.c: Include expr.h and optabs.h before reload.h.
	* config/alpha/alpha.c: Include tree.h before reload.h.
	* config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
	and reload.h in that order.
	* config/sparc/sparc.c: Include debug.h.
	* recog.c: Include insn-codes.h.

cp:
	* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
	* except.c: Include libfuncs.h.
java:
	* Make-lang.in (java/decl.o): Update dependencies.
	* decl.c: Include libfuncs.h, don't include toplev.h.

From-SVN: r44858
2001-08-13 15:56:51 +00:00
Hans-Peter Nilsson 12355aec53 sh.c (sh_asm_named_section): Fix typo in align parameter in last change.
* config/sh/sh.c (sh_asm_named_section): Fix typo in align
	parameter in last change.

From-SVN: r44640
2001-08-05 02:08:24 +00:00
Richard Henderson 7c262518a4 target.h (gcc_target): Add asm_out.named_section, section_type_flags, have_named_sections.
* target.h (gcc_target): Add asm_out.named_section,
	section_type_flags, have_named_sections.
	* target-def.h (TARGET_ASM_NAMED_SECTION): New.
	(TARGET_HAVE_NAMED_SECTIONS): New.
	(TARGET_SECTION_TYPE_FLAGS): New.

	* Makefile.in (toplev.o): Depend on TARGET_H.
	(varasm.o, dbxout.o): Likewise.
	* c-common.c (decl_attributes): Check targetm.have_named_sections
	instead of ifdef ASM_OUTPUT_SECTION_NAME.
	* dbxout.c (dbxout_function_decl): Likewise.
	(dbxout_function_end): Likewise.
	* toplev.c (compile_file): Likewise.
	* varasm.c (exception_section): Likewise.
	* cp/decl2.c (finish_objects): Likewise.

	* defaults.h (EH_FRAME_SECTION): Remove.
	(EH_FRAME_SECTION_ASM_OP): Remove.
	(EH_FRAME_SECTION_NAME): New.
	(UNIQUE_SECTION): Don't depend on ASM_OUTPUT_SECTION_NAME.
	(UNIQUE_SECTION_P): Remove.
	* dwarf2out.c (SECTION_FORMAT): Remove.
	(ASM_OUTPUT_SECTION): Remove.
	(output_call_frame_info): Use named_section_flags.
	(output_comp_unit, dwarf2out_start_source_file): Likewise.
	(dwarf2out_end_source_file, dwarf2out_define): Likewise.
	(dwarf2out_undef, dwarf2out_init, dwarf2out_finish): Likewise.
	* varasm.c (in_eh_frame, eh_frame_section): Remove.
	(named_section_flags): New.
	(named_section): Use it and targetm.section_type_flags.
	(resolve_unique_section): New.
	(assemble_start_function): Use it.
	(asm_emit_uninitialised, assemble_variable): Likewise.
	(default_section_type_flags): New.
	(default_no_named_section, default_elf_asm_named_section): New.
	(default_coff_asm_named_section, default_pe_asm_named_section): New.
	* output.h: Update varasm.c decls.
	(SECTION_*): New flags.

	* crtstuff.c: Check EH_FRAME_SECTION_NAME not EH_FRAME_SECTION_ASM_OP.
	(__EH_FRAME_BEGIN__, __FRAME_END__): Use attribute section.

	* config/elfos.h (UNIQUE_SECTION_P): Remove.
	* config/alpha/elf.h, config/arm/linux-elf.h: Likewise.
	* config/arm/pe.h, config/arm/unknown-elf.h: Likewise.
	* config/i386/cygwin.h, config/i386/djgpp.h: Likewise.
	* config/i386/i386-interix.h, config/i386/win32.h: Likewise.
	* config/ia64/sysv4.h, config/mcore/mcore-pe.h: Likewise.
	* config/mips/elf.h, config/mips/elf64.h: Likewise.
	* config/mips/iris6gld.h, config/mips/mips.h: Likewise.
	* config/pa/pa64-hpux.h,

	* config/elfos.h (ASM_OUTPUT_SECTION_NAME): Remove.
	(TARGET_ASM_NAMED_SECTION): New.
	* config/psos.h, config/a29k/a29k.h, config/alpha/elf.h: Likewise.
	* config/alpha/vms.h, config/arm/coff.h: Likewise.
	* config/arm/conix-elf.h, config/arm/elf.h: Likewise.
	* config/arm/linux-elf.h, config/arm/pe.h: Likewise.
	* config/arm/unknown-elf.h, config/avr/avr.h: Likewise.
	* config/c4x/c4x.h, config/h8300/h8300.h: Likewise.
	* config/i386/cygwin.h, config/i386/djgpp.h: Likewise.
	* config/i386/i386-interix.h, config/i386/i386elf.h : Likewise.
	* config/i386/sco5.h, config/i386/win32.h: Likewise.
	* config/m68k/coff.h, config/mcore/mcore-pe.h: Likewise.
	* config/mcore/mcore.h, config/mips/elf.h: Likewise.
	* config/mips/elf64.h, config/mips/iris6.h: Likewise.
	* config/mips/netbsd.h, config/mips/openbsd.h: Likewise.
	* config/pa/pa64-hpux.h, config/rs6000/sysv4.h: Likewise.
	* config/rs6000/xcoff.h, config/sh/sh.h: Likewise.
	* config/sparc/sysv4.h: Likewise.

	* config/nextstep.h: Error until named sections implemented.

	* config/a29k/a29k.c (a29k_asm_named_section): New.
	* config/alpha/alpha.c (SECTION_VMS_OVERLAY): New.
	(vms_section_type_flags, vms_asm_named_section): New.
	* config/arm/arm.c (arm_elf_asm_named_section): New.
	* config/avr/avr.c (asm_output_section_name): Remove.
	* config/avr/avr-protos.h: Update.
	* config/c4x/c4x.c (c4x_asm_named_section): New.
	* config/h8300/h8300.c (h8300_asm_named_section): New.
	* config/i386/i386.c (sco_asm_named_section): New.
	* config/i386/winnt.c (SECTION_PE_SHARED): New.
	(i386_pe_section_type_flags): New.
	(i386_pe_asm_named_section): New.
	* config/i386/i386-protos.h: Update.
	* config/m68k/m68k.c (m68k_coff_asm_named_section): New.
	* config/mcore/mcore.c (mcore_asm_named_section): New.
	* config/mips/mips.c (iris6_asm_named_section): New.
	* config/mips/mips.h (ENCODE_SECTION_INFO): Use DECL_ONE_ONLY
	instead of UNIQUE_SECTION_P.
	* config/rs6000/rs6000.c (rs6000_elf_section_type_flags): New.
	(xcoff_asm_named_section): New.
	* config/sh/sh.c (sh_asm_named_section): New.
	* config/sparc/sparc.c (sparc_elf_asm_named_section): New.

	* config/i386/djgpp.h (EH_FRAME_SECTION_ASM_OP): Remove.
	* config/i386/sco5.h (EH_FRAME_SECTION_ASM_OP*): Remove.
	(EH_FRAME_SECTION_NAME): New.
	(EXCEPTION_SECTION): New.
	* config/ia64/ia64.h (EH_FRAME_SECTION_ASM_OP): Remove.
	(DEBUG_*_SECTION): Remove.
	* config/m68k/rtemself.h (EH_FRAME_SECTION_ASM_OP): Remove.
	* config/mips/iris6.h (DEBUG_*_SECTION): Remove.
	(EH_FRAME_SECTION_ASM_OP): Remove.

	* doc/tm.texi (UNIQUE_SECTION_P): Remove.
	(ASM_OUTPUT_SECTION_NAME): Remove.
	(TARGET_ASM_NAMED_SECTION): New.
	(TARGET_HAVE_NAMED_SECTIONS): New.
	(TARGET_SECTION_TYPE_FLAGS): New.
	(EH_FRAME_SECTION_ASM_OP): Remove.
	(EH_FRAME_SECTION_NAME): New.

From-SVN: r44623
2001-08-03 18:31:41 -07:00
Jan Hubicka 6f862f2fa9 recog.c (split_all_insns_noflow): New.
* recog.c (split_all_insns_noflow): New.
	* rtl.h (split_all_insns_noflow): Declare.
	* ia64.c (ia64_reorg): Use split_all_insns_noflow.
	* m68hc11.c (m68hc11_reorg): Likewise.
	* sh.c (machine_dependent_reorg): Likewise.
	* toplev.c (rest_of_compilation): Likewise for last split_all_insns
	call.

From-SVN: r44312
2001-07-24 18:34:07 +00:00
Andrew Haley 2b9d17c73c sh.c (barrier_align): Check that an operand really is an insn before extracting its INSN_CODE.
2001-07-18  Andrew Haley  <aph@cambridge.redhat.com>

        * config/sh/sh.c (barrier_align): Check that an operand really is
        an insn before extracting its INSN_CODE.

From-SVN: r44303
2001-07-24 15:25:51 +00:00
Andrew Haley 6e7b03e1f5 tm.texi (MD_CAN_REDIRECT_BRANCH): New macro.
2001-07-13  Andrew Haley  <aph@redhat.com>

        * doc/tm.texi (MD_CAN_REDIRECT_BRANCH): New macro.
        * config/sh/sh.h (MD_CAN_REDIRECT_BRANCH): New macro.
        * config/sh/sh.c (sh_can_redirect_branch): New function.
        * config/sh/sh-protos.h (sh_can_redirect_branch): Declare.
        * reorg.c (steal_delay_list_from_target): Use
        MD_CAN_REDIRECT_BRANCH to see if redirection is possible.

From-SVN: r44269
2001-07-23 16:00:06 +00:00