Fix bad helper tool invocation for inl with faddrn.
authorDavid Given <dg@cowlark.com>
Thu, 14 Feb 2019 22:21:47 +0000 (23:21 +0100)
committerDavid Given <dg@cowlark.com>
Thu, 14 Feb 2019 22:21:47 +0000 (23:21 +0100)
mach/i80/ncg/table

index 87d1d0a..1cd47d6 100644 (file)
@@ -954,7 +954,7 @@ pat inc
          inx %1
       yields %1
 
-pat inl ($1>0) && ($1<STACKHELPERS)
+pat inl ($1>0) && ($1<=STACKHELPERS)
    uses hlreg
       gen
          Call {plabel, ".faddr", $1}
@@ -964,10 +964,10 @@ pat inl ($1>0) && ($1<STACKHELPERS)
          inr {m}
          1:
 
-pat inl ($1<0) && ($1<0-STACKHELPERS)
+pat inl ($1<0) && ($1>=0-STACKHELPERS)
    uses hlreg
       gen
-         Call {plabel, ".faddrn", $1}
+         Call {plabel, ".faddrn", 0-$1}
          inr {m}
          jnz {label,1f}
          inx hl