Conversation
CowTipper989
approved these changes
Dec 6, 2023
CharlesAverill
requested changes
Dec 8, 2023
| fn main() -> DynResult<()> { | ||
|
|
||
|
|
||
| let elf_file_data = std::fs::read("/home/qwe/Documents/CS4485/Fibonacci_linked").unwrap(); |
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.
The emulator has matured quite a lot in the last month. The commit info is kinda lacking, so I'll explain everything I've been up to:
System Calls
An arbitrary system call handler has been added and the instruction is now supported. Currently working are MARS syscalls PrintString, PrintInt and Exit.
ELF Loading
This one was... Difficult to figure out. name-emu now loads ELF files instead of the raw binary format we were using earlier. This allows for split data and text segments for instance and is generally the way forward for new features given our split architecture.
Bug fixes and cleanup
It seems that name-emu is far from my most bug-free work. Many details both subtle and obvious were completely wrong in the emulator causing wild crashes in more complicated programs. Everything from instruction decoding to branching to memory accesses to arithmetic was touched.
New instructions
With all of these changes, the Fibonacci program set out for us as a target program runs successfully. name-emu reports:
This PR is not yet mergeable; it will break the rest of NAME because name-as cannot yet create ELF files. Fibonacci was tested by using the GNU MIPS utilities to assemble and link it (
asandld). The ELF file is currently hardcoded to a specific path.name-as will need to catch up to name-emu in order to merge this PR. Is this an achievable goal by the end of the semester?