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]

IA64 HP-UX patch for C++ (Modified)


This is a resubmit of an earlier patch and uses build_c_cast instead of
build1 on a change needed for the HP-UX 32 bit IA64 g++ compiler.  I
also added a second change that I missed the first time to use
TARGET_VTABLE_DATA_ENTRY_DISTANCE instead of 1 in
add_vcall_offset_vtbl_entries_1.  For other platforms this macro is set
to 1 by default and they will not be affected by this change.

Steve Ellcey
sje@cup.hp.com


2002-09-30  Steve Ellcey  <sje@cup.hp.com>

	* class.c (build_vtbl_initializer): Add cast.
	(add_vcall_offset_vtbl_entries_1):
	Use TARGET_VTABLE_DATA_ENTRY_DISTANCE for offset.


*** gcc.orig/gcc/cp/class.c	Wed Sep 25 09:21:48 2002
--- gcc/gcc/cp/class.c	Mon Sep 30 09:39:37 2002
*************** build_vtbl_initializer (binfo, orig_binf
*** 7501,7507 ****
  	  int i;
  
  	  for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! 	    add = tree_cons (NULL_TREE, null_pointer_node, add);
  	  *prev = add;
  	}
      }
--- 7501,7510 ----
  	  int i;
  
  	  for (i = 1; i < TARGET_VTABLE_DATA_ENTRY_DISTANCE; ++i)
! 	    add = tree_cons (NULL_TREE,
! 			     build_c_cast (vtable_entry_type,
! 				     size_zero_node),
! 			     add);
  	  *prev = add;
  	}
      }
*************** add_vcall_offset_vtbl_entries_1 (binfo, 
*** 7946,7952 ****
  
        /* The next vcall offset will be found at a more negative
  	 offset.  */
!       vid->index = size_binop (MINUS_EXPR, vid->index, ssize_int (1));
  
        /* Keep track of this function.  */
        VARRAY_PUSH_TREE (vid->fns, derived_virtuals);
--- 7949,7956 ----
  
        /* The next vcall offset will be found at a more negative
  	 offset.  */
!       vid->index = size_binop (MINUS_EXPR, vid->index,
! 			       ssize_int (TARGET_VTABLE_DATA_ENTRY_DISTANCE));
  
        /* Keep track of this function.  */
        VARRAY_PUSH_TREE (vid->fns, derived_virtuals);


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