Patch to optabs.c
"tim_ouyang"@sunplus.com.tw
"tim_ouyang"@sunplus.com.tw
Tue Dec 26 01:09:00 GMT 2000
Hello,
The following patch fixes a bug in expand_binop(). When the operation is add or
sub, the original optabs.c forgets to copy the result of first word back to
target.
I am porting GCC to a 16-bit micro-processor. When I feed the testsuite into the
ported GCC, I found this bug. After add this patch, the GCC works fine and
generates correct codes.
==========8<==============8<============
[/gcc-snapshot/gcc]$ diff -Nau optabs.c optabs.c.new
--- optabs.c Fri Nov 17 14:05:15 2000
+++ optabs.c.new Tue Dec 26 15:08:05 2000
@@ -1230,6 +1230,13 @@
break;
}
}
+ else
+ {
+ if (x == 0)
+ break;
+ else if (target_piece != x)
+ emit_move_insn (target_piece, x);
+ }
carry_in = carry_out;
}
==========>8==============>8============
Happy New Year!
Tim Ouyang (üÃÂöçähîx)
IP Design Dept.
Intellectual Property Development Division
Sunplus Technology Co.,Ltd.
19, Innovation Road 1, Science-Based Industrial Park, Hsin-Chu, Taiwan
Phone: +886-3-5786005 Ext. 2467
Fax: +886-3-5784418
E-Mail : tim_ouyang@sunplus.com.tw
More information about the Gcc
mailing list