Memory Tagging Extension (MTE) - ARM - WikiChip
source link: https://en.wikichip.org/wiki/arm/mte
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Memory tagging extension (MTE, MemTag, ARMv8.5-MemTag) is an ARM extension that enables hardware-assisted memory tagging. MTE was introduced with the ARMv8.5 ISA. MTE is an optional extension.
Overview[edit]
The ARMv8.5 ISA introduces the memory Tagging Extension (MTE) which allows tags to be assigned to each memory allocation. Consequently, all memory accesses must then be made via a pointer with the correct tag. Memory accesses that use incorrect tags will trap, allowing the operating system to choose the course of action. MTE uses a 4-bit tag for every 16 bytes of memory. It's worth noting that the MTE pointer tags use the existing ARM ISA feature that is also used by the Pointer Authentication (PA) extension. This means that when both features are enabled, the PAC size is reduced by eight bits to accommodate MTE.
Instructions[edit]
MTE introduces 16 new instructions for working with tagged memory:
Instruction Name FormatADDG
Add with Tag
ADDG <Xd/SP>, <Xn/SP>, #<uimm6>, #<uimm4>
CMPP
Compare with Tag
CMPP <Xn/SP>, <Xm/SP>
GMI
Tag Mask Insert
GMI <Xd>, <Xn/SP>, <Xm>
IRG
Insert Random Tag
IRG <Xd/SP>, <Xn/SP>{, <Xm>}
LDG
Load Allocation Tag
LDG <Xt>, [<Xn/SP>{, #<simm>}]
LDGV
Load Tag Vector
LDGV <Xt>, [<Xn/SP>]!
ST2G
Store Allocaton Tags
ST2G [<Xn/SP>], #<simm>
ST2G [<Xn/SP>, #<simm>]!
STG
Store Allocation Tag
STG [<Xn/SP>], #<simm>
STG [<Xn/SP>, #<simm>]!
STG [<Xn/SP>{, #<simm>}]
STGP
Store Allocation Tag and Pair
STGP <Xt1>, <Xt2>, [<Xn/SP>], #<imm>
STGP <Xt1>, <Xt2>, [<Xn/SP>, #<imm>]!
STGP <Xt1>, <Xt2>, [<Xn/SP>{, #<imm>}]
STGV
Store Tag Vector
STGV <Xt>, [<Xn/SP>]!
STZ2G
Store Allocation Tags, Zeroing
STZ2G [<Xn/SP>], #<simm>
STZ2G [<Xn/SP>, #<simm>]!
STZ2G [<Xn/SP>{, #<simm>}]
STZG
Store Allocation Tag, Zeroing
STZG [<Xn/SP>], #<simm>
STZG [<Xn/SP>, #<simm>]!
STZG [<Xn/SP>{, #<simm>}]
SUBG
Subtract with Tag
SUBG <Xd/SP>, <Xn/SP>, #<uimm6>, #<uimm4>
SUBP
Subtract Pointer
SUBP <Xd>, <Xn/SP>, <Xm/SP>
SUBPS
Subtract Pointer, setting Flags
SUBPS <Xd>, <Xn/SP>, <Xm/SP>
See also[edit]
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK