This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ASR #32

In the SSAT instruction description it says:

ASR #32 Arithmetic right shift by 32 bits, permitted only for encoding A1.

Encoded as sh = 1, immsh = 0b00000.

What does that mean?

Isn't ASR #32 the same as ASR #31?

I understand that it shifts (with "sign extension") the whole 32-bit value out and leaves only the sign extension bits

that are "copies" of the highest bit of the original value.

What am I missing here?

Parents
  • Well I was thinking of something simple like testing the top two bits of a register. (I haven't tested this)

         MOVS   r0, r1, ASR #31

         BHI      starts_11     ; Z clear C set

         BMI     starts_10

         BCS     starts_01

         ...          starts_00

    using MVNS you can test for 01 first.

    p.s. I don't think this sort of thing makes for happy colleagues though it might ensure a living for years to come.

Reply
  • Well I was thinking of something simple like testing the top two bits of a register. (I haven't tested this)

         MOVS   r0, r1, ASR #31

         BHI      starts_11     ; Z clear C set

         BMI     starts_10

         BCS     starts_01

         ...          starts_00

    using MVNS you can test for 01 first.

    p.s. I don't think this sort of thing makes for happy colleagues though it might ensure a living for years to come.

Children