Re: [Algorithms] Byte Swapping
Brought to you by:
vexxed72
From: Tom H. <to...@3d...> - 2000-07-16 06:56:57
|
At 08:42 AM 7/16/2000 +0200, you wrote: > > I can do the obvious method, but I was wondering if anyone have any > > cool/fast code snippets for byte swapping integers and floats? > >Depends on the platform. PowerPCs have "load word byte-reversed indexed" >(lwbrx) and "load halfword byte-reversed indexed" (lhbrx) instructions, >for instance. Since that happens to be my platform, perhaps you would have some routines handy that work in Codewarrior for the Mac that make those calls to reverse the bytes I'm loading? Tom |