-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
Increased possible virtual memory size to 4GB #32
Closed
ChristianMoesl
wants to merge
20
commits into
cksystemsteaching:master
from
ChristianMoesl:vpage-size
Closed
Increased possible virtual memory size to 4GB #32
ChristianMoesl
wants to merge
20
commits into
cksystemsteaching:master
from
ChristianMoesl:vpage-size
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
…into vpage-size
Closed
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.
Increased possible virtual memory size to 4GB.
Prerequisites
To be able to allocated ~4GB of Memory, additional compiler flags are needed. On a Windows machine, the linker flag
-Wl,--large-address-aware
(gcc, clang) or/LARGEADDRESSAWARE
(Visual C++) needs to be added. For Linux and Mac, i haven't tested it yet. I think the Windows Compiler flags won't work on this machines.Issues
For 4GB Address space we need unsigned arithmetics. Luckily Selfie has a lot of unsigned MIPS instructions (addu, subu, multu,..). Alltough the overflow detection might detect some overflows, which are in fact legal. For an example if the memory address
0x7FFF FFFC
is increased by4
we get0x8000 0000
and an overflow warning.Btw.: The instruction selfie DIVU implementation is more of a MIPS DIV instrcution. Signed division wouldn't work with the MIPS DIVU instrution.
ToDo
We need to detect the operating system in the Makefile and add the corresponding linker flags for the os.