This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Some backport suggestions for 3.0.2
- To: Mark Mitchell <mark at codesourcery dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Subject: Re: [PATCH] Some backport suggestions for 3.0.2
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Mon, 5 Nov 2001 18:56:57 +0100
- References: <14340000.1002588591@warlock.codesourcery.com>
On Tuesday 09 October 2001 02:49, Mark Mitchell wrote:
> --On Tuesday, October 09, 2001 01:20:04 AM +0200 Franz Sirl
>
> <Franz.Sirl-kernel@lauterbach.com> wrote:
> > Hi,
> >
> > some backports I have in my sources for a while now. Nothing
> > exceptionally important though (I think, maybe they rings bells for
> > someone else?).
>
> I think we should look at these for 3.0.3; the window's closing rapidly
> on 3.0.2.
OK for the branch now? I added the ObjC patch that fixes the testsuite,
otherwise identical to last time. Bootstrapped on powerpc-linux-gnu.
Franz.
gcc/ChangeLog:
2001-09-15 Roman Lechtchinsky <rl@cs.tu-berlin.de>
* c-common.c (c_promoting_integer_type_p): Handle ?Imode types.
2001-08-18 Zack Weinberg <zackw@panix.com>
* combine.c (make_compound_operation, simplify_comparison):
Fix typos testing for this or that instruction.
2001-07-26 Kazu Hirata <kazu@hxi.com>
* regmove.c (regmove_optimize): Don't replace a reg with
another reg of a different mode.
2001-06-16 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* gccspec.c (lang_specific_driver): If compiling ObjC, add
-shared-libgcc when necessary.
* Makefile.in (gccspec.o): Compile with DRIVER_DEFINES.
2001-06-11 Aldy Hernandez <aldyh@redhat.com>
* loop.c (scan_loop): Do not combine asm statements.
libjava/ChangeLog:
2001-09-17 Andreas Jaeger <aj@suse.de>
* jni.cc (array_from_valist): Use promoted types for va_arg.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.602.2.36
diff -u -p -r1.602.2.36 Makefile.in
--- gcc/Makefile.in 2001/10/04 22:59:02 1.602.2.36
+++ gcc/Makefile.in 2001/10/27 10:46:21
@@ -1338,6 +1338,12 @@ gcc.o: gcc.c $(CONFIG_H) system.h intl.h
-c $(srcdir)/gcc.c)
gccspec.o: gccspec.c $(CONFIG_H) system.h $(GCC_H)
+ (SHLIB_LINK='$(SHLIB_LINK)' \
+ SHLIB_MULTILIB='$(SHLIB_MULTILIB)'; \
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
+ $(DRIVER_DEFINES) \
+ -c $(srcdir)/gccspec.c)
+
cppspec.o: cppspec.c $(CONFIG_H) system.h $(GCC_H)
tree-check.h: s-check ; @true
Index: gcc/c-common.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.226.2.5
diff -u -p -r1.226.2.5 c-common.c
--- gcc/c-common.c 2001/06/22 19:23:23 1.226.2.5
+++ gcc/c-common.c 2001/10/27 10:46:23
@@ -3554,7 +3554,8 @@ c_promoting_integer_type_p (t)
|| TYPE_MAIN_VARIANT (t) == signed_char_type_node
|| TYPE_MAIN_VARIANT (t) == unsigned_char_type_node
|| TYPE_MAIN_VARIANT (t) == short_integer_type_node
- || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node);
+ || TYPE_MAIN_VARIANT (t) == short_unsigned_type_node
+ || TYPE_PRECISION (t) < TYPE_PRECISION (integer_type_node));
case ENUMERAL_TYPE:
/* ??? Technically all enumerations not larger than an int
Index: gcc/combine.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/combine.c,v
retrieving revision 1.183.2.7
diff -u -p -r1.183.2.7 combine.c
--- gcc/combine.c 2001/07/13 16:39:35 1.183.2.7
+++ gcc/combine.c 2001/10/27 10:46:32
@@ -6559,8 +6559,8 @@ make_compound_operation (x, in_code)
case LSHIFTRT:
/* If the sign bit is known to be zero, replace this with an
arithmetic shift. */
- if (ashr_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing
- && lshr_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing
+ if (ashr_optab->handlers[(int) mode].insn_code != CODE_FOR_nothing
+ && lshr_optab->handlers[(int) mode].insn_code == CODE_FOR_nothing
&& mode_width <= HOST_BITS_PER_WIDE_INT
&& (nonzero_bits (XEXP (x, 0), mode) & (1 << (mode_width - 1))) == 0)
{
@@ -11140,7 +11140,7 @@ simplify_comparison (code, pop0, pop1)
/* If OP0 is an AND and we don't have an AND in MODE either,
make a new AND in the proper mode. */
if (GET_CODE (op0) == AND
- && (add_optab->handlers[(int) mode].insn_code
+ && (and_optab->handlers[(int) mode].insn_code
== CODE_FOR_nothing))
op0 = gen_binary (AND, tmode,
gen_lowpart_for_combine (tmode,
Index: gcc/gccspec.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gccspec.c,v
retrieving revision 1.4
diff -u -p -r1.4 gccspec.c
--- gcc/gccspec.c 2000/08/02 20:21:25 1.4
+++ gcc/gccspec.c 2001/10/27 10:46:32
@@ -1,5 +1,5 @@
/* Specific flags and argument handling of the C front-end.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
This file is part of GNU CC.
@@ -29,7 +29,67 @@ lang_specific_driver (in_argc, in_argv,
const char *const **in_argv ATTRIBUTE_UNUSED;
int *in_added_libraries ATTRIBUTE_UNUSED;
{
- return; /* Not used for C. */
+#ifdef ENABLE_SHARED_LIBGCC
+ int i;
+
+ /* The new argument list will be contained in this. */
+ const char **arglist;
+
+ /* True if we should add -shared-libgcc to the command-line. */
+ int shared_libgcc = 0;
+
+ /* The total number of arguments with the new stuff. */
+ int argc;
+
+ /* The argument list. */
+ const char *const *argv;
+
+ argc = *in_argc;
+ argv = *in_argv;
+
+ for (i = 1; i < argc; i++)
+ {
+ if (argv[i][0] == '-')
+ {
+ if (strcmp (argv[i], "-static-libgcc") == 0
+ || strcmp (argv[i], "-static") == 0)
+ return;
+ }
+ else
+ {
+ int len;
+
+ /* If the filename ends in .m or .mi, we are compiling ObjC
+ and want to pass -shared-libgcc. */
+ len = strlen (argv[i]);
+ if ((len > 2 && argv[i][len - 2] == '.' && argv[i][len - 1] == 'm')
+ || (len > 3 && argv[i][len - 3] == '.' && argv[i][len - 2] == 'm'
+ && argv[i][len - 1] == 'i'))
+ shared_libgcc = 1;
+ }
+ }
+
+ if (shared_libgcc)
+ {
+ /* Make sure to have room for the trailing NULL argument. */
+ arglist = (const char **) xmalloc ((argc+2) * sizeof (char *));
+
+ i = 0;
+ do
+ {
+ arglist[i] = argv[i];
+ i++;
+ }
+ while (i < argc);
+
+ arglist[i++] = "-shared-libgcc";
+
+ arglist[i] = NULL;
+
+ *in_argc = i;
+ *in_argv = arglist;
+ }
+#endif
}
/* Called before linking. Returns 0 on success and -1 on failure. */
Index: gcc/loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.322.4.11
diff -u -p -r1.322.4.11 loop.c
--- gcc/loop.c 2001/09/05 05:54:42 1.322.4.11
+++ gcc/loop.c 2001/10/27 10:46:39
@@ -772,6 +772,7 @@ scan_loop (loop, flags)
&& (REGNO_LAST_UID (regno)
== INSN_UID (regs->array[regno].single_usage))
&& regs->array[regno].set_in_loop == 1
+ && GET_CODE (SET_SRC (set)) != ASM_OPERANDS
&& ! side_effects_p (SET_SRC (set))
&& ! find_reg_note (p, REG_RETVAL, NULL_RTX)
&& (! SMALL_REGISTER_CLASSES
Index: gcc/regmove.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regmove.c,v
retrieving revision 1.96.2.8
diff -u -p -r1.96.2.8 regmove.c
--- gcc/regmove.c 2001/09/18 18:23:37 1.96.2.8
+++ gcc/regmove.c 2001/10/27 10:46:40
@@ -1243,6 +1243,9 @@ regmove_optimize (f, nregs, regmove_dump
if (! regclass_compatible_p (src_class, dst_class))
continue;
+ if (GET_MODE (src) != GET_MODE (dst))
+ continue;
+
if (fixup_match_1 (insn, set, src, src_subreg, dst, pass,
op_no, match_no,
regmove_dump_file))
Index: libjava/jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni.cc,v
retrieving revision 1.36.4.8
diff -u -p -r1.36.4.8 jni.cc
--- libjava/jni.cc 2001/09/29 06:07:29 1.36.4.8
+++ libjava/jni.cc 2001/10/27 10:46:56
@@ -115,19 +115,19 @@ jvmpiEnableEvent (jint event_type, void
case JVMPI_EVENT_OBJECT_ALLOC:
_Jv_JVMPI_Notify_OBJECT_ALLOC = _Jv_JVMPI_Interface.NotifyEvent;
break;
-
+
case JVMPI_EVENT_THREAD_START:
_Jv_JVMPI_Notify_THREAD_START = _Jv_JVMPI_Interface.NotifyEvent;
break;
-
+
case JVMPI_EVENT_THREAD_END:
_Jv_JVMPI_Notify_THREAD_END = _Jv_JVMPI_Interface.NotifyEvent;
break;
-
+
default:
return JVMPI_NOT_AVAILABLE;
}
-
+
return JVMPI_SUCCESS;
}
@@ -139,11 +139,11 @@ jvmpiDisableEvent (jint event_type, void
case JVMPI_EVENT_OBJECT_ALLOC:
_Jv_JVMPI_Notify_OBJECT_ALLOC = NULL;
break;
-
+
default:
return JVMPI_NOT_AVAILABLE;
}
-
+
return JVMPI_SUCCESS;
}
#endif
@@ -320,7 +320,7 @@ _Jv_JNI_PopLocalFrame (JNIEnv *env, jobj
bool done = false;
while (rf != NULL && ! done)
- {
+ {
for (int i = 0; i < rf->size; ++i)
if (rf->vec[i] != NULL)
unmark_for_gc (rf->vec[i]);
@@ -399,7 +399,7 @@ _Jv_JNI_GetVersion (JNIEnv *)
}
static jclass
-_Jv_JNI_DefineClass (JNIEnv *env, jobject loader,
+_Jv_JNI_DefineClass (JNIEnv *env, jobject loader,
const jbyte *buf, jsize bufLen)
{
try
@@ -658,9 +658,9 @@ array_from_valist (jvalue *values, JArra
for (int i = 0; i < arg_types->length; ++i)
{
if (arg_elts[i] == JvPrimClass (byte))
- values[i].b = va_arg (vargs, jbyte);
+ values[i].b = (jbyte) va_arg (vargs, int);
else if (arg_elts[i] == JvPrimClass (short))
- values[i].s = va_arg (vargs, jshort);
+ values[i].s = (jshort) va_arg (vargs, int);
else if (arg_elts[i] == JvPrimClass (int))
values[i].i = va_arg (vargs, jint);
else if (arg_elts[i] == JvPrimClass (long))
@@ -670,9 +670,9 @@ array_from_valist (jvalue *values, JArra
else if (arg_elts[i] == JvPrimClass (double))
values[i].d = va_arg (vargs, jdouble);
else if (arg_elts[i] == JvPrimClass (boolean))
- values[i].z = va_arg (vargs, jboolean);
+ values[i].z = (jboolean) va_arg (vargs, int);
else if (arg_elts[i] == JvPrimClass (char))
- values[i].c = va_arg (vargs, jchar);
+ values[i].c = (jchar) va_arg (vargs, int);
else
{
// An object.
@@ -1046,7 +1046,7 @@ _Jv_JNI_NewObjectA (JNIEnv *env, jclass
template<typename T>
static T
-_Jv_JNI_GetField (JNIEnv *env, jobject obj, jfieldID field)
+_Jv_JNI_GetField (JNIEnv *env, jobject obj, jfieldID field)
{
JvAssert (obj);
T *ptr = (T *) ((char *) obj + field->getOffset ());
@@ -1395,7 +1395,7 @@ _Jv_JNI_GetPrimitiveArrayRegion (JNIEnv
template<typename T>
static void
-_Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
+_Jv_JNI_SetPrimitiveArrayRegion (JNIEnv *env, JArray<T> *array,
jsize start, jsize len, T *buf)
{
// The cast to unsigned lets us save a comparison.