diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-02 18:46:45 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-10-02 18:46:45 +0000 |
commit | fc5cb4c0a212aa84276241f4483c5e3cc7e877cb (patch) | |
tree | f72d300500fae0fe8ccdc82f9dfd48580a10d90f /gcc/java/lang.c | |
parent | 4aac350f06e632386f116898bb5741d8869ed567 (diff) | |
download | gcc-fc5cb4c0a212aa84276241f4483c5e3cc7e877cb.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r-- | gcc/java/lang.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c index c6fbb44ddd8..706b4f12776 100644 --- a/gcc/java/lang.c +++ b/gcc/java/lang.c @@ -516,6 +516,13 @@ java_init (filename) if (flag_inline_functions) flag_inline_trees = 1; + /* Force minimum function alignment if g++ uses the least significant + bit of function pointers to store the virtual bit. This is required + to keep vtables compatible. */ + if (TARGET_PTRMEMFUNC_VBIT_LOCATION == ptrmemfunc_vbit_in_pfn + && force_align_functions_log < 1) + force_align_functions_log = 1; + /* Open input file. */ if (filename == 0 || !strcmp (filename, "-")) |