-
Notifications
You must be signed in to change notification settings - Fork 113
Integrate riscv-arch-test #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7f7009a
Integrate riscv-arch-test
xiaohan484 fcf739a
Revise riscv-arch-test description and Makefile
xiaohan484 96bd0c5
Revise README.md and variable name
xiaohan484 4e9dd84
Revise the grammar of riscv-arch-test description
xiaohan484 49336cc
Fix wording of README.md
xiaohan484 52471fd
Rename "rv32emu-next" and fix wording
xiaohan484 f2ddc28
Indent clang format and revise README.md
xiaohan484 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
build/DOOM1.WAD* | ||
shareware_doom_iwad.zip* | ||
build/rv32emu | ||
build/arch-test | ||
*.o | ||
*.o.d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "riscv-arch-test"] | ||
path = riscv-arch-test | ||
url = https://github.com/riscv-non-isa/riscv-arch-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
RUN_TARGET= $(TARGETDIR)/build/rv32emu $(<) \ | ||
$(RISCV_TARGET_FLAGS) \ | ||
--arch-test $(*).signature.output \ | ||
1>$(@) 2>&1 | ||
|
||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= \ | ||
-march=rv32gc \ | ||
-mabi=ilp32 \ | ||
-static \ | ||
-mcmodel=medany \ | ||
-fvisibility=hidden \ | ||
$(RVTEST_DEFINES) \ | ||
-nostdlib \ | ||
-nostartfiles | ||
|
||
COMPILE_TARGET = \ | ||
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-suite/env/ \ | ||
-I$(TARGETDIR)/$(RISCV_TARGET)/ \ | ||
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ | ||
$$(<) -o $$(@); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
RUN_TARGET= $(TARGETDIR)/build/rv32emu $(<) \ | ||
$(RISCV_TARGET_FLAGS) \ | ||
--arch-test $(*).signature.output \ | ||
1>$(@) 2>&1 | ||
|
||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= \ | ||
-march=rv32g \ | ||
-mabi=ilp32 \ | ||
-static \ | ||
-mcmodel=medany \ | ||
-fvisibility=hidden \ | ||
$(RVTEST_DEFINES) \ | ||
-nostdlib \ | ||
-nostartfiles | ||
|
||
COMPILE_TARGET = \ | ||
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-suite/env/ \ | ||
-I$(TARGETDIR)/$(RISCV_TARGET)/ \ | ||
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ | ||
$$(<) -o $$(@); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
RUN_TARGET= $(TARGETDIR)/build/rv32emu $(<) \ | ||
$(RISCV_TARGET_FLAGS) \ | ||
--arch-test $(*).signature.output \ | ||
1>$(@) 2>&1 | ||
|
||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= \ | ||
-march=rv32g \ | ||
-mabi=ilp32 \ | ||
-static \ | ||
-mcmodel=medany \ | ||
-fvisibility=hidden \ | ||
$(RVTEST_DEFINES) \ | ||
-nostdlib \ | ||
-nostartfiles | ||
|
||
COMPILE_TARGET = \ | ||
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-suite/env/ \ | ||
-I$(TARGETDIR)/$(RISCV_TARGET)/ \ | ||
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ | ||
$$(<) -o $$(@); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
RUN_TARGET= $(TARGETDIR)/build/rv32emu $(<) \ | ||
$(RISCV_TARGET_FLAGS) \ | ||
--arch-test $(*).signature.output \ | ||
1>$(@) 2>&1 | ||
|
||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= \ | ||
-march=rv32g \ | ||
-mabi=ilp32 \ | ||
-static \ | ||
-mcmodel=medany \ | ||
-fvisibility=hidden \ | ||
$(RVTEST_DEFINES) \ | ||
-nostdlib \ | ||
-nostartfiles | ||
|
||
COMPILE_TARGET = \ | ||
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-suite/env/ \ | ||
-I$(TARGETDIR)/$(RISCV_TARGET)/ \ | ||
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ | ||
$$(<) -o $$(@); |
22 changes: 22 additions & 0 deletions
22
arch-test-target/device/rv32i_m/privilege/Makefile.include
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
RUN_TARGET= $(TARGETDIR)/build/rv32emu $(<) \ | ||
$(RISCV_TARGET_FLAGS) \ | ||
--arch-test $(*).signature.output \ | ||
1>$(@) 2>&1 | ||
|
||
RISCV_GCC ?= $(RISCV_PREFIX)gcc | ||
RISCV_GCC_OPTS ?= \ | ||
-march=rv32gc \ | ||
-mabi=ilp32 \ | ||
-static \ | ||
-mcmodel=medany \ | ||
-fvisibility=hidden \ | ||
$(RVTEST_DEFINES) \ | ||
-nostdlib \ | ||
-nostartfiles | ||
|
||
COMPILE_TARGET = \ | ||
$$(RISCV_GCC) $(1) $$(RISCV_GCC_OPTS) \ | ||
-I$(ROOTDIR)/riscv-test-suite/env/ \ | ||
-I$(TARGETDIR)/$(RISCV_TARGET)/ \ | ||
-T$(TARGETDIR)/$(RISCV_TARGET)/link.ld \ | ||
$$(<) -o $$(@); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
OUTPUT_ARCH( "riscv" ) | ||
ENTRY(rvtest_entry_point) | ||
|
||
SECTIONS | ||
{ | ||
. = 0x80000000; | ||
.text.init : { *(.text.init) } | ||
. = ALIGN(0x1000); | ||
.text : { *(.text) } | ||
. = ALIGN(0x1000); | ||
.data : { *(.data) } | ||
.data.string : { *(.data.string)} | ||
.bss : { *(.bss) } | ||
_end = .; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
#define RVMODEL_HALT \ | ||
add a7, x0, 93; \ | ||
add a0, x0, 0; \ | ||
ecall | ||
|
||
#define RVMODEL_BOOT | ||
|
||
#define RVTEST_RV32M | ||
|
||
#define RVMODEL_DATA_BEGIN \ | ||
.align 4; .global begin_signature; begin_signature: | ||
|
||
#define RVMODEL_DATA_END \ | ||
.align 4; .global end_signature; end_signature: | ||
|
||
#define RVMODEL_IO_INIT | ||
#define RVMODEL_IO_WRITE_STR(_SP, _STR) | ||
#define RVMODEL_IO_CHECK() | ||
#define RVMODEL_IO_ASSERT_GPR_EQ(_SP, _R, _I) | ||
#define RVMODEL_IO_ASSERT_SFPR_EQ(_F, _R, _I) | ||
#define RVMODEL_IO_ASSERT_DFPR_EQ(_D, _R, _I) | ||
#define RVMODEL_SET_MSW_INT | ||
#define RVMODEL_CLEAR_MSW_INT | ||
#define RVMODEL_CLEAR_MTIMER_INT | ||
#define RVMODEL_CLEAR_MEXT_INT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule riscv-arch-test
added at
307c77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.