diff extra/README @ 416:b4d0eafc5bfe

Fix code generation error in gcc6809 It turned out that under some circumstances, the gcc optimizer would select an instruction sequence that had the sense of a branch inverted. It seems this was due to a particular instruction pattern included in the machine description not being quite right with respect to how the condition codes were tracked. Removing that instruction pattern seems to fix things (subtraction with the arguments reversed). gcc seems to be smart enough to figure out how to reorganize code to work without this reversed sense subtraction and then do the right thing.
author William Astle <lost@l-w.ca>
date Thu, 24 Mar 2016 20:07:20 -0600
parents 8222f30a0781
children d7b7004b0883
line wrap: on
line diff
--- a/extra/README	Thu Mar 24 19:25:14 2016 -0600
+++ b/extra/README	Thu Mar 24 20:07:20 2016 -0600
@@ -93,18 +93,6 @@
 
 The above is WOMM certified. YMMV.
 
-NOTES ABOUT GCC6809
-===================
-
-There is one known code generation bug with current versions of gcc6809. If
-you are getting bad behaviour for some reason and are using optimization
-(-O1 or higher, -Os), you may be hitting this bug. If someone who
-understands the gcc code is willing to look at it, patches for the patch
-would be welcome (especially if that patch moves the base gcc version
-upward). It is not clear whether this is a bug in the m6809 specific code
-or the gcc core though it seems like it's in the gcc core. Disabling
-optimization completely seems to generate correct, if suboptimal, code.
-
 NOTES ABOUT SPECIFIC PATCHES
 ============================
 
@@ -138,3 +126,9 @@
 things. Patches to clean that up are also welcome. Either to do something
 meaningful or to remove such features entirely.
 
+gcc6809lw-4.6.4-4.patch
+
+This is identical to the -3 version except it fixes a code generation bug
+that showed up under optimization. It would result in the sense of a branch
+following a subtraction being inverted for whatever reason. This change
+seems to fix that.