[Bug target/45373] V850 increment loops compile into incorrect assembly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45373 Alex Marshall changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #4 from Alex Marshall 2011-04-14 03:30:09 UTC --- I have just come back to this, and it appears that the correct code was being generated in the first place. I must have misread the datasheet or something. In any case, this is now resolved.
[Bug target/45373] V850 increment loops compile into incorrect assembly
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45373 Alex Marshall changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | --- Comment #5 from Alex Marshall 2011-05-09 01:22:27 UTC --- Sorry for bumping this bug yet again, but it appears as if it really is generating incorrect code. After looking at several other code which has been verified to run, and reviewing the datasheet heavily, it appears GCC is truly generating incorrect code. For all branches, the direction of the compare is incorrect; e.g., BGE should be BLE, BNL should be BNH, BLT should be BGT.
[Bug target/45373] V850 increment loops compile into incorrect assembly
--- Comment #1 from trap15 at raidenii dot net 2010-08-21 23:45 --- Created an attachment (id=21540) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21540&action=view) the .i file -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45373
[Bug target/45373] V850 increment loops compile into incorrect assembly
--- Comment #2 from trap15 at raidenii dot net 2010-08-21 23:47 --- I tested both 4.4.4 and 4.4.0 and they both generate the wrong code. -- trap15 at raidenii dot net changed: What|Removed |Added CC||segher at gcc dot gnu dot ||org Keywords||wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45373
[Bug target/45373] V850 increment loops compile into incorrect assembly
--- Comment #3 from trap15 at raidenii dot net 2010-08-22 02:47 --- This actually appears to be the same problem when comparing in the other direction as well. If I change the source from i < 8 to i > 8, then it uses ``cmp 8, iter; bgt 0xf00'', which is also wrong, since we want 8 < iterator, not 8 > iterator. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45373