Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,30 @@ jobs:

build-github-pages:
runs-on: ubuntu-latest
container:
image: ghcr.io/github/pages-gem:latest
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v6.0.2
- name: generate the GitHub Pages locally in order to check for errors
run: ./tools/build-github-pages.sh build
run: |
echo -e "plugins:\n \
- jekyll-coffeescript\n \
- jekyll-default-layout\n \
- jekyll-gist\n \
- jekyll-github-metadata\n \
- jekyll-optional-front-matter\n \
- jekyll-paginate\n \
- jekyll-readme-index\n \
- jekyll-titles-from-headings\n \
- jekyll-relative-links\n" >> _config.yml
SITE=.
jekyll build

markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- uses: gaurav-nelson/github-action-markdown-link-check@v1
- uses: actions/checkout@v6.0.2
- uses: tcort/github-action-markdown-link-check@v1
with:
config-file: '.github/workflows/markdown-link-check.json'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/markdown-link-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
{
"pattern": "^https://developer.arm.com/architectures/instruction-sets/intrinsics/"
}
]
],
"aliveStatusCodes": [200, 206, 403, 429]
}
8 changes: 4 additions & 4 deletions mve_intrinsics/mve.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version: 2021Q4
date-of-issue: 11 January 2022
# LaTeX specific variables
landscape: true
copyright-text: Copyright 2019-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>.
copyright-text: Copyright 2019-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>.
draftversion: true
# Jekyll specific variables
header_counter: true
toc: true
---

<!--
SPDX-FileCopyrightText: Copyright 2019-2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
SPDX-FileCopyrightText: Copyright 2019-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
CC-BY-SA-4.0 AND Apache-Patent-License
See LICENSE.md file for details
-->
Expand All @@ -24,7 +24,7 @@ to generate the Table of Contents via Jekyll.
They are automatically removed by the scripts that generate the pdfs.
-->
* TOC
{{:toc}}
{:toc}
# Preface

## Abstract
Expand Down Expand Up @@ -137,4 +137,4 @@ It is automatically removed by the scripts that generate the pdfs.

# List of Intrinsics

{intrinsic_table}
REPLACE_INTRINSIC_TABLE_HERE
8 changes: 4 additions & 4 deletions neon_intrinsics/advsimd.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ version: 2025Q2
date-of-issue: 06 June 2025
# LaTeX specific variables
landscape: true
copyright-text: "Copyright: see section \\texorpdfstring{{\\nameref{{copyright}}}}{{Copyright}}."
copyright-text: "Copyright: see section \\texorpdfstring{\\nameref{copyright}}{Copyright}."
draftversion: true
# Jekyll specific variables
header_counter: true
toc: true
---

<!--
SPDX-FileCopyrightText: Copyright 2014-2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
SPDX-FileCopyrightText: Copyright 2014-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
SPDX-FileCopyrightText: Copyright 2021 Matt P. Dziubinski <matdzb@gmail.com>
CC-BY-SA-4.0 AND Apache-Patent-License
See LICENSE.md file for details
Expand All @@ -25,7 +25,7 @@ to generate the Table of Contents via Jekyll.
They are automatically removed by the scripts that generate the pdfs.
-->
* TOC
{{:toc}}
{:toc}
# Preface

## Abstract
Expand Down Expand Up @@ -179,4 +179,4 @@ It is automatically removed by the scripts that generate the pdfs.

# List of Intrinsics

{intrinsic_table}
REPLACE_INTRINSIC_TABLE_HERE
6 changes: 1 addition & 5 deletions tools/build-github-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ set -x

ROOTDIR=$(realpath "$(dirname "$(realpath "$0")")/..")
TEMPDIR=$(mktemp -d)
cd $TEMPDIR
git clone --depth 1 https://github.com/github/pages-gem.git
cd pages-gem
docker build -t gh-pages --build-arg RUBY_VERSION=3.2 .
cd $ROOTDIR
echo -e "plugins:\n \
- jekyll-coffeescript\n \
Expand All @@ -52,7 +48,7 @@ cd $TEMPDIR/pages-gem

if [ "$1" == "build" ]; then
SITE=$ROOTDIR
docker run --rm -p 4000:4000 -v `realpath ${SITE}`:/src/site gh-pages jekyll build
docker run --rm -p 4000:4000 -v `realpath ${SITE}`:/src/site ghcr.io/github/pages-gem:latest jekyll build
elif [ "$1" == "serve" ]; then
SITE=$ROOTDIR make server
fi
Expand Down
25 changes: 21 additions & 4 deletions tools/gen-intrinsics-specs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# SPDX-FileCopyrightText: Copyright 2021, 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-FileCopyrightText: Copyright 2021-2026 Arm Limited and/or its affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -20,6 +20,7 @@
import argparse
import csv
import doctest
import re
from urllib.parse import urljoin
from urllib.parse import quote

Expand Down Expand Up @@ -50,6 +51,13 @@ def quote_literal(val, workflow):
__ARMDEVELOPER = "https://developer.arm.com/architectures/instruction-sets/intrinsics/"


def parse_numeric_version(version):
match = re.match(r"(\d+)\.(\d+)\.(\d+)", version)
if not match:
raise ValueError(f"Unsupported version format: {version}")
return tuple(int(part) for part in match.groups())


def md_literal_quote(mapping, workflow):
r"""
>>> md_literal_quote('a; b', 'markdown')
Expand Down Expand Up @@ -955,16 +963,25 @@ def get_intrinsics_db(path):

# We require version 0.8.6 to be able to print multi-line records
# in tables.
if tbl.__version__ < "0.8.6":
required_tabulate_version = "0.8.6"
try:
installed_tabulate_version = parse_numeric_version(tbl.__version__)
except ValueError:
print(f"Unable to parse installed tabulate version ({tbl.__version__}).",
file=sys.stderr)
exit(1)

if installed_tabulate_version < parse_numeric_version(required_tabulate_version):
print(f"Your version of package tabulate is too old ({tbl.__version__}). "
"Update it to be greater or equal to 0.8.6.", file=sys.stderr)
f"Update it to be greater or equal to {required_tabulate_version}.", file=sys.stderr)
exit(1)

classification_map = get_classification_map(cli_args.classification)
intrinsics_db = get_intrinsics_db(cli_args.intrinsic_defs)
doc_template = read_template(cli_args.template)
intrinsic_table = process_db(intrinsics_db, classification_map, cli_args.workflow)
md_output = doc_template.format(intrinsic_table=intrinsic_table)
assert "REPLACE_INTRINSIC_TABLE_HERE" in doc_template, "The template file should contain the placeholder 'REPLACE_INTRINSIC_TABLE_HERE' for the intrinsic table."
md_output = doc_template.replace("REPLACE_INTRINSIC_TABLE_HERE", intrinsic_table)
with (open(cli_args.outfile, 'w')) as f:
f.write(md_output)
# Always run the unit tests.
Expand Down
Loading