[Icc-mot] ICC12 Advanced V7.03 bug

willard.a.hall at gm.com willard.a.hall at gm.com
Mon Apr 7 10:23:06 PDT 2008


Thanks for the response Gene, the snippet I included is from the .lis file.

The code in question is the  >> 5 at 06B9
id is an integer 16 and  (I16) is a cast to integer16 that is probably not
needed but my habit.

The call to asr16 at 06D0  should be a rotate if I understand the compiler
command >>5 to be a shift right 5 times

Bill





                                                                           
             Gene Norris                                                   
             <genenorris at spote                                             
             ngineering.com>                                            To 
             Sent by:                  "Discussion List for ICC08/11/12/16 
             icc-mot-bounces at i         users. You do NOT need to subscribe 
             magecraft.com             to     icc-announce if you are a    
                                       member of this."                    
                                       <icc-mot at imagecraft.com>            
             04/07/2008 12:08                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: [Icc-mot] ICC12 Advanced V7.03  
             Please respond to         bug                                 
             "Discussion List                                              
                    for                                                    
              ICC08/11/12/16                                               
             users. You do NOT                                             
                  need to                                                  
               subscribe to                                                
              icc-announce if                                              
             you are a member                                              
                 of this."                                                 
             <icc-mot at imagecra                                             
                  ft.com>                                                  
                                                                           
                                                                           




Willard,

The below is not much information, please show your function and the
listing (.lis) segment pertinent to this problem.

In general, arithmetic shifts are done on signed values and logical on
unsigned, so you probably have a sign type problem. Data that is not
typed is assumed to be signed...

Gene

willard.a.hall at gm.com wrote:
>
> The code shown needs to do a logical shift right to give me id = 0x0581
> The compiler uses an arithmatic shift which wraps the sign bit to give me
> id = 0xFD81
>
> CANRIDR0 = 0xB0   CANRIDR1 = 0x20
>
>
>  06B9           ;     id    = ((((I16)(CANRIDR0 << 8)) |
((I16)(CANRIDR1)))
>>> 5);
>  06B9 F60161            ldab 0x161
>  06BC 87                clra
>  06BD B746              tfr D,Y
>  06BF C7                clrb
>  06C0 B60160            ldaa 0x160
>  06C3 6D80              sty 0,S
>  06C5 AA80              ora 0,S
>  06C7 EA81              orb 1,S
>  06C9 B746              tfr D,Y
>  06CB CE0005            ldx #5
>  06CE B764              tfr Y,D
>  06D0 160000            jsr asr16
>  06D3 B746              tfr D,Y
>  06D5 6D83              sty 3,S
>  06D7                   .dbline 269
>
> _______________________________________________
> Icc-mot mailing list
> Icc-mot at imagecraft.com
> http://dragonsgate.net/mailman/listinfo/icc-mot
>
>
>

_______________________________________________
Icc-mot mailing list
Icc-mot at imagecraft.com
http://dragonsgate.net/mailman/listinfo/icc-mot




More information about the Icc-mot mailing list