View Single Post
Old 12 September 2015, 17:55   #99
Mrs Beanbag
Glastonbridge Software
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,202
yes, indeed, LINK/UNLK are quite unneccessary instructions, but in one of the examples in the above link we see even "LINK A5,#0" which is positively certifiable!

it looks like in some cases it is deliberately moving things around for optimisation, but is achieving exactly the opposite of that.

or this little gem:
Code:
         moveq   #1,d1
         move.l  d1,(a0)+
         moveq   #1,d1
         move.l  d1,(a0)+
         moveq   #1,d1
         move.l  d1,(a0)+
         moveq   #1,d1
         move.l  d1,(a0)+


a purely literal rendering of the original source code would surely be better than any of those example outputs... in fact i would rather compile literally and let the programmer in charge of the optimisation.

Last edited by Mrs Beanbag; 12 September 2015 at 18:03.
Mrs Beanbag is offline  
 
Page generated in 0.07943 seconds with 9 queries