Dead Hackers Society
Other BBSes »
 
 

Silly Venture 2020

Sommarhack 2021
Demoscene  Coding  CT60  Buy/sell

Atari demoscene BBS
 
Re: Signs of clang
Posted by: mikro Sep,20.2020-21:37 

Can you give me an example of such behavior? A short test with

int f(int num) {
int n = num * num;
if (n > 0)
return 1;
else return 2;
}

leads to (-m68020-60 -O2 -fomit-frame-pointer) exactly opposite behaviour to your claim:

gcc 4.6.4:

move.l 4(%sp),%d0
muls.l %d0,%d0
tst.l %d0
sle %d0
extb.l %d0
moveq #1,%d1
sub.l %d0,%d1
move.l %d1,%d0
rts

gcc 7.2.0:

move.l 4(%sp),%d0
muls.l %d0,%d0
jeq .L6
moveq #1,%d0
rts
.L6:
moveq #2,%d0
rts

I'm keeping gcc7, thanks ;)







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
Signs of clang ggn Sep,10.2020-11:59
  Re: Signs of clang PeyloW Sep,15.2020-20:16
    Re: Signs of clang mikro Sep,20.2020-21:37
      Re: Signs of clang ggn Sep,21.2020-22:16
      Re: Signs of clang PeyloW Sep,25.2020-19:24
      Re: Signs of clang PeyloW Sep,25.2020-20:17
        Re: Signs of clang ggn Sep,25.2020-22:29


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2020 Dead Hackers Society Contact: Anders Eriksson