Thanks guys (I think) Boy did that get messy FAST. The barrel shifter is= =20 40 bits long and I have to shift an INT32 over by up to 32 bits into an INT64 space. I'll have to do no more=20 than an 8 bit shift, do some byte moves and swaps to get everything back where it belongs, then check to see= =20 if I have to do it again. I already have the check to see if an INT16 even needs to be shifted and th= e=20 INT16 level moves in place, so the max is only 2 passes thru the messy part. I may be able to do at=20 BYTE level what I have already done at INT16 level to see if it is necessary to shift or if I can just do a=20 MOV.B. The FF1L instruction result can tell me if there is anything in the high byte (>8 =3D high byte empty). That=20 would make the barrel shifter operation limited to BYTE size and only 1 pass. (Come to think of it, an AND with=20 0XFF00 also does the job) Ugly but workable and it WILL take out a ton of time in the process. Worth= =20 diving into. ("Ugly" is never much of a metric anyway) Time for another cuppa coffee and some cogitating= ..=20 Gotta think this one thru... ----- Original Message -----=20 From: "Joe Mickley" To: "Microcontroller discussion list - Public." Sent: Saturday, October 20, 2012 12:49 PM Subject: Re: [PIC] Fast 32 bit by 32 bit divide in a dsPIC30F > As far as I can see the shift has to span multi-word. That requires a > series of > SL,RLC,RLC,RLC for the INT64 and a SL, RLC for the INT32 to pick up the > multi-word > carries. There is no multi-bit count shift operation available that=20 > catches > the CARRY. > > Your point about the barrel shifter is well taken. I hadn't thought abou= t > that as it is > part of the DSP engine and I don't generally think to look down there. > I'll go back > and dig into that part of the chip and see what I can find. If I can get > the shift under better > control I'm back in the game. > > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist=20 --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .