-
Notifications
You must be signed in to change notification settings - Fork 27
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 map constants as defines #161
Conversation
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.
The addresses seems to be correct, just a few comments on inconsistency. For example if we have the *_BASE
included or not. Should they be included? I guess they are not used anymore since the prime usage before was to derive the addresses for a particular module.
We actually don't know if someone is using |
7424098
to
3725d03
Compare
Instead of putting memory constant into an enum we use defines. Use the direct memory address instead of ORing constants together to compute the address. An enum in ISO C is a signed int. Some of are memory addresses are to large to fit in a signed int. This is not a problem since we're not using ISO C (-std=gnu99) but it doesn't look very nice if you turn on pedantic warnings. Also, if someone would use another compiler which at least supports the inline assembly we use, but possible not other GNU extensions, things would probably break.
Use pedantic warnings but still allow inline assembly, so turn off language-extension-token warnings.
Rebased on main, and removed a trailing whitespace. |
Turning on
-W pedantic
shows us that our memory constants can't fit in an enum in ISO C. Not a real problem for GNU99 but makes it hard to run-W pedantic
to find other problems.I propose we change the memory constants from an enum into pre-processor defines instead and use simple direct values for the memory addresses instead of computing them.
We also turn on pedantic warnings but allow inline asm as the GNU extension we mostly use and fix missing void parameter declarations that pedantic warned us about.
Please review carefully that have all the addresses defined.
Also note that
tk1_mem.h
is also used intkey-libs
andqemu
.Closes #159