05.02.2013 Views

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Assembler syntax<br />

USAT , #, {,}<br />

where:<br />

See St<strong>and</strong>ard assembler syntax fields on page A8-7.<br />

The destination register.<br />

The bit position for saturation, in the range 0 to 31.<br />

The register that contains the value to be saturated.<br />

Instruction Details<br />

The optional shift, encoded in the sh bit <strong>and</strong> five bits in imm3:imm2 for encoding T1 <strong>and</strong><br />

imm5 for encoding A1. It must be one of:<br />

omitted No shift. Encoded as sh = 0, five bits = 0b00000<br />

LSL # Left shift by bits, with in the range 1-31.<br />

Encoded as sh = 0, five bits = .<br />

ASR # Arithmetic right shift by bits, with in the range 1-31.<br />

Encoded as sh = 1, five bits = .<br />

ASR #32 Arithmetic right shift by 32 bits, permitted only for encoding A1.<br />

Encoded as sh = 1, imm5 = 0b00000.<br />

Operation<br />

Note<br />

An assembler can permit ASR #0 or LSL #0 to mean the same thing as omitting the shift, but<br />

this is not st<strong>and</strong>ard UAL <strong>and</strong> must not be used for disassembly.<br />

if ConditionPassed() then<br />

EncodingSpecificOperations();<br />

oper<strong>and</strong> = Shift(R[n], shift_t, shift_n, APSR.C); // APSR.C ignored<br />

(result, sat) = UnsignedSatQ(SInt(oper<strong>and</strong>), saturate_to);<br />

R[d] = ZeroExtend(result, 32);<br />

if sat then<br />

APSR.Q = ‘1’;<br />

Exceptions<br />

None.<br />

<strong>ARM</strong> DDI 0406B Copyright © 1996-1998, 2000, 2004-2008 <strong>ARM</strong> Limited. All rights reserved. A8-505

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!