Armv9 system register class空间编码
创始人
2024-06-02 07:54:38

1. 前言

Armv9 system register的编码空间由一组参数标识:{op0, op1, CRn, CRm, op2},它们形成了一个编码层次结构,其中:

  • op0:定义编码空间的最高类别划分。
  • op1:定义了可以访问这个编码空间的最低Exception level。具体如下:
    • Accessible at EL0:op1的值为3
    • Accessible at EL1:op1的值为0,1,2
    • Accessible at Secure EL1:op1的值为7
    • Accessible at EL2:op1的值为4,5。其中5是用于在VHE实现和HCR_EL2.E2H为1情况下,EL12编码访问EL1 system registers的。
    • Accessible at EL3:op1的值为6

ARM架构里预留了一些IMPLEMENTATION DEFINE的空间,它强烈建立这段空间的op1的值也要符合上述约定。

系统指令类的编码空间里的每条instruction有以下任意特性:

  • 转移到system register:这种system instruction具有写的特性;
  • 从system register转移。这种system instruction具有读的特性;

执行system instruction就像是对寄存器进行传输一样。

2. op0分类

在AArch64指令集中,system instruction class对{op0, op1, CRn, CRm, op2}的编码结构为:

 op0域提供了system instruction类型的最顶层编码分类,它的值有:

  • 0b00 These encodings provide:
    • Instructions with an immediate field for accessing PSTATE, the current PE state.
    • The architectural hint instructions.
    • Barriers and the CLREX instruction.
  • 0b01 These encodings provide:
    • Cache maintenance instructions.
    • TLB maintenance instructions.
    • Address translation instructions.
    • Prediction restriction instructions.
    • BRBE instructions.
  • 0b10 These encodings provide moves to and from:
    • Legacy AArch32 System registers for execution environments, to provide access to these registers from higher Exception levels that are using AArch64.
    • Debug and trace registers.
  • 0b11 These encodings provide:
    • Moves to and from Non-debug System registers. The accessed registers provide system control, and system status information.
    • Access to Special-purpose registers.

记忆原则就是43522,4是op1的类别,3522分别对应op1为0,1,,2,3的类别。

 

3. op0之下的分类

在上面我们看到系统寄存器的分类取决于{op0, op1, CRn, CRm, op2}参数。op0决定大类,在之下的根据op1,op2,CRn,CRm还可以继续细分有: 

上述是总体小类别划分的总结。

op0 == 0b00

 

op0 == 0b01

 

op0 == 0b10

 

op0 == 0b11

 

相关内容

热门资讯

最新或2023(历届)阳历春节...  每年的春节总是能够引起大家的强烈关注,很多人都对春节充满了期待,因为这是一年中为数不多较长的假期哦...
最新或2023(历届)公历鼠年... 最新或2023(历届)春节是阳历几月几号? 最新或2023(历届)什么时候过年?今年是什么生肖年?最...
最新或2023(历届)检察院严...   对于一名领导干部来说,保持先进性的一条重要标准和基本要求,就是要以正确的态度对待和使用手中的权力...
法院检察院严以用权专题研讨发言...   践行“三严三实”,修身是基础,用权是关键,律已是根本,务实是核心。严以用权严以修身,就是要加强党...
检察院严以用权研讨发言提纲 检...   抓好检察机关自身的党风廉政建设,是正确行使检察权的重要保证,也是塑造检察机关良好形象的重要环节。...