[Icc-mot] Interesting Optimizations
Richard Man
richard-lists at imagecraft.com
Mon Apr 7 00:25:24 PDT 2008
I will fix it...
At 10:53 AM 4/4/2008, Edward Karpicz wrote:
>Gene,
>
>>Yes, I didn't want to muddy the waters though.
>
>
>Acctually I muddied waters, sorry. You are rigth, you found the bug.
>Richard, please fix it. Reconstructing minimal code:
>
>
>void main(void)
>{
>short i, j;
>
> i = (i << 8) + 1;
> j = (j << 8) | 2;
>}
>
>listing:
>
> .area text
> ; j -> 0,SP
> ; i -> 2,SP
>0000 _main::
>0000 1B9C leas -4,S
>0002 ; void main(void)
>0002 ; {
>0002 ; short i, j;
>0002 ;
>0002 ; i = (i << 8) + 1;
>0002 A682 ldaa 2,S <<<#### - should be ldaa 2+1,S
>0004 C601 ldab #1
>0006 B746 tfr D,Y
>0008 6D82 sty 2,S
>000A ; j = (j << 8) | 2;
>000A A680 ldaa 0,S <<<#### - should be ldaa 0+1,S
>000C C602 ldab #2
>000E B746 tfr D,Y
>0010 6C80 std 0,S
>0012 L1:
>0012 .dbline 0 ; func end
>0012 1B84 leas 4,S
>0014 3D rts
>
>Edward
>_______________________________________________
>Icc-mot mailing list
>Icc-mot at imagecraft.com
>http://dragonsgate.net/mailman/listinfo/icc-mot
// richard (This email is for mailing lists. To reach me directly,
please use richard at imagecraft.com)
More information about the Icc-mot
mailing list