From 5dd5b7a2d03885cb767bbf2b609d56f8ef897301 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Thu, 1 Oct 2026 14:58:31 -0700 Subject: Move much of the ISA support to shared code The ISA shared handlers here are required for a proper compiler, but contain only trivial bit-massaging operations. --- .github/workflows/linearize.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to '.github') diff --git a/.github/workflows/linearize.sh b/.github/workflows/linearize.sh index fb39b380..ef079bb8 100755 --- a/.github/workflows/linearize.sh +++ b/.github/workflows/linearize.sh @@ -47,7 +47,7 @@ while read -r chapter; do done <<< "$all_authors" # Get the first and last dates this chapter was modified. - root_files=(README.md LICENSE pom.xml .gitignore .dir-locals.el transpile-tests graph print build-support) + root_files=(README.md LICENSE pom.xml .gitignore .dir-locals.el transpile-tests graph print isa build-support) author_root_files=() if [[ $chapter = chapter01 ]]; then # Only include the commit date of the root files for chapter01. @@ -71,7 +71,7 @@ while read -r chapter; do git add . # Add the shared files in the root, except for README.md and pom.xml. - root_files=(LICENSE .gitignore .dir-locals.el transpile-tests graph print build-support) + root_files=(LICENSE .gitignore .dir-locals.el transpile-tests graph print isa build-support) cp -R "${root_files[@]/#/"$repo/"}" . git add "${root_files[@]}" @@ -89,11 +89,24 @@ while read -r chapter; do sed -i -e 's,pom,jar,' \ -e '//,/^$/d' pom.xml fi + # ISA sources enter the standalone Maven build with instruction encoding. + if [[ "$chapter_number" == 21 ]]; then + sed -i '/${simple.print.directory}\/src\/main\/java<\/source>/a\ ${project.basedir}/isa/src/main/java' pom.xml + sed -i '/<\/executions>/i\ \ + shared-isa-test-sources\ + generate-test-sources\ + add-test-source\ + \ + ${project.basedir}/isa/src/test-support/java\ + \ + ' pom.xml + fi git mv chapter_docs "docs/$chapter" # Restore the link to this chapter. sed -Ei "s,^\* Chapter $chapter_number: ,* [Chapter $chapter_number](docs/$chapter/README.md): ," README.md # Repair links for this chapter. sed -Ei 's,\bdocs/,,' "docs/$chapter/README.md" + sed -Ei 's,\(\.\./isa/,(../../isa/,g' "docs/$chapter/README.md" git add README.md "docs/$chapter/README.md" pom.xml # Create a commit for the chapter, using the metadata. -- cgit v1.2.3