This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [arm] EABI array cookies
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Paul Brook <paul at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, libstdc++ at gcc dot gnu dot org
- Date: Tue, 29 Jun 2004 13:46:54 +0100
- Subject: Re: [arm] EABI array cookies
- References: <200406291317.06964.paul@codesourcery.com>
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.