Skip to content
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

Adding version display option with --version #1897

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahmedelalfy94
Copy link

Wanted to put --version to have version checks easily with scripts using spike.

@@ -38,6 +38,7 @@ static void help(int exit_code = 1)
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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spike uses two spaces as indent.

Comment on lines 100 to 101
fprintf(stdout, "Spike RISC-V ISA Simulator " SPIKE_VERSION "\n\n");
exit(0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces

@@ -387,6 +394,7 @@ int main(int argc, char** argv)
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();});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

two spaces

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed all indentation issues

@aswaterman
Copy link
Collaborator

Please clean up the commit history so there's only one commit.

Fixing indents to be 2 spaces instead of tabs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants