This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcs fix for internal error on Winnt/Alpha
- To: egcs at cygnus dot com
- Subject: gcs fix for internal error on Winnt/Alpha
- From: bob <bob at guiduck dot com>
- Date: Wed, 12 Nov 1997 11:48:07 -0800
- Reply-To: bob at guiduck dot com
Enclosed is a fix for the following error for
egcs targeting for ALPHA on WINNT:
C:\EGCS-9~1\gcc>xgcc -B./ -c -DIN_GCC -Dalpha -DWIN32 -D_WIN32
-D_ALPHA_ -D_M_ALPHA
-D__STDC__=0 -DNO_SYS_FILE_H -DHAVE_STRERROR -I. -I. -I./config -c
lgcctmp/__main.c
libgcc2.c: In function `__do_global_dtors':
In file included from lgcctmp/__main.c:2:
libgcc2.c:2947: internal error--unrecognizable insn:
(call_insn 49 48 52 (parallel[
(call (mem:DI (reg:DI 83))
(reg:DI 27 $27))
(clobber (reg:DI 26 $26))
] ) -1 (nil)
(nil)
(nil))
---------------------------------------------------------------------
alpha.md needs to changed as follows:
(define_expand "call_nt"
[(parallel [(call (mem:DI (match_operand:DI 0 "" ""))
(match_operand 1 "" ""))
(clobber (reg:DI 26))])]
""
"
{ if (GET_CODE (operands[0]) != MEM)
abort ();
operands[0] = XEXP (operands[0], 0);
if (GET_CODE (operands[1]) != SYMBOL_REF
&& ! (GET_CODE (operands[1]) == REG && REGNO (operands[1]) == 27))
{
rtx tem = gen_rtx (REG, DImode, 27);
emit_move_insn (tem, operands[1]);
operands[1] = tem;
}
}")
needs to be changed to:
(define_expand "call_nt"
[(parallel [(call (mem:DI (match_operand 0 "" ""))
(match_operand 1 "" ""))
(clobber (reg:DI 27))
(clobber (reg:DI 26))])]
""
"
{ if (GET_CODE (operands[0]) != MEM)
abort ();
operands[0] = XEXP (operands[0], 0);
if (GET_CODE (operands[0]) != SYMBOL_REF
&& ! (GET_CODE (operands[0]) == REG && REGNO (operands[0]) == 27))
{
rtx tem = gen_rtx (REG, DImode, 27);
emit_move_insn (tem, operands[0]);
operands[0] = tem;
}
}")
-----------------------------------------------------------------
AND
This section of alpha.md needs to be changed as well:
(define_insn ""
[(call (mem:DI (match_operand:DI 0 "call_operand" "r,i"))
(match_operand 1 "" ""))
(clobber (reg:DI 26))]
"TARGET_WINDOWS_NT"
"@
jsr $26,(%0)
bsr $26,%0"
[(set_attr "type" "jsr")])
Needs to be changed to:
(define_insn ""
[(call (mem:DI (match_operand:DI 0 "call_operand" "r,R,i"))
(match_operand 1 "" ""))
(clobber (reg:DI 27))
(clobber (reg:DI 26))]
"TARGET_WINDOWS_NT"
"@
jsr $26,($27),0
bsr $26,%0
jsr $26,%0"
[(set_attr "type" "jsr,jsr,ibr")])
-----------------------------------------------------------------------
I know I should submit my changes in a "diff" format but I am
working under Windows/NT Alpha and there is no diff or patch program..
sorry for the inconvience..