i is not ovious to me why that would work without adding a conditiona branch.
maybe my assumptions are wrong. can you show the resulting assembly for the
testcase?
> Gesendet: Dienstag, 30. April 2013 um 11:07 Uhr
> Von: zephyr.pelle...@gmail.com
> An: 9fans@9fans.net
> Betreff: Re
> Gesendet: Montag, 29. April 2013 um 21:34 Uhr
> Von: "Richard Miller" <9f...@hamnavoe.com>
> An: 9fans@9fans.net
> Betreff: Re: [9fans] 5l bug
>
> > following up, theres my naive fix for this. instead of
> > emiting conditional division instruction
Patching p -> scond = q -> scond in /sys/src/cmd/5l/noop.c fixes this
unfortunate linker bug.
On Sunday, April 28, 2013 10:54:18 PM UTC-7, Paul Patience wrote:
> Mischief reported a crash with on arm with
>
> winwatch when closing all windows excluding those
>
> ignored through the -e flag. Cin
> following up, theres my naive fix for this. instead of
> emiting conditional division instruction by 5c... dont and
> keep the branch. does this make any sense?
I think it should be corrected in 5l. Some ARM versions do
have a hardware divide instruction, which could one day be
supported by 5l
nice.
- erik
term% cat foo.c
#include
#include
void
main(void)
{
int i, j, k;
i = 1;
j = 0;
k = j <= 0 ? 1 : 2/i;
print("%d\n", k);
exits(nil);
}
term% 5c -S foo.c
TEXTmain+0(SB),0,$20
MOVW$1,R1
MOVW$0,R2
CMP $0
On Mon Apr 29 14:55:02 EDT 2013, cinap_len...@gmx.de wrote:
> following up, theres my naive fix for this. instead of
> emiting conditional division instruction by 5c... dont and
> keep the branch. does this make any sense?
>
> term% hg diff -r 1777 peep.c
> diff -r 5eeb36d3ddd0 sys/src/cmd/5c/pee
following up, theres my naive fix for this. instead of
emiting conditional division instruction by 5c... dont and
keep the branch. does this make any sense?
term% hg diff -r 1777 peep.c
diff -r 5eeb36d3ddd0 sys/src/cmd/5c/peep.c
--- a/sys/src/cmd/5c/peep.c Mon Jul 30 19:11:16 2012 +0200
+++ b