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

Memory Changes (second edition) #88

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

Memory Changes (second edition) #88

wants to merge 12 commits into from

Conversation

TheThirdOne
Copy link
Owner

Previously this was #71.

I making this to give me an easy way to review all the changes I make and make any comments that may be useful for future me.

An alternative assembler could be made that returns a list of
statements and list of datastructs. Maybe space should allocate
a 0 length write at the start and endto make sure that that
gets included in the total length of the data section.

That would allow generating an elf file and therefore allow
more compatability testing.
Also removed util.MemoryDump and changed memory configurations significantly

This is now compiling and passing automated tests, but doesn't have correct GUI behaviour.
The problem with the addresss selector was that it used signed
comparisons rather than unsigned.

I moved the setting of the saved configuration into settings
rather than memoryconfiguration because it prevents circular
static dependency issues.

The memory configuration setter now shows ranges for the various segments.

Config files for memory configurations are now property files. I
will put an example of on the wiki.
Because the limits on the size of segments weren't recalculated
with respect to the blocks of memory, it was possible to cause
an uncaught exception. That should no longer be possible.
It was a stretch to call it .bss and I was thinking about removing
it entirely. So I think sticking with what is was previously called
is better.
One issue is that if no arguments were passed, the stack pointer
could be pointing outside the stack. 2b15af6 removed the 4K buffer
to the top of the stack, so this bug showed up now.

Similarly it would caused an internal error when run with arguments
because it would try to write to the byte just above the stack.

Additionally, I changed the GUI to actually set the arguments for
blank arguments so you get the desired stack (argc=0,argv={0})

Finally, I cleaned up a little
@TheThirdOne
Copy link
Owner Author

TheThirdOne commented Sep 2, 2020

Some potential correctness tests:

  • make memory configurations that are intended to break most of the assumptions about the layout (but still should work)
    • cross 0x80000000 with a sections
    • reorder the sections dramatically
    • really small sections
  • make memory configurations that should fail to test how errors are displayed.
    • missing sections
    • overlapping sections
    • offsets outside the bounds of the related sections
  • Switch between very different sections to make sure that no caching of memory configurations is happening
    • Swap data and text sections
    • Move gp and sp bases
  • General GUI regression tests
    • write programs that would work in the previous RARS and make sure they still do
  • Make sure the CLI option for memory configs works.

@TheThirdOne
Copy link
Owner Author

TODOS:

  • Wiki page explaning the format for memory configurations

Things to consider for the future:

@zhijieshi
Copy link

Will data segment window show doublewords (64 bits), instead of words, in 64-bit mode?

It would be great if there is an option to select data sizes (byte, half words, words, doublewords).

@TheThirdOne
Copy link
Owner Author

@zhijieshi, this PR is almost exclusively about the internals of RARS. Changes to the UI of the data view would be beyond the scope of this PR.

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.

2 participants