Skip to content

Commit 791314b

Browse files
james-ball-qualcommcoreyqhTnnsBeastSadhviNarayanandavidharrishmc
authored
Adding ~2000 normative rules from CSC to main repo (#2518)
* Zfh norm rules * Zfa norm rules * Remove non cmo norm rule/tag changes * Fix typo * fixed duplicates in normative rules * Updated rules with feedback * Rule updates * Norm rules for rv32e * Use latest docs-resources submodule Signed-off-by: James Ball <[email protected]> * Minor typo fixes * Move yaml file to normative rules dir * Move to norm rules dir * Minor typo fixes * Update normative_curations to normative_rule_definitions * Move rules to norm rules dir * typo fixes * typo fix * bfloat16 norm tags and rules * fix header currations to definitions * Zfinx norm tags and rules * addressed feedback * all changes committed * updated format * vector crypto norm rules and tags * second half vector crypto * Fix naming underscores and dashes, remove untestable rules, tag CSRs better * requested changes fixed * old removed * updated style, added remaining zicsr tags and rules * merge * fixed yaml file names to match * cleanup * Merge conflict with spaces * Switch to latest docs-resources Signed-off-by: James Ball <[email protected]> * Manually merged in changes from PR 11 Signed-off-by: James Ball <[email protected]> * Fixed wrong link is norm rule tagging doc Signed-off-by: James Ball <[email protected]> * Cleanup * Removed bad tags * chapter names and yaml language servers * Fixing yaml * yaml fixes * cleanup * tagging schema * Trailing spaces * Reduce from 151 to 77 number of norm rule defs referencing non-existant adoc tags. And switching to latest doc-resources (no tool changes though). Signed-off-by: James Ball <[email protected]> * Added AI summary of normative rule tagging errors (used Claude). Signed-off-by: James Ball <[email protected]> * Merging changes from upstream CSC fork to this fork. Signed-off-by: James Ball <[email protected]> * Update to latest docs-resources Signed-off-by: James Ball <[email protected]> * Added norm rules for c-st-ext and zilsd (manually copied from HMC fork) Signed-off-by: James Ball <[email protected]> * Bump pre-commit/action from 3.0.0 to 3.0.1 Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/pre-commit/action/releases) - [Commits](pre-commit/action@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: pre-commit/action dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/setup-python from 5 to 6 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/upload-artifact from 4 to 5 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/upload-pages-artifact from 3 to 4 Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-pages-artifact/releases) - [Commits](actions/upload-pages-artifact@v3...v4) --- updated-dependencies: - dependency-name: actions/upload-pages-artifact dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Adding normative rules for priv-csrs Signed-off-by: James Ball <[email protected]> * Added norm rules for Zc extension Signed-off-by: James Ball <[email protected]> * Reduced zilsd chapter name Signed-off-by: James Ball <[email protected]> * Added fix for partial tagging of unordered list in Zc Signed-off-by: James Ball <[email protected]> * Fixed all HMC norm rules that referenced non-existant tags Signed-off-by: James Ball <[email protected]> * Shortened chapter names to fit better in cells and fixed $schema paths that were corrupted. Signed-off-by: James Ball <[email protected]> * Updated docs-resources to latest with fixes/improvements and changed Makefile to have uncommented warning flag. Signed-off-by: James Ball <[email protected]> * Fixed unreferenced rules * formatted yaml per pre-commit hook * Fix renaming of anchor from "rm" to "norm:dyn_round_enc". Signed-off-by: James Ball <[email protected]> * Update Makefile to add HTML format of normative rules Signed-off-by: James Ball <[email protected]> * Build just HTML version of norm rules for all/build targets Signed-off-by: James Ball <[email protected]> * Using norm rule direct to html and Tim's toggle to display norm tags Signed-off-by: James Ball <[email protected]> * Update to latest docs-resources submodule Signed-off-by: James Ball <[email protected]> * Removed tags_without_text (obscure feature not required by norm rules) Signed-off-by: James Ball <[email protected]> * Bump softprops/action-gh-release from 2.4.1 to 2.4.2 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.1 to 2.4.2. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Commits](softprops/action-gh-release@v2.4.1...v2.4.2) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 2.4.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump docs-resources from `7f7f63a` to `40844de` Bumps [docs-resources](https://github.com/riscv/docs-resources) from `7f7f63a` to `40844de`. - [Commits](riscv/docs-resources@7f7f63a...40844de) --- updated-dependencies: - dependency-name: docs-resources dependency-version: 40844defba0d1bcad46ce690ebca51912fbb3f67 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Update to docs-resources with better norm rule HTML table column names Signed-off-by: James Ball <[email protected]> * Fix formatting in m-st-ext.adoc Correct spacing in REMW and REMUW documentation. Signed-off-by: David Harris <[email protected]> * Build and deploy norm-rules.json and norm-rules.html so they can have a static URL Signed-off-by: James Ball <[email protected]> * Copy priv/unpriv ISA manual HTML to same directory as norm-rules.html (mimicking how they are all in the build directory) Signed-off-by: James Ball <[email protected]> * Forgot to put riscv- prefix into ISA manual HTML copied to norm-rules deployment directory for GitHub Pages Signed-off-by: James Ball <[email protected]> * Use latest docs-resources Signed-off-by: James Ball <[email protected]> * Added normative rules Signed-off-by: James Ball <[email protected]> * Updated to match agreed parameter tagging scheme. Made a few other small improvements while at it. Signed-off-by: James Ball <[email protected]> * Replace _param with kind: parameter Signed-off-by: James Ball <[email protected]> * Update to latest docs-resources commit Signed-off-by: James Ball <[email protected]> * Use tag instead of tags if only one tag in Zilsd norm rules Signed-off-by: James Ball <[email protected]> * Incorporating some feedback from Christian on Zilsd norm rules Signed-off-by: James Ball <[email protected]> * Update f-st-ext.yaml Signed-off-by: james-ball-qualcomm <[email protected]> * Update f-st-ext.adoc Signed-off-by: james-ball-qualcomm <[email protected]> * update doc-resources submodule * Added blank lines in zimop.yaml and zimop.adoc for norm_rule review * Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Made changes to Zilsd norm rules based on PR feedback from Christian and Derek Signed-off-by: James Ball <[email protected]> * A couple of additional latexmath calls in mm-formal.adoc (should be all gone). Signed-off-by: James Ball <[email protected]> * Added more norm rules into M-mode chapter. Commiting so I can merge in changes from upstream ISA manual chapters. Signed-off-by: James Ball <[email protected]> * Extract norm rules in m-mode up to endianness control in mstatus Signed-off-by: James Ball <[email protected]> * Bump docs-resources from `49eff17` to `824bd66` Bumps [docs-resources](https://github.com/riscv/docs-resources) from `49eff17` to `824bd66`. - [Commits](riscv/docs-resources@49eff17...824bd66) --- updated-dependencies: - dependency-name: docs-resources dependency-version: 824bd661c4464e1314309ed07c9069753940929b dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Latest docs-resources Signed-off-by: James Ball <[email protected]> * Bump softprops/action-gh-release from 2.4.2 to 2.5.0 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.2 to 2.5.0. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Commits](softprops/action-gh-release@v2.4.2...v2.5.0) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Fix formatting for C.FLDSP instruction description Signed-off-by: David Harris <[email protected]> * Rename c-fdwsp_op to c-fldsp_op in YAML file Signed-off-by: David Harris <[email protected]> * Remove c-jalr entry from c-st-ext.yaml Removed the 'c-jalr' entry from the YAML file. Redundant with the c-ebreak entry with the same tag and the c_jalr_op entry with the main operation. Signed-off-by: David Harris <[email protected]> * Working my way through the machine chapter. Got up to mstatus.tw. Signed-off-by: James Ball <[email protected]> * Remove spaces yamlchk didn't like Signed-off-by: James Ball <[email protected]> * Get latest docs-resources to get fix for table column widths Signed-off-by: James Ball <[email protected]> * added norm rule tags for wavedrom generated images * Latest docs-resources Signed-off-by: James Ball <[email protected]> * Replace note with clarification text for rule mstatus_tw_op Signed-off-by: James Ball <[email protected]> * removed some non-normative text from zimop. changed to inline tag * Replace note with clarification text for rule mstatus_tw_op Signed-off-by: James Ball <[email protected]> * Bump softprops/action-gh-release from 2.4.2 to 2.5.0 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.4.2 to 2.5.0. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Commits](softprops/action-gh-release@v2.4.2...v2.5.0) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 2.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Latest docs-resources Signed-off-by: James Ball <[email protected]> * changed name of c-mop tag from tab:c-mop to norm:c-mop_enc * added zcmop enc table tags to yaml file * Added norm rule to image to test HTML Signed-off-by: James Ball <[email protected]> * added additional context for existing rules by adding another tag for ztso_ld,sd,amo * removed trailing blank spaces * Merging in origin/main Signed-off-by: James Ball <[email protected]> * Finished tagging mstatus Signed-off-by: James Ball <[email protected]> * Bump actions/github-script from 6 to 8 Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v6...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Added norm rules for mtvec CSR Signed-off-by: James Ball <[email protected]> * Added medeleg and mideleg CSRs Signed-off-by: James Ball <[email protected]> * updated doc resources * Adding mip/mie Signed-off-by: James Ball <[email protected]> * Added norm rules for mip/mie. Signed-off-by: James Ball <[email protected]> * Added fcvtmod-w-s_rsv rule * Fixed typo * Added c-srai_hint normative rule * Zihintntl: Created PR to enable review (won't show all changes like normal) (#119) * Fixes issue #80. Removed norm rule fence_null_pred_succ_inter and its tags with the same name. Added norm rules and tags for HINT and NOP instructions. Signed-off-by: James Ball <[email protected]> * Remove copilot_instructions.md Signed-off-by: James Ball <[email protected]> * Remove changes accidentally introduced by tagging into priv ISA volume. Signed-off-by: James Ball <[email protected]> * Remove changes accidentally introduced by tagging into unpriv ISA volume. Signed-off-by: James Ball <[email protected]> * Found a couple more unintentional visible changes introduced by norm tagging by using Copilot to compare HTML versions of priv and unpriv ISA volumes. Signed-off-by: James Ball <[email protected]> * Machine mode chapter now has norm rules tagged up to mcause (mtval is next). Signed-off-by: James Ball <[email protected]> * Bump actions/upload-artifact from 5 to 6 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump docs-resources from `d644eb9` to `b5eaf50` Bumps [docs-resources](https://github.com/riscv/docs-resources) from `d644eb9` to `b5eaf50`. - [Commits](riscv/docs-resources@d644eb9...b5eaf50) --- updated-dependencies: - dependency-name: docs-resources dependency-version: b5eaf5000174386aa3d790eb6e0904ced0f2a93b dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * Bump pre-commit/action from 3.0.0 to 3.0.1 Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/pre-commit/action/releases) - [Commits](pre-commit/action@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: pre-commit/action dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump actions/setup-python from 5 to 6 Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Bump pre-commit/action from 3.0.0 to 3.0.1 Bumps [pre-commit/action](https://github.com/pre-commit/action) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/pre-commit/action/releases) - [Commits](pre-commit/action@v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: pre-commit/action dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: James Ball <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: james-ball-qualcomm <[email protected]> Signed-off-by: James Ball <[email protected]> Signed-off-by: David Harris <[email protected]> Signed-off-by: james-ball-qualcomm <[email protected]> Co-authored-by: Corey Hickson <[email protected]> Co-authored-by: Neil Chulani <[email protected]> Co-authored-by: SadhviNarayanan <[email protected]> Co-authored-by: David Harris <[email protected]> Co-authored-by: David Harris <[email protected]> Co-authored-by: Noah Fotenos <[email protected]> Co-authored-by: Vikram Krishna <[email protected]> Co-authored-by: Georgia Tai <[email protected]> Co-authored-by: jacassidy <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jamie Grimm <[email protected]>
1 parent 103fee6 commit 791314b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+7917
-2463
lines changed

.github/workflows/clarification.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: startsWith(github.event.comment.body, '/clarification')
1313
steps:
1414
- name: Add Clarification Label
15-
uses: actions/github-script@v6
15+
uses: actions/github-script@v8
1616
with:
1717
script: |
1818
github.rest.issues.addLabels({

.github/workflows/isa-build.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Get current date
4242
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
4343

44-
# Build PDF and HTML files using the container
44+
# Build PDF and HTML ISA manual versions and normative rule files using the container
4545
- name: Build Files
4646
id: build_files
4747
run: make -j$(nproc)
@@ -100,6 +100,24 @@ jobs:
100100
path: ${{ github.workspace }}/build/riscv-unprivileged.epub
101101
retention-days: 7
102102

103+
# Upload norm-rules.html
104+
- name: Upload norm-rules.html
105+
if: steps.build_files.outcome == 'success'
106+
uses: actions/upload-artifact@v6
107+
with:
108+
name: norm-rules-${{ env.SHORT_SHA }}.html
109+
path: ${{ github.workspace }}/build/norm-rules.html
110+
retention-days: 7
111+
112+
# Upload norm-rules.json
113+
- name: Upload norm-rules.json
114+
if: steps.build_files.outcome == 'success'
115+
uses: actions/upload-artifact@v6
116+
with:
117+
name: norm-rules-${{ env.SHORT_SHA }}.json
118+
path: ${{ github.workspace }}/build/norm-rules.json
119+
retention-days: 7
120+
103121
- name: Create Release
104122
if: steps.build_files.outcome == 'success' && github.event_name == 'workflow_dispatch' && github.event.inputs.create_release == 'true'
105123
#uses: softprops/[email protected]
@@ -118,19 +136,28 @@ jobs:
118136
${{ github.workspace }}/build/riscv-unprivileged.pdf
119137
${{ github.workspace }}/build/riscv-unprivileged.html
120138
${{ github.workspace }}/build/riscv-unprivileged.epub
139+
${{ github.workspace }}/build/norm-rules.html
140+
${{ github.workspace }}/build/norm-rules.json
121141
env:
122142
GITHUB_TOKEN: ${{ secrets.GHTOKEN }}
123143

124-
# Create directory structure pages sites for privileged and unprivileged specs.
144+
# Create directory structure pages sites for privileged and unprivileged ISA manuals and normative rule files.
145+
# Copy priv/unpriv ISA manual HTML also into norm-rules directory so hyperlinks from
146+
# norm-rules.html into the ISA manual are found (matches local build).
125147
- name: Make GitHub pages directory
126148
run: |
127-
mkdir -p dist/snapshot/unprivileged dist/snapshot/privileged
149+
mkdir -p dist/snapshot/unprivileged dist/snapshot/privileged dist/snapshot/norm-rules
128150
cp build/riscv-unprivileged.html dist/snapshot/unprivileged/index.html
129151
cp build/riscv-privileged.html dist/snapshot/privileged/index.html
152+
cp build/norm-rules.html dist/snapshot/norm-rules/index.html
153+
cp build/norm-rules.html dist/snapshot/norm-rules/norm-rules.html
154+
cp build/norm-rules.json dist/snapshot/norm-rules/norm-rules.json
155+
cp build/riscv-unprivileged.html dist/snapshot/norm-rules/riscv-unprivileged.html
156+
cp build/riscv-privileged.html dist/snapshot/norm-rules/riscv-privileged.html
130157
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')
131158

132159
- name: Upload pages artifact
133-
uses: actions/upload-pages-artifact@v3
160+
uses: actions/upload-pages-artifact@v4
134161
with:
135162
path: dist
136163
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/main')

.github/workflows/pre-commit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v6
14-
- uses: actions/setup-python@v5
15-
- uses: pre-commit/[email protected].0
14+
- uses: actions/setup-python@v6
15+
- uses: pre-commit/[email protected].1

Makefile

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ DOCS_PDF := $(addprefix $(BUILD_DIR)/, $(addsuffix .pdf, $(DOCS)))
9999
DOCS_HTML := $(addprefix $(BUILD_DIR)/, $(addsuffix .html, $(DOCS)))
100100
DOCS_EPUB := $(addprefix $(BUILD_DIR)/, $(addsuffix .epub, $(DOCS)))
101101
DOCS_NORM_TAGS := $(addprefix $(BUILD_DIR)/, $(addsuffix $(DOC_NORM_TAG_SUFFIX), $(DOCS)))
102-
NORM_RULES := $(BUILD_DIR)/norm-rules.json
102+
NORM_RULES_JSON := $(BUILD_DIR)/norm-rules.json
103+
NORM_RULES_HTML := $(BUILD_DIR)/norm-rules.html
103104

104105
ENV := LANG=C.utf8
105106
XTRA_ADOC_OPTS :=
@@ -108,7 +109,8 @@ ASCIIDOCTOR_PDF := $(ENV) asciidoctor-pdf
108109
ASCIIDOCTOR_HTML := $(ENV) asciidoctor
109110
ASCIIDOCTOR_EPUB := $(ENV) asciidoctor-epub3
110111
ASCIIDOCTOR_TAGS := $(ENV) asciidoctor --backend tags --require=./docs-resources/converters/tags.rb
111-
CREATE_NORM_RULE_TOOL := ruby docs-resources/tools/create_normative_rules.rb
112+
CREATE_NORM_RULE_TOOL := docs-resources/tools/create_normative_rules.rb
113+
CREATE_NORM_RULE_RUBY := ruby $(CREATE_NORM_RULE_TOOL)
112114

113115
OPTIONS := --trace \
114116
-a compress \
@@ -128,7 +130,8 @@ REQUIRES := --require=asciidoctor-bibtex \
128130
--require=asciidoctor-mathematical \
129131
--require=asciidoctor-sail
130132

131-
.PHONY: all build clean build-docs build-pdf build-html build-epub build-tags build-norm-rules docker-pull-latest
133+
.PHONY: all build clean build-container build-no-container build-docs build-pdf build-html build-epub build-tags docker-pull-latest submodule-check
134+
.PHONY: build-norm-rules build-norm-rules-json build-norm-rules-html
132135

133136
all: build
134137

@@ -143,20 +146,28 @@ build-pdf: $(DOCS_PDF)
143146
build-html: $(DOCS_HTML)
144147
build-epub: $(DOCS_EPUB)
145148
build-tags: $(DOCS_NORM_TAGS)
146-
build-norm-rules: $(NORM_RULES)
147-
build: build-pdf build-html build-epub build-tags build-norm-rules
149+
build-norm-rules-json: $(NORM_RULES_JSON)
150+
build-norm-rules-html: $(NORM_RULES_HTML)
151+
build-norm-rules: build-norm-rules-json build-norm-rules-html
152+
build: build-pdf build-html build-epub build-tags build-norm-rules-json build-norm-rules-html
148153

149154
ALL_SRCS := $(shell git ls-files $(SRC_DIR))
150155

151-
# All normative rule definition input YAML files tracked under Git (ensure you at least stage new files).
152-
NORM_RULE_DEF_FILES := $(shell git ls-files '$(NORM_RULE_DEF_DIR)/*.yaml')
156+
# All normative rule definition input YAML files.
157+
NORM_RULE_DEF_FILES := $(wildcard $(NORM_RULE_DEF_DIR)/*.yaml)
153158

154159
# Add -t to each normative tag input filename and add prefix of "/" to make into absolute pathname.
155160
NORM_TAG_FILE_ARGS := $(foreach relative_pname,$(DOCS_NORM_TAGS),-t /$(relative_pname))
156161

157162
# Add -d to each normative rule definition filename
158163
NORM_RULE_DEF_ARGS := $(foreach relative_pname,$(NORM_RULE_DEF_FILES),-d $(relative_pname))
159164

165+
# Provide mapping from an ISA manual's norm tags JSON file to a URL that one can link to. Used to create links into ISA manual.
166+
NORM_RULE_DOC2URL_ARGS := $(foreach doc_name,$(DOCS),-tag2url /$(BUILD_DIR)/$(doc_name)$(DOC_NORM_TAG_SUFFIX) $(doc_name).html)
167+
168+
# Temporarily make errors warnings. Don't check this in uncommented.
169+
# NORM_RULE_DEF_ARGS := $(NORM_RULE_DEF_ARGS) -w
170+
160171
$(BUILD_DIR)/%.pdf: $(SRC_DIR)/%.adoc $(ALL_SRCS)
161172
$(WORKDIR_SETUP)
162173
$(DOCKER_CMD) $(DOCKER_QUOTE) $(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) $< $(DOCKER_QUOTE)
@@ -180,11 +191,18 @@ $(BUILD_DIR)/%-norm-tags.json: $(SRC_DIR)/%.adoc $(ALL_SRCS) docs-resources/conv
180191
$(DOCKER_CMD) $(DOCKER_QUOTE) $(ASCIIDOCTOR_TAGS) $(OPTIONS) -a tags-match-prefix='norm:' -a tags-output-suffix='-norm-tags.json' $(REQUIRES) $< $(DOCKER_QUOTE)
181192
$(WORKDIR_TEARDOWN)
182193

183-
$(NORM_RULES): $(DOCS_NORM_TAGS) $(NORM_RULE_DEF_FILES)
194+
$(NORM_RULES_JSON): $(DOCS_NORM_TAGS) $(NORM_RULE_DEF_FILES) $(CREATE_NORM_RULE_TOOL)
195+
$(WORKDIR_SETUP)
196+
cp -f $(DOCS_NORM_TAGS) $@.workdir
197+
mkdir -p $@.workdir/build
198+
$(DOCKER_CMD) $(DOCKER_QUOTE) $(CREATE_NORM_RULE_RUBY) -j $(NORM_TAG_FILE_ARGS) $(NORM_RULE_DEF_ARGS) $(NORM_RULE_DOC2URL_ARGS) $@ $(DOCKER_QUOTE)
199+
$(WORKDIR_TEARDOWN)
200+
201+
$(NORM_RULES_HTML): $(DOCS_NORM_TAGS) $(NORM_RULE_DEF_FILES) $(CREATE_NORM_RULE_TOOL) $(DOCS_HTML)
184202
$(WORKDIR_SETUP)
185203
cp -f $(DOCS_NORM_TAGS) $@.workdir
186204
mkdir -p $@.workdir/build
187-
$(DOCKER_CMD) $(DOCKER_QUOTE) $(CREATE_NORM_RULE_TOOL) $(NORM_TAG_FILE_ARGS) $(NORM_RULE_DEF_ARGS) $@ $(DOCKER_QUOTE)
205+
$(DOCKER_CMD) $(DOCKER_QUOTE) $(CREATE_NORM_RULE_RUBY) -h $(NORM_TAG_FILE_ARGS) $(NORM_RULE_DEF_ARGS) $(NORM_RULE_DOC2URL_ARGS) $@ $(DOCKER_QUOTE)
188206
$(WORKDIR_TEARDOWN)
189207

190208
# Update docker image to latest

normative_rule_defs/bfloat16.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# yaml-language-server: $schema=../docs-resources/schemas/defs-schema.json
3+
4+
$schema: ../docs-resources/schemas/defs-schema.json#
5+
6+
chapter_name: Bfloat16
7+
8+
normative_rule_definitions:
9+
10+
- name: fcvt-bf16-s_op
11+
tags: ["norm:fcvt-bf16-s_op"]
12+
13+
- name: fcvt-s-bf16_op
14+
tags: ["norm:fcvt-s-bf16_op"]
15+
16+
- name: vfncvtbf16-f-f-w_op
17+
tags: ["norm:vfncvtbf16-f-f-w_op"]
18+
19+
- name: vfncvtbf16-f-f-w_sew_rsv
20+
tags: ["norm:vfncvtbf16-f-f-w_sew_rsv"]
21+
22+
- name: vfwcvtbf16-f-f-v_op
23+
tags: ["norm:vfwcvtbf16-f-f-v_op"]
24+
25+
- name: vfwcvtbf16-f-f-v_sew_rsv
26+
tags: ["norm:vfwcvtbf16-f-f-v_sew_rsv"]
27+
28+
- name: vfwmaccbf16_vv_op
29+
tags: ["norm:vfwmaccbf16_op", "norm:vfwmaccbf16_vv", "norm:bf16_subnorm"]
30+
31+
- name: vfwmaccbf16_vf_op
32+
tags: ["norm:vfwmaccbf16_op", "norm:vfwmaccbf16_vf", "norm:bf16_subnorm"]
33+
34+
- names: [vfwmaccbf16_vv_sew_rsv, vfwmaccbf16_vf_sew_rsv]
35+
tags: ["norm:vfwmaccbf16_sew_rsv"]

normative_rule_defs/c-st-ext.yaml

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
# yaml-language-server: $schema=../docs-resources/schemas/defs-schema.json
3+
4+
chapter_name: C Extension
5+
6+
$schema: "../docs-resources/schemas/defs-schema.json#"
7+
8+
normative_rule_definitions:
9+
- name: Zca_offsets_mul2
10+
summary: compressed instruction offsets are multiples of 2
11+
tags: ["norm:Zca_offsets_mul2"]
12+
- name: Zca_align16
13+
tags: ["norm:Zca_align16"]
14+
- name: Zca_no_misaligned
15+
tags: ["norm:Zca_no_misaligned"]
16+
- name: Zca_regs8
17+
tags: ["norm:Zca_regs8"]
18+
- name: Zc_fp_regs
19+
tags: ["norm:Zc_fp_regs"]
20+
- name: c-lwsp_op
21+
tags: ["norm:c-lwsp_op"]
22+
- name: c-lwsp_rsv
23+
tags: ["norm:c-lwsp_rsv"]
24+
- name: c-ldsp_op
25+
tags: ["norm:c-ldsp_op"]
26+
- name: c-ldsp_rsv
27+
tags: ["norm:c-ldsp_rsv"]
28+
- name: c-flwsp_op
29+
tags: ["norm:c-flwsp_op"]
30+
- name: c-fldsp_op
31+
tags: ["norm:c-fldsp_op"]
32+
- name: c-swsp_op
33+
tags: ["norm:c-swsp_op"]
34+
- name: c-sdsp_op
35+
tags: ["norm:c-sdsp_op"]
36+
- name: c-fswsp_op
37+
tags: ["norm:c-fswsp_op"]
38+
- name: c-fsdwsp_op
39+
tags: ["norm:c-fsdwsp_op"]
40+
- name: c-lw_op
41+
tags: ["norm:c-lw_op"]
42+
- name: c-ld_op
43+
tags: ["norm:c-ld_op"]
44+
- name: c-flw_op
45+
tags: ["norm:c-flw_op"]
46+
- name: c-fld_op
47+
tags: ["norm:c-fld_op"]
48+
- name: c-sw_op
49+
tags: ["norm:c-sw_op"]
50+
- name: c-sd_op
51+
tags: ["norm:c-sd_op"]
52+
- name: c-fsw_op
53+
tags: ["norm:c-fsw_op"]
54+
- name: c-fsd_op
55+
tags: ["norm:c-fsd_op"]
56+
- name: c-j_op
57+
tags: ["norm:c-j_op"]
58+
- name: c-jal_op
59+
tags: ["norm:c-jal_op"]
60+
- name: c-jr_op
61+
tags: ["norm:c-jr_op"]
62+
- name: c-jr_rsv
63+
tags: ["norm:c-jr_rsv"]
64+
- name: c-jalr_op
65+
tags: ["norm:c-jalr_op"]
66+
- name: c-ebreak
67+
tags: ["norm:c-jalr_ebreak"]
68+
- name: c-beqz_op
69+
tags: ["norm:c-beqz_op"]
70+
- name: c-bnez_op
71+
tags: ["norm:c-bnez_op"]
72+
- name: c-li_op
73+
tags: ["norm:c-li_op"]
74+
- name: c-li_hint
75+
tags: ["norm:c-li_hint"]
76+
- name: c-lui_op
77+
tags: ["norm:c-lui_op"]
78+
- name: c-lui_rsv
79+
tags: ["norm:c-lui_rsv"]
80+
- name: c-lui_hint
81+
tags: ["norm:c-lui_hint"]
82+
- name: c-addi_op
83+
tags: ["norm:c-addi_op"]
84+
- name: c-addi_hint
85+
tags: ["norm:c-addi_hint"]
86+
- name: c-addi_nop
87+
tags: ["norm:c-addi_nop"]
88+
- name: c-addiw_op
89+
tags: ["norm:c-addiw_op"]
90+
- name: c-addiw_rsv
91+
tags: ["norm:c-addiw_rsv"]
92+
- name: c-addi16sp_op
93+
tags: ["norm:c-addi16sp_op"]
94+
- name: c-addi16sp_rsv
95+
tags: ["norm:c-addi16sp_rsv"]
96+
- name: c-addi4spn_op
97+
tags: ["norm:c-addi4spn_op"]
98+
- name: c-addi4spn_rsv
99+
tags: ["norm:c-addi4spn_rsv"]
100+
- name: c-slli_op
101+
tags: ["norm:c-slli_op"]
102+
- name: c-slli_hint
103+
tags: ["norm:c-slli_hint"]
104+
- name: c-slli_shamt5
105+
tags: ["norm:c-slli_shamt5"]
106+
- name: c-srli_op
107+
tags: ["norm:c-srli_op"]
108+
- name: c-srli_hint
109+
tags: ["norm:c-srli_hint"]
110+
- name: c-srli_shamt5
111+
tags: ["norm:c-srli_shamt5"]
112+
- name: c-srai_op
113+
tags: ["norm:c-srai_op"]
114+
- name: c-srai_hint
115+
tags: ["norm:c-srai_op", "norm:c-srli_hint"]
116+
- name: c-andi_op
117+
tags: ["norm:c-andi_op"]
118+
- name: c-mv_op
119+
tags: ["norm:c-mv_op"]
120+
- name: c-mv_jr
121+
tags: ["norm:c-mv_jr"]
122+
- name: c-mv_hint
123+
tags: ["norm:c-mv_hint"]
124+
- name: c-add_op
125+
tags: ["norm:c-add_op"]
126+
- name: c-add_val
127+
tags: ["norm:c-add_val"]
128+
- name: c-add_hint
129+
tags: ["norm:c-add_hint"]
130+
- name: c-and_op
131+
tags: ["norm:c-and_op"]
132+
- name: c-or_op
133+
tags: ["norm:c-or_op"]
134+
- name: c-xor_op
135+
tags: ["norm:c-xor_op"]
136+
- name: c-sub_op
137+
tags: ["norm:c-sub_op"]
138+
- name: c-addw_op
139+
tags: ["norm:c-addw_op"]
140+
- name: c-subw_op
141+
tags: ["norm:c-subw_op"]
142+
- name: Zca_illegal
143+
tags: ["norm:Zca_illegal"]
144+
- name: c-nop_op
145+
tags: ["norm:c-nop_op"]
146+
- name: c-nop_hint
147+
tags: ["norm:c-nop_hint"]
148+
- name: c-ebreak_op
149+
tags: ["norm:c-ebreak_op"]
150+
- name: Zca_hints
151+
tags: ["norm:Zca_hints"]

0 commit comments

Comments
 (0)