This is the mail archive of the 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: [arm] Tweak C++ guard variables

Paul Brook wrote:

The patch below changes guard variables for static one-time construction in line with the arm c++ eabi.
It consists of two changes:
- The guard variable is a (32-bit) int, not long long.
- It sets/tests the least significant bit, rather than the first byte.

Technically the g++ and libstdc++ changes are independent because the compiler doesn't use the helper function, but it makes sense to keep them in sync.

I've enabled the changes unconditionally (on arm targets). I'm not sure if this is desirable, or if they should only be enables when an eabi based abi is used.

I think they should only be used when the EABI is enabled so that ARM GNU/Linux (for example) doesn't see an ABI change.

These two functions need comments:

+static tree
+arm_cxx_guard_type (void)
+ return integer_type_node;
+static bool
+arm_cxx_guard_mask_bit (void)
+ return TRUE;

Index: libstdc++-v3/libsupc++/cxxabi.h
RCS file: /var/cvsroot/gcc-cvs/gcc/libstdc++-v3/libsupc++/cxxabi.h,v
retrieving revision 1.16
diff -u -p -r1.16 cxxabi.h
--- libstdc++-v3/libsupc++/cxxabi.h	22 May 2004 21:07:28 -0000	1.16
+++ libstdc++-v3/libsupc++/cxxabi.h	24 Jun 2004 14:32:52 -0000
@@ -44,6 +44,11 @@

#include <stddef.h>
+/* ??? We should probably define this in the compiler. */

Yes, we should, but this is probably OK for now.

OK with those changes.


Mark Mitchell
CodeSourcery, LLC
(916) 791-8304

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