Skip to content

Commit cd2b7ea

Browse files
authored
refactor(cpp): better handling of unknowns in cpp_hart (#626)
* refactor(cpp): better handling of unknowns in Bits class * test(cpp): add cpp unit test task * ci: temporarily disable clang-format * ci(cpp): add cpp unit test to regression * ci: add permissions to regress workflow * fix(cpp): adjust DecodeTree to new defined_by api * fix(ruby): csr possible_fields_for cache was broken * fix(cpp): could_be_undefined is not implemented, assume the worst * refactor(cpp): remove spurious comments in bits.hpp * ci(clang-format): only temporarily disable clang-format in libhart --------- Signed-off-by: Derek Hower <[email protected]>
1 parent 914e289 commit cd2b7ea

File tree

12 files changed

+2068
-1362
lines changed

12 files changed

+2068
-1362
lines changed

.clang-format

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
BasedOnStyle: Google
33
IndentWidth: 2
44
Language: Cpp
5+
ColumnLimit: 100
56
# AlignConsecutiveAssignments: true
67
# AlignConsecutiveDeclarations: true
78
# AlignEscapedNewlines: Right

.github/workflows/regress.yml

+14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Regression test
2+
permissions:
3+
contents: read
4+
pull-requests: write
25
on:
36
push:
47
branches:
@@ -169,3 +172,14 @@ jobs:
169172
uses: ./.github/actions/singularity-setup
170173
- name: Generate Go code
171174
run: ./do gen:go
175+
regress-cpp-unit:
176+
runs-on: ubuntu-latest
177+
env:
178+
SINGULARITY: 1
179+
steps:
180+
- name: Clone Github Repo Action
181+
uses: actions/checkout@v4
182+
- name: singularity setup
183+
uses: ./.github/actions/singularity-setup
184+
- name: Run cpp unit tests
185+
run: ./do test:cpp_hart CONFIG=rv64

.pre-commit-config.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ repos:
6464
- id: clang-format
6565
types_or: [c++, c]
6666
files: \.(hpp|cpp)$
67+
# TEMPORARILY DISABLE CLANG-FORMAT IN LIBHART
68+
# WIll RE-ENABLE WHEN NEXT PATCH COMES THROUGH
69+
exclude: backends/cpp_hart_gen
6770
- repo: https://github.com/psf/black-pre-commit-mirror
6871
rev: 25.1.0
6972
hooks:

0 commit comments

Comments
 (0)