This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Some backport suggestions for 3.0.2
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Some backport suggestions for 3.0.2
- From: Franz Sirl <Franz dot Sirl-kernel at lauterbach dot com>
- Date: Tue, 9 Oct 2001 01:20:04 +0200
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?).
Franz.
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-11 Aldy Hernandez <aldyh@redhat.com>
* loop.c (scan_loop): Do not combine asm statements.
2001-09-17 Andreas Jaeger <aj@suse.de>
* jni.cc (array_from_valist): Use promoted types for va_arg.
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/08 21:22:14
@@ -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/08 21:22:25
@@ -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/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/08 21:22:32
@@ -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/08 21:22:34
@@ -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/08 21:22:43
@@ -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.