Skip to content

Commit 7e6266d

Browse files
authored
feat(data): add Zihintntl instructions (#1213)
Closes #1179
1 parent ea744dd commit 7e6266d

File tree

12 files changed

+463
-1
lines changed

12 files changed

+463
-1
lines changed

backends/instructions_appendix/all_instructions.golden.adoc

Lines changed: 256 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4853,6 +4853,138 @@ Included in::
48534853
|===
48544854

48554855

4856+
[#udb:doc:inst:c_ntl_all]
4857+
== c.ntl.all
4858+
4859+
Synopsis::
4860+
Compressed non-temporal locality hint, all
4861+
4862+
Encoding::
4863+
[wavedrom, ,svg,subs='attributes',width="100%"]
4864+
....
4865+
{"reg":[{"bits":16,"name": 0x9016,"type":2}]}
4866+
....
4867+
4868+
Description::
4869+
The C.NTL.ALL instruction indicates that the immediately subsequent instruction
4870+
does not exhibit temporal locality within the capacity of any level of cache in
4871+
the memory hierarchy. C.NTL.ALL is encoded as C.ADD x0, x5.
4872+
4873+
4874+
Decode Variables::
4875+
c.ntl.all has no decode variables.
4876+
4877+
Included in::
4878+
[options="autowrap,autowidth"]
4879+
|===
4880+
| Extension | Version
4881+
4882+
| *Zca* | ~> 1.0.0
4883+
4884+
| *Zihintntl* | ~> 1.0.0
4885+
4886+
|===
4887+
4888+
4889+
[#udb:doc:inst:c_ntl_p1]
4890+
== c.ntl.p1
4891+
4892+
Synopsis::
4893+
Compressed non-temporal locality hint, innermost private
4894+
4895+
Encoding::
4896+
[wavedrom, ,svg,subs='attributes',width="100%"]
4897+
....
4898+
{"reg":[{"bits":16,"name": 0x900a,"type":2}]}
4899+
....
4900+
4901+
Description::
4902+
The C.NTL.P1 instruction indicates that the immediately subsequent instruction
4903+
does not exhibit temporal locality within the capacity of the innermost level
4904+
of private cache in the memory hierarchy. C.NTL.P1 is encoded as C.ADD x0, x2.
4905+
4906+
4907+
Decode Variables::
4908+
c.ntl.p1 has no decode variables.
4909+
4910+
Included in::
4911+
[options="autowrap,autowidth"]
4912+
|===
4913+
| Extension | Version
4914+
4915+
| *Zca* | ~> 1.0.0
4916+
4917+
| *Zihintntl* | ~> 1.0.0
4918+
4919+
|===
4920+
4921+
4922+
[#udb:doc:inst:c_ntl_pall]
4923+
== c.ntl.pall
4924+
4925+
Synopsis::
4926+
Compressed non-temporal locality hint, all private
4927+
4928+
Encoding::
4929+
[wavedrom, ,svg,subs='attributes',width="100%"]
4930+
....
4931+
{"reg":[{"bits":16,"name": 0x900e,"type":2}]}
4932+
....
4933+
4934+
Description::
4935+
The C.NTL.PALL instruction indicates that the immediately subsequent instruction
4936+
does not exhibit temporal locality within the capacity of any level of private
4937+
cache in the memory hierarchy. C.NTL.PALL is encoded as C.ADD x0, x3.
4938+
4939+
4940+
Decode Variables::
4941+
c.ntl.pall has no decode variables.
4942+
4943+
Included in::
4944+
[options="autowrap,autowidth"]
4945+
|===
4946+
| Extension | Version
4947+
4948+
| *Zca* | ~> 1.0.0
4949+
4950+
| *Zihintntl* | ~> 1.0.0
4951+
4952+
|===
4953+
4954+
4955+
[#udb:doc:inst:c_ntl_s1]
4956+
== c.ntl.s1
4957+
4958+
Synopsis::
4959+
Compressed non-temporal locality hint, innermost shared
4960+
4961+
Encoding::
4962+
[wavedrom, ,svg,subs='attributes',width="100%"]
4963+
....
4964+
{"reg":[{"bits":16,"name": 0x9012,"type":2}]}
4965+
....
4966+
4967+
Description::
4968+
The C.NTL.S1 instruction indicates that the immediately subsequent instruction
4969+
does not exhibit temporal locality within the capacity of the innermost level
4970+
of shared cache in the memory hierarchy. C.NTL.S1 is encoded as C.ADD x0, x4.
4971+
4972+
4973+
Decode Variables::
4974+
c.ntl.s1 has no decode variables.
4975+
4976+
Included in::
4977+
[options="autowrap,autowidth"]
4978+
|===
4979+
| Extension | Version
4980+
4981+
| *Zca* | ~> 1.0.0
4982+
4983+
| *Zihintntl* | ~> 1.0.0
4984+
4985+
|===
4986+
4987+
48564988
[#udb:doc:inst:c_or]
48574989
== c.or
48584990

@@ -16272,6 +16404,130 @@ Included in::
1627216404
|===
1627316405

1627416406

16407+
[#udb:doc:inst:ntl_all]
16408+
== ntl.all
16409+
16410+
Synopsis::
16411+
Non-temporal locality hint, all
16412+
16413+
Encoding::
16414+
[wavedrom, ,svg,subs='attributes',width="100%"]
16415+
....
16416+
{"reg":[{"bits":32,"name": 0x500033,"type":2}]}
16417+
....
16418+
16419+
Description::
16420+
The NTL.ALL instruction indicates that the immediately subsequent instruction
16421+
does not exhibit temporal locality within the capacity of any level of cache
16422+
in the memory hierarchy. NTL.ALL is encoded as ADD x0, x0, x5.
16423+
16424+
16425+
Decode Variables::
16426+
ntl.all has no decode variables.
16427+
16428+
Included in::
16429+
[options="autowrap,autowidth"]
16430+
|===
16431+
| Extension | Version
16432+
16433+
| *Zihintntl* | ~> 1.0.0
16434+
16435+
|===
16436+
16437+
16438+
[#udb:doc:inst:ntl_p1]
16439+
== ntl.p1
16440+
16441+
Synopsis::
16442+
Non-temporal locality hint, innermost private
16443+
16444+
Encoding::
16445+
[wavedrom, ,svg,subs='attributes',width="100%"]
16446+
....
16447+
{"reg":[{"bits":32,"name": 0x200033,"type":2}]}
16448+
....
16449+
16450+
Description::
16451+
The NTL.P1 instruction indicates that the immediately subsequent instruction
16452+
does not exhibit temporal locality within the capacity of the innermost level
16453+
of private cache in the memory hierarchy. NTL.P1 is encoded as ADD x0, x0, x2.
16454+
16455+
16456+
Decode Variables::
16457+
ntl.p1 has no decode variables.
16458+
16459+
Included in::
16460+
[options="autowrap,autowidth"]
16461+
|===
16462+
| Extension | Version
16463+
16464+
| *Zihintntl* | ~> 1.0.0
16465+
16466+
|===
16467+
16468+
16469+
[#udb:doc:inst:ntl_pall]
16470+
== ntl.pall
16471+
16472+
Synopsis::
16473+
Non-temporal locality hint, all private
16474+
16475+
Encoding::
16476+
[wavedrom, ,svg,subs='attributes',width="100%"]
16477+
....
16478+
{"reg":[{"bits":32,"name": 0x300033,"type":2}]}
16479+
....
16480+
16481+
Description::
16482+
The NTL.PALL instruction indicates that the immediately subsequent instruction
16483+
does not exhibit temporal locality within the capacity of any level of private
16484+
cache in the memory hierarchy. NTL.PALL is encoded as ADD x0, x0, x3.
16485+
16486+
16487+
Decode Variables::
16488+
ntl.pall has no decode variables.
16489+
16490+
Included in::
16491+
[options="autowrap,autowidth"]
16492+
|===
16493+
| Extension | Version
16494+
16495+
| *Zihintntl* | ~> 1.0.0
16496+
16497+
|===
16498+
16499+
16500+
[#udb:doc:inst:ntl_s1]
16501+
== ntl.s1
16502+
16503+
Synopsis::
16504+
Non-temporal locality hint, innermost shared
16505+
16506+
Encoding::
16507+
[wavedrom, ,svg,subs='attributes',width="100%"]
16508+
....
16509+
{"reg":[{"bits":32,"name": 0x400033,"type":2}]}
16510+
....
16511+
16512+
Description::
16513+
The NTL.S1 instruction indicates that the immediately subsequent instruction
16514+
does not exhibit temporal locality within the capacity of the innermost level
16515+
of shared cache in the memory hierarchy. NTL.S1 is encoded as ADD x0, x0, x4.
16516+
16517+
16518+
Decode Variables::
16519+
ntl.s1 has no decode variables.
16520+
16521+
Included in::
16522+
[options="autowrap,autowidth"]
16523+
|===
16524+
| Extension | Version
16525+
16526+
| *Zihintntl* | ~> 1.0.0
16527+
16528+
|===
16529+
16530+
1627516531
[#udb:doc:inst:or]
1627616532
== or
1627716533

spec/std/isa/ext/Zihintntl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$schema: "ext_schema.json#"
77
kind: extension
88
name: Zihintntl
9-
long_name: NTL (Non-Temporal Locality) Hint Instructions
9+
long_name: NTL Non-Temporal Locality Hint Instructions
1010
description: |
1111
The NTL instructions are HINTs that indicate that the explicit memory
1212
accesses of the immediately subsequent instruction (henceforth "target

spec/std/isa/inst/C/c.add.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ access:
2929
u: always
3030
vs: always
3131
vu: always
32+
hints:
33+
- { $ref: inst/Zihintntl/c.ntl.p1.yaml# }
34+
- { $ref: inst/Zihintntl/c.ntl.pall.yaml# }
35+
- { $ref: inst/Zihintntl/c.ntl.s1.yaml# }
36+
- { $ref: inst/Zihintntl/c.ntl.all.yaml# }
3237
operation(): |
3338
XReg t0 = X[xd];
3439
XReg t1 = X[xs2];

spec/std/isa/inst/I/add.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ access:
2727
vs: always
2828
vu: always
2929
data_independent_timing: true
30+
hints:
31+
- { $ref: inst/Zihintntl/ntl.p1.yaml# }
32+
- { $ref: inst/Zihintntl/ntl.pall.yaml# }
33+
- { $ref: inst/Zihintntl/ntl.s1.yaml# }
34+
- { $ref: inst/Zihintntl/ntl.all.yaml# }
3035
operation(): X[xd] = X[xs1] + X[xs2];
3136

3237
# SPDX-SnippetBegin
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) Jordan Carlin
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
# yaml-language-server: $schema=../../../../schemas/inst_schema.json
5+
6+
$schema: inst_schema.json#
7+
kind: instruction
8+
name: c.ntl.all
9+
long_name: Compressed non-temporal locality hint, all
10+
description: |
11+
The C.NTL.ALL instruction indicates that the immediately subsequent instruction
12+
does not exhibit temporal locality within the capacity of any level of cache in
13+
the memory hierarchy. C.NTL.ALL is encoded as C.ADD x0, x5.
14+
definedBy:
15+
allOf:
16+
- Zca
17+
- Zihintntl
18+
assembly: ""
19+
encoding:
20+
match: "1001000000010110"
21+
access:
22+
s: always
23+
u: always
24+
vs: always
25+
vu: always
26+
data_independent_timing: false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) Jordan Carlin
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
# yaml-language-server: $schema=../../../../schemas/inst_schema.json
5+
6+
$schema: inst_schema.json#
7+
kind: instruction
8+
name: c.ntl.p1
9+
long_name: Compressed non-temporal locality hint, innermost private
10+
description: |
11+
The C.NTL.P1 instruction indicates that the immediately subsequent instruction
12+
does not exhibit temporal locality within the capacity of the innermost level
13+
of private cache in the memory hierarchy. C.NTL.P1 is encoded as C.ADD x0, x2.
14+
definedBy:
15+
allOf:
16+
- Zca
17+
- Zihintntl
18+
assembly: ""
19+
encoding:
20+
match: "1001000000001010"
21+
access:
22+
s: always
23+
u: always
24+
vs: always
25+
vu: always
26+
data_independent_timing: false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) Jordan Carlin
2+
# SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
# yaml-language-server: $schema=../../../../schemas/inst_schema.json
5+
6+
$schema: inst_schema.json#
7+
kind: instruction
8+
name: c.ntl.pall
9+
long_name: Compressed non-temporal locality hint, all private
10+
description: |
11+
The C.NTL.PALL instruction indicates that the immediately subsequent instruction
12+
does not exhibit temporal locality within the capacity of any level of private
13+
cache in the memory hierarchy. C.NTL.PALL is encoded as C.ADD x0, x3.
14+
definedBy:
15+
allOf:
16+
- Zca
17+
- Zihintntl
18+
assembly: ""
19+
encoding:
20+
match: "1001000000001110"
21+
access:
22+
s: always
23+
u: always
24+
vs: always
25+
vu: always
26+
data_independent_timing: false

0 commit comments

Comments
 (0)