[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

BSD Stack on the Coldfire.



Chris Johns <ccj at acm.org> wrote:
> I do not think it was compiled in before or the tools had bugs. I
> checked the Coldfire manuals and :
>
> andi #0xf,%cc      : only andi.l supported,

This one's easy
#if IS_COLDFIRE
                "andil   #0xf,%%cc   | Clear X (extended carry flag)\n\t"
#else
                "andi    #0xf,%%cc   | Clear X (extended carry flag)\n\t"
#endif

> dbf %d1,lcsum1_lbl : not sure what is wrong here,

This one's tough!  Does the Coldfire architecture not have a DBcc  
instruction?  If not, the code gets quite a bit more complicated,  
since there's no `decrement' instruction that doesn't modify the X  
condition code bit.  Thus, the X bit would have to be added in before  
the `decrement' and `Bcc' instructions, and you'd have to check that  
the X flag was clear after those instructions.

> addxw %d0,%d2      : only addx.l supported.

Not terribly tough, but the change depends on what has to be done  
for the example above.  Can you check on the existence of some kind  
of loop control operation that doesn't modify X?

>
> So I am now very confused as to why this compiled before.

It must not have ever compiled.  Maybe you were getting the  
`generic'  checksum code before.

> I will try and generate a patch. The I cache will help here so
> maybe the general one will work ok.

I'd try to keep as much of the m68k-specific code as you can.  It  
really is quite a bit faster.

I'm going to be pretty busy this week, so I probably won't have time  
to work on this.
---
Eric Norum                                 eric at skatter.usask.ca
Saskatchewan Accelerator Laboratory        Phone: (306) 966-6308
University of Saskatchewan                 FAX:   (306) 966-6058
Saskatoon, Canada.