STCLRH, STCLRLH

Atomic bit clear on halfword in memory, without return, atomically loads a 16-bit halfword from memory, performs a bitwise AND with the complement of the value held in a register on it, and stores the result back to memory.

For information about memory accesses see Load/Store addressing modes.

Integer
(ARMv8.1)

313029282726252423222120191817161514131211109876543210
011110000R1Rs000100Rn11111
sizeVAo3opc

No memory ordering (R == 0)

STCLRH <Ws>, [<Xn|SP>]

Release (R == 1)

STCLRLH <Ws>, [<Xn|SP>]

if !HaveAtomicExt() then UnallocatedEncoding(); integer n = UInt(Rn); integer s = UInt(Rs); AccType stacctype = if R == '1' then AccType_ORDEREDRW else AccType_ATOMICRW;

Assembler Symbols

<Ws>

Is the 32-bit name of the general-purpose register holding the data value to be operated on with the contents of the memory location, encoded in the "Rs" field.

<Xn|SP>

Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the "Rn" field.

Operation

bits(64) address; bits(16) value; bits(16) data; bits(16) result; value = X[s]; if n == 31 then CheckSPAlignment(); address = SP[]; else address = X[n]; data = Mem[address, 2, AccType_ATOMICRW]; result = data AND NOT(value); // All observers in the shareability domain observe the // following load and store atomically. Mem[address, 2, stacctype] = result;


Internal version only: isa v25.07, AdvSIMD v23.0, pseudocode v31.3

Copyright © 2010-2017 ARM Limited or its affiliates. All rights reserved. This document is Non-Confidential.