tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] ARM codegen issue, possibly fixed already


From: Harald van Dijk
Subject: Re: [Tinycc-devel] ARM codegen issue, possibly fixed already
Date: Sun, 14 Jul 2019 23:03:04 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.0

On 14/07/2019 21:31, grischka wrote:
Harald van Dijk wrote:
As that commit is an optimization, not a codegen fix, I would like to
ask whether the original issue is still present and just requires a more
complex test case to expose, or whether it has accidentally been fixed
by this commit.

No, I think this bug must exist since the very early days of
the project, on all 32-bit platforms.  This might fix it:

That's interesting: I had not seen it on i386, so I figured it would be ARM-specific.

--- a/tccgen.c
+++ b/tccgen.c
@@ -1990,6 +1990,7 @@ static void gen_opl(int op)
          vtop[-1] = vtop[-2];
          vtop[-2] = tmp;
          /* stack: L1 L2 H1 H2 */
+        save_regs(4);
          /* compare high */
          op1 = op;
          /* when values are equal, we need to compare low words. since

That looks good for the reduced test case; looking at the generated code, the changes make sense. I'll do some more testing over the course of the next week, thanks.


Thanks and keep up the good work!

Cheers,
Harald van Dijk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]