This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] use symbol_ref flags for rs6000


	Will the appended patch make everyone happy?

David


Index: rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.463
diff -c -p -r1.463 rs6000.c
*** rs6000.c	1 May 2003 17:05:17 -0000	1.463
--- rs6000.c	2 May 2003 01:02:35 -0000
*************** symbol_ref_operand (op, mode)
*** 2073,2079 ****
    if (mode != VOIDmode && GET_MODE (op) != mode)
      return 0;
  
!   return (GET_CODE (op) == SYMBOL_REF);
  }
  
  /* Return 1 if the operand, used inside a MEM, is a valid first argument
--- 2073,2080 ----
    if (mode != VOIDmode && GET_MODE (op) != mode)
      return 0;
  
!   return (GET_CODE (op) == SYMBOL_REF
! 	  && (DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op)));
  }
  
  /* Return 1 if the operand, used inside a MEM, is a valid first argument
*************** current_file_function_operand (op, mode)
*** 2102,2118 ****
       rtx op;
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
!   if (GET_CODE (op) == SYMBOL_REF
!       && (SYMBOL_REF_LOCAL_P (op)
! 	  || (op == XEXP (DECL_RTL (current_function_decl), 0))))
!     {
! #ifdef ENABLE_CHECKING
!       if (!SYMBOL_REF_FUNCTION_P (op))
! 	abort ();
! #endif
!       return 1;
!     }
!   return 0;
  }
  
  /* Return 1 if this operand is a valid input for a move insn.  */
--- 2103,2112 ----
       rtx op;
       enum machine_mode mode ATTRIBUTE_UNUSED;
  {
!   return (GET_CODE (op) == SYMBOL_REF
! 	  && (DEFAULT_ABI != ABI_AIX || SYMBOL_REF_FUNCTION_P (op))
! 	  && (SYMBOL_REF_LOCAL_P (op)
! 	      || (op == XEXP (DECL_RTL (current_function_decl), 0))));
  }
  
  /* Return 1 if this operand is a valid input for a move insn.  */
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.250
diff -c -p -r1.250 rs6000.md
*** rs6000.md	1 May 2003 17:05:18 -0000	1.250
--- rs6000.md	2 May 2003 01:02:35 -0000
***************
*** 10089,10094 ****
--- 10089,10095 ----
    operands[0] = XEXP (operands[0], 0);
  
    if (GET_CODE (operands[0]) != SYMBOL_REF
+       || (DEFAULT_ABI == ABI_AIX && !SYMBOL_REF_FUNCTION_P (operands[0]))
        || (INTVAL (operands[2]) & CALL_LONG) != 0)
      {
        if (INTVAL (operands[2]) & CALL_LONG)
***************
*** 10136,10141 ****
--- 10137,10143 ----
    operands[1] = XEXP (operands[1], 0);
  
    if (GET_CODE (operands[1]) != SYMBOL_REF
+       || (DEFAULT_ABI == ABI_AIX && !SYMBOL_REF_FUNCTION_P (operands[1]))
        || (INTVAL (operands[3]) & CALL_LONG) != 0)
      {
        if (INTVAL (operands[3]) & CALL_LONG)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]