Bug in egcs-1.1b and snapshot 1998-10-19 (target m68k)
Peter Jakubek
pjak@snafu.de
Thu Oct 29 08:56:00 GMT 1998
Wrong code is generated for 68000 targets when using the d16(Ax) mode.
The range is not correctly checked for 68000/5200 targets.
(offset must be in range [-32768, 32767])
It seems the macro INDIRECTABLE_1_ADDRESS_P(X) causes the trouble:
diff -rU3 m68k.h.orig m68k.h
--- m68k.h.orig Wed Oct 14 10:43:37 1998
+++ m68k.h Wed Oct 28 16:42:37 1998
@@ -1426,7 +1426,7 @@
|| (GET_CODE (X) == PLUS
\
&& LEGITIMATE_BASE_REG_P (XEXP (X, 0))
\
&& GET_CODE (XEXP (X, 1)) == CONST_INT
\
- && (TARGET_68020 || (unsigned) INTVAL (XEXP (X, 1)) + 0x8000) <
0x10000) \
+ && (TARGET_68020 || (((unsigned) INTVAL (XEXP (X, 1)) + 0x8000)
< 0x10000))) \
|| (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx
\
&& flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF)
\
|| (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx
\
--
Peter Jakubek
pjak@snafu.de
More information about the Gcc-bugs
mailing list