diff options
author | Roger Sayle <roger@eyesopen.com> | 2002-10-02 18:46:45 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2002-10-02 18:46:45 +0000 |
commit | f963b5d977a838a7e219bbf7b94f22fd79058a51 (patch) | |
tree | f72d300500fae0fe8ccdc82f9dfd48580a10d90f /gcc/tree.h | |
parent | 327d975a3af27d13a179712ed162e72e19e86b33 (diff) | |
download | gcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.zip gcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.tar.gz gcc-f963b5d977a838a7e219bbf7b94f22fd79058a51.tar.bz2 |
re PR rtl-optimization/6627 (-fno-align-functions regression from 2.95)
PR optimization/6627
* toplev.c (force_align_functions_log): New global variable.
* flags.h (force_align_functions_log): Add extern prototype.
* varasm.c (assemble_start_function): Use it to force minimum
function alignment.
* config/i386/i386.h (FUNCTION_BOUNDARY): Set the correct
minimum function alignment to one byte.
(TARGET_PTRMEMFUNC_VBIT_LOCATION): Store the virtual bit in
the least significant bit of vtable member function pointers.
* tree.h (enum ptrmemfunc_vbit_where_t): Move definition to
here from cp/cp-tree.h.
* cp/cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
from here, and move it to tree.h.
* cp/decl.c (cxx_init_decl_processing): If storing the vbit
in function pointers, ensure that force_align_functions_log
is atleast one.
* java/lang.c (java_init): If storing the vbit in function
pointers, ensure that force_align_functions_log is atleast
one to aid compatability with g++ vtables.
From-SVN: r57745
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -2114,6 +2114,33 @@ enum tls_model { extern enum tls_model flag_tls_default; +/* A pointer-to-function member type looks like: + + struct { + __P __pfn; + ptrdiff_t __delta; + }; + + If __pfn is NULL, it is a NULL pointer-to-member-function. + + (Because the vtable is always the first thing in the object, we + don't need its offset.) If the function is virtual, then PFN is + one plus twice the index into the vtable; otherwise, it is just a + pointer to the function. + + Unfortunately, using the lowest bit of PFN doesn't work in + architectures that don't impose alignment requirements on function + addresses, or that use the lowest bit to tell one ISA from another, + for example. For such architectures, we use the lowest bit of + DELTA instead of the lowest bit of the PFN, and DELTA will be + multiplied by 2. */ + +enum ptrmemfunc_vbit_where_t +{ + ptrmemfunc_vbit_in_pfn, + ptrmemfunc_vbit_in_delta +}; + #define NULL_TREE (tree) NULL /* Approximate positive square root of a host double. This is for |