5.6.7 ElfDwarf scheme for canonical register numbers

The ElfDwarf scheme is used for the RegisterInfo.canonicalRn field if the instance property register.canonicalRnScheme has the string value ElfDwarf.

The ElfDwarf scheme uses the DWARF register numbers defined for a specific architecture, combined with the value of the ELF header field, e_machine, which defines the architecture and is used as a namespace for the DWARF register numbers. This results in unique canonical register numbers across all architectures that ELF supports. The ElfDwarf scheme is defined for all architectures supported by ELF that define DWARF register numbers. See /usr/include/elf.h for a list of all possible values for e_machine.

Only a subset of the registers of an instance have an assigned DWARF register number. All other registers do not have a RegisterInfo.canonicalRn field and therefore cannot be discovered through the canonical register number. Instead, they can be discovered by inspecting ResourceInfo.tags, for instance tags.isPc, or ResourceInfo.name, which contains the architectural register name, if available.

The RegisterInfo.canonicalRn value is a 64-bit value with the following structure:

0x0000MMMM0000NNNN

Where:

Bits[15:0], NNNN
DWARF register number for the architecture that is defined in the ELF header field e_machine.
Bits[31:16], 0000
Reserved. Instances must set these bits to zero.
Bits[47:32], MMMM
ELF EM_* constant for the architecture, as defined by the ELF header field e_machine. This is the namespace for the DWARF register number specified in bits[15:0].
Bits[63:48], 0000
Reserved. Instances must set these bits to zero.
Non-ConfidentialPDF file icon PDF version101196_0100_03_en
Copyright © 2018, 2019 Arm Limited or its affiliates. All rights reserved.