-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat CI: Add CI for stable version #10
Closed
Closed
Conversation
This file contains 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
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
It always starts from here. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Define 2 variables on the stack and add them together. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
do-core1 registers are 16 bits wide. Use Rust static typing to enforce that. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce mutability by adding the addition result to the first operand. The first operand must be defined as mutable, or else we fail to build. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce the function syntax to abstract registers addition. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce Rust flow control (i.e. if) in order to check that we add only when the opcode is ADD. Panic! otherwise. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce Rust's versatile Enum for defining a new type: OpCode. First pattern matching code path. Pretty print the Enum value. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce compiler linting and actually turn it off for non supported opcodes. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Live exercice #1. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce Rust print formatting rules. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The disassembler takes a fixed 16 bits instruction and tries to decode it into an opcode, and 2 operands. This intentionnaly fails to build, as it needs OpCode::from_u8. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce the impl Rust keyword, for type implementations. Here it's an Enum. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
The Instruction constructor is a disassembler, it can not be overloaded with other constructors. Live exercice #2. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce Rust's unit testing framework. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
We add more tests for disassembling all supported instructions. Live exercice #3. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce external crates dependencies through the clap crate. Rust's std library is scarce and limited, no command line parsing for example. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Add partial error handling for the instruction disassembler. Introduce the Result type and do basic and naive error handling (panic! if disassemble() returns an error). Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce Rust error pattern matching. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
With naive pattern matching check. Live exercice #4. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Simple example showing how the ? operator replaces the previous naive patter matching. Show how errors can be forwarded all the way up to main. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Introduce the Option type. Show how to convert an Option to a Result and carry errors forward. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
All broken after adding the error handling code. Live exercice #5. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Now that we know if disassembling reported an error or not, we can implement negative unit testing. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
In order to manipulate more than R0 and R1, we define a static array of 8 u16 values. Introduce Rust collection (A simple array). Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Now that we have a complete set of registers, it is more convenient to be able to print all of them. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This is temporary. Eventually, there will be a Cpu constructor, and potentially register initialization through memory loads. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
With a minimal content, just our opcodes. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
And define a workspace. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Related issue: #3 This is for do-core-asm to be able to depend on us for its opcodes needs Signed-off-by: Eliott Veyrier <eliott.veyrier@umontpellier.fr>
Signed-off-by: Eliott Veyrier <eliott.veyrier@umontpellier.fr>
Open
sameo
reviewed
Mar 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thomasgouveia Thanks a lot for the PR.
Could we please reorganize the commits in order to only have 3 of them:
- The basic github action (with all 3 toolchains)
- The cargo fmt addition
- The cargo clippy one with the actual code fixes
# for free
to join this conversation on GitHub.
Already have an account?
# 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.
This PR contains the necessary to run a simple CI job on our project.
Actually the CI is configured to build the application with the stable toolchain, run all tests, run
cargo clippy
andcargo fmt
.Missing behaviors: