STGP

Store Allocation Tag and Pair of registers stores an Allocation Tag and two 64-bit doublewords to memory, from two registers. The address used for the store is calculated from the base register and an immediate signed offset scaled by the Tag granule. The Allocation Tag is calculated from the Logical Address Tag in the base register.

This instruction generates an Unchecked access.

It has encodings from 3 classes: Post-index , Pre-index and Signed offset

Post-index
(FEAT_MTE)

313029282726252423222120191817161514131211109876543210
0110100010simm7Xt2XnXt

STGP <Xt1>, <Xt2>, [<Xn|SP>], #<imm>

if !HaveMTEExt() then UNDEFINED; integer n = UInt(Xn); integer t = UInt(Xt); integer t2 = UInt(Xt2); bits(64) offset = LSL(SignExtend(simm7, 64), LOG2_TAG_GRANULE); boolean writeback = TRUE; boolean postindex = TRUE;

Pre-index
(FEAT_MTE)

313029282726252423222120191817161514131211109876543210
0110100110simm7Xt2XnXt

STGP <Xt1>, <Xt2>, [<Xn|SP>, #<imm>]!

if !HaveMTEExt() then UNDEFINED; integer n = UInt(Xn); integer t = UInt(Xt); integer t2 = UInt(Xt2); bits(64) offset = LSL(SignExtend(simm7, 64), LOG2_TAG_GRANULE); boolean writeback = TRUE; boolean postindex = FALSE;

Signed offset
(FEAT_MTE)

313029282726252423222120191817161514131211109876543210
0110100100simm7Xt2XnXt

STGP <Xt1>, <Xt2>, [<Xn|SP>{, #<imm>}]

if !HaveMTEExt() then UNDEFINED; integer n = UInt(Xn); integer t = UInt(Xt); integer t2 = UInt(Xt2); bits(64) offset = LSL(SignExtend(simm7, 64), LOG2_TAG_GRANULE); boolean writeback = FALSE; boolean postindex = FALSE;

Assembler Symbols

<Xt1>

Is the 64-bit name of the first general-purpose register to be transferred, encoded in the "Xt" field.

<Xt2>

Is the 64-bit name of the second general-purpose register to be transferred, encoded in the "Xt2" field.

<Xn|SP>

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

<imm>

For the post-index and pre-index variant: is the signed immediate offset, a multiple of 16 in the range -1024 to 1008, encoded in the "simm7" field.

For the signed offset variant: is the optional signed immediate offset, a multiple of 16 in the range -1024 to 1008, defaulting to 0 and encoded in the "simm7" field.

Operation

bits(64) address; bits(64) data1; bits(64) data2; SetTagCheckedInstruction(FALSE); if n == 31 then CheckSPAlignment(); address = SP[]; else address = X[n]; data1 = X[t]; data2 = X[t2]; if !postindex then address = address + offset; if address != Align(address, TAG_GRANULE) then iswrite = TRUE; secondstage = FALSE; AArch64.Abort(address, AlignmentFault(AccType_NORMAL, iswrite, secondstage)); Mem[address, 8, AccType_NORMAL] = data1; Mem[address+8, 8, AccType_NORMAL] = data2; AArch64.MemTag[address, AccType_NORMAL] = AArch64.AllocationTagFromAddress(address); if writeback then if postindex then address = address + offset; if n == 31 then SP[] = address; else X[n] = address;


Internal version only: isa v33.11seprel, AdvSIMD v29.05, pseudocode v2021-09_rel, sve v2021-09_rc3d ; Build timestamp: 2021-10-06T11:41

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