What does the extldi instruction do? (PowerPC)

I don't understand the instructions extldi

. The exact operation I want to solve is this:

r12

= 0xB070

extldi    r11, r12, 31,17

      

I have looked at many different sources of documentation but I don't seem to find a suitable example to figure this out; Instead of giving me an answer, I would like an explanation so that it helps in the future.

Thanks in advance.

+3


source to share


1 answer


extldi

- an enhanced mnemonic for rldicr

which Rotate left double word immediately, then Clear Right

extldi Rx,Ry,n,b

equivalent to rldicr Rx,Ry,b,n-1

More information can be found by referring to the PowerPC Architecture Book, Version 2.02, here


EDIT - More information on rldicr

:



Rotate the contents of the general register remaining by the bit number specified by the immediate value. Clear a certain number of low-order bits. Place the results in another general purpose register.

rldicr

has four parameters:

  • RA Specifies a general purpose target register for the result of an instruction.
  • RS Indicates the source general register containing the operand.
  • SH Specifies the (immediate) shift value for the operation.
  • ME Sets the end value (bit number) of the mask for operation.

Caution . This command is only defined for 64-bit implementations. Using it in a 32-bit implementation will cause an error handler to be called using an illegal command.

As for your situation, you just plug in the numbers and you're done. I hope you enjoy this edit.

+1


source







All Articles