This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [arm] EABI array cookies


On Tue, 2004-06-29 at 13:17, Paul Brook wrote:
> The patch implements ARM C++ EABI compliant array cookies.
> These have a fixed size of 8 bytes, and contain both the element size and 
> number of elements.
> 
> Bootstrapped on i686-linux and tested with cross to arm-none-elf.
> Ok?
> 
> Paul
> 
> 2004-06-29  Paul Brook  <paul@codesourcery.com>
> 
> gcc/
> 	* target-def.h (TARGET_CXX_GET_COOKIE_SIZE,
> 	TARGET_CXX_COOKIE_HAS_SIZE): Define.
> 	(TARGET_CXX): Use them.
> 	* target.h (struct gcc_target): Add cxx.get_cookie_size and
> 	cxx.cookie_has_size.
> 	* targhooks.c (default_cxx_get_cookie_size): New fucntion.
> 	* targhooks.h (default_cxx_get_cookie_size): Add prototype.
> 	* config/arm/arm.c (TARGET_CXX_GET_COOKIE_SIZE,
> 	TARGET_CXX_COOKIE_HAS_SIZE): Define.
> 	(arm_get_cookie_size, arm_cookie_has_size): New functions.
> 	* Make-lang.in (cp/init.o): Add dependency on $(TARGET_H).
> 	* init.c: Include target.h.
> 	(get_cookie_size): Remove and replace with target hook.
> 	Update callers.
> 	(build_new_1): Store the element size in the cookie.
> libstdc++-v3/
> 	* libsupc++/vec.cc (__cxa_vec_new2, __cxa_vec_new3): Store the
> 	element size in the cookie.
> testsuite/
> 	* g++.old-deja/g++.abi/arraynew.C: Handle ARM EABI cookies.
> 	* g++.old-deja/g++.abi/cxa_vec.C: Allocate larger cookies for AEABI.
> 

You're missing the documentation for the new hooks again...

Also:


> +/* The EABI specifies that all array cookies and 8 bytes long.  */
> +
                                                       ^^^
Are

Other than that it looks OK, but you should let a libstdc++ maintainer
comment as well.

R.


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