Why some ARM instructions do not use barrel shifter?

It's not that the barrel shifter isn't used it's that you aren't able to specify how it's used in all but very specific instructions (data processing and load/store). If you look at the instruction encoding you'll see that there is just no room to specify it.

Up vote 5 down vote favorite share g+ share fb share tw.

I am curious about why there are some ARM instuctions (like MUL and QADD) does not use barrel shifter. I would like to know the rational behind the limit. Thanks!

Arm link|improve this question asked Sep 30 '11 at 3:23user577251523 75% accept rate.

A barrel shifter shifts. It doesn't add or multiply. – Hans Passant Sep 30 '11 at 3:57 2 I think the question wad more like "Why can't I use a barrel-shifted value as the last argument to MUL or QADD?

" The reason might be silicon (not enough transistors to implement), it could be encoding (no room in instruction to encode shifts), it could be that it would slow down the instruction too much, it could be just the minus-100 points rule. Only the ARM designers know for sure. Asking here is unlikely to turn up an answer.

– Raymond Chen Sep 30 '11 at 4:07 I already post the question on their forum. :) – user577251 Sep 30 '11 at 6:46.

It's not that the barrel shifter isn't used; it's that you aren't able to specify how it's used in all but very specific instructions (data processing and load/store). If you look at the instruction encoding you'll see that there is just no room to specify it. In the case of instructions like MUL or SWP, they were not in the first version of the architecture.

They were squeezed into the instruction set by making use of otherwise invalid combinations of values for the specification of the barrel shifter. Since the barrel shifter specification bits had to be repurposed for storing things like what instruction to execute and what register to use as the multiplier, there was simply no way to specify how much to shift/rotate the operand.

A barrel shifter is used for fast shifting. As you know if you multiply a number with another number which is a power of two then you just have to shift it left. In these kind of special situations you can use a shift register.

But in general multiplications its efficient to follow normal multiplier designs.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions