Adding version display option with --version#1897
Open
ahmedelalfy94 wants to merge 2 commits intoriscv-software-src:masterfrom
Open
Adding version display option with --version#1897ahmedelalfy94 wants to merge 2 commits intoriscv-software-src:masterfrom
ahmedelalfy94 wants to merge 2 commits intoriscv-software-src:masterfrom
Conversation
chihminchao
reviewed
Jan 20, 2025
spike_main/spike.cc
Outdated
| fprintf(stderr, " -s Command I/O via socket (use with -d)\n"); | ||
| #endif | ||
| fprintf(stderr, " -h, --help Print this help message\n"); | ||
| fprintf(stderr, " --version Print spike version\n"); |
Contributor
There was a problem hiding this comment.
Spike uses two spaces as indent.
spike_main/spike.cc
Outdated
Comment on lines
+100
to
+101
| fprintf(stdout, "Spike RISC-V ISA Simulator " SPIKE_VERSION "\n\n"); | ||
| exit(0); |
spike_main/spike.cc
Outdated
| parser.option(0, "l2", 1, [&](const char* s){l2.reset(cache_sim_t::construct(s, "L2$"));}); | ||
| parser.option(0, "big-endian", 0, [&](const char UNUSED *s){cfg.endianness = endianness_big;}); | ||
| parser.option(0, "misaligned", 0, [&](const char UNUSED *s){cfg.misaligned = true;}); | ||
| parser.option(0, "version", 0, [&](const char UNUSED *s){state_version();}); |
Author
There was a problem hiding this comment.
Fixed all indentation issues
Collaborator
|
Please clean up the commit history so there's only one commit. |
Fixing indents to be 2 spaces instead of tabs
a683d90 to
18edd18
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Wanted to put --version to have version checks easily with scripts using spike.