aboutsummaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-10-02 18:46:45 +0000
committerRoger Sayle <roger@eyesopen.com>2002-10-02 18:46:45 +0000
commita6b32c7be6ae19ace3a6c1f6a7c81aed7dcacff8 (patch)
treef72d300500fae0fe8ccdc82f9dfd48580a10d90f /gcc/java
parent4dfd2db72769b03de0e4c0259a3af1147912d43a (diff)
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: https://gcc.gnu.org/svn/gcc/trunk@57745 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/lang.c7
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 07c53ec1ccf..1c1c1d09154 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2002-10-02 Roger Sayle <roger@eyesopen.com>
+
+ PR optimization/6627
+ * 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.
+
2002-10-01 Nathan Sidwell <nathan@codesourcery.com>
* jcf-dump.c (print_constant, case CONSTANT_float): Don't fall
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, "-"))