Skip to content

Commit

Permalink
Merge pull request #423 from yroux/fix-llvm-build
Browse files Browse the repository at this point in the history
Fix building with LLVM
  • Loading branch information
allenjbaum authored Jan 5, 2024
2 parents 821e30e + 5645290 commit d4ea994
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## [3.8.8] -- 2024-01-04
- Fixed macros to allow assembling tests with LLVM.

## [3.8.7] -- 2024-01-02
- Update satp initialization macro

Expand Down
16 changes: 8 additions & 8 deletions riscv-test-suite/env/arch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,13 @@
/******************************************************************************/

.macro XCSR_RENAME __MODE__ // enable CSR names to be parameterized, V,S merged
.ifc \__MODE__, M
.ifc \__MODE__ , M
_XCSR_RENAME_M
.endif
.ifc \__MODE__, S
.ifc \__MODE__ , S
_XCSR_RENAME_S
.endif
.ifc \__MODE__, V
.ifc \__MODE__ , V
_XCSR_RENAME_S
.endif
.endm
Expand All @@ -593,13 +593,13 @@
/******************************************************************************/

.macro XCSR_VRENAME __MODE__ // enable CSR names to be parameterized, V,S separate
.ifc \__MODE__, M
.ifc \__MODE__ , M
_XCSR_RENAME_M
.endif
.ifc \__MODE__, S
.ifc \__MODE__ , S
_XCSR_RENAME_S
.endif
.ifc \__MODE__, V
.ifc \__MODE__ , V
_XCSR_RENAME_V
.endif
.endm
Expand Down Expand Up @@ -979,10 +979,10 @@ init_\__MODE__\()scratch:
//----------------------------------------------------------------------
init_\__MODE__\()edeleg:
li T2, 0 // save and clear edeleg so we can exit to Mmode
.if (\__MODE__\() == V)
.ifc \__MODE__ , V
csrrw T2, CSR_VEDELEG, T2 // special case: VS EDELEG available from Vmode
.else
.if (\__MODE__\() == M)
.ifc \__MODE__ , M
#ifdef rvtest_strap_routine
csrrw T2, CSR_XEDELEG, T2 // this handles M mode save, but only if Smode exists
#endif
Expand Down

0 comments on commit d4ea994

Please sign in to comment.