Architecture: Implemented SPARC.#2
Conversation
| case ARCHITECTURE_WASM: | ||
| return is64 ? "wasm64" : "wasm32"; | ||
| case ARCHITECTURE_SPARC: | ||
| return "sparc"; |
There was a problem hiding this comment.
Do sparc binaries are backwards compatible? As far as I know, there is at least 32-bit and 64-bit sparcs.
There was a problem hiding this comment.
I mean something like this is64 ? "sparc64" : "sparc".
There was a problem hiding this comment.
I believe you can run 32 bit sparc on 64 bit sparc. If you want I can seperate sparc64 anyways.
There was a problem hiding this comment.
Yes, but I doubt you can load 32-bit libraries in 64-bit process. The same problem that exists on both x86 and ARM.
There was a problem hiding this comment.
So you would like me to separate sparc and sparc64 like done with mips?
There was a problem hiding this comment.
Yes, but you're the author of the patch. I just don't think SPARC is any special from every other architecture that over the history supported both 32-bit and 64-bit long addressing.
There was a problem hiding this comment.
Also, yes, if you would do that, also update the test. It exists there just so we can sure we never broken the naming.
The naming is important because that's what engine will pick up when loading game's DLLs.
There was a problem hiding this comment.
I believe this has been update.
|
I was also wondering, where can I find help with porting to SPARC. I have build but am getting very early segfault and am not sure what is wrong. |
There is an engine porting guide in the engine's documentation. It has been written long ago, but still applies. I would recommend at least getting dedicated server up and running, it reduces the scope. |
|
Thanks, I'll take a look. |
| #define XASH_WASM 1 | ||
| #elif defined __sparc__ | ||
| #define XASH_SPARC 1 | ||
| #define __arch64__ |
There was a problem hiding this comment.
Are you sure about that? Why do you define __arch64__?
There was a problem hiding this comment.
Tab's fixed.
Also, oops! define was supposed to be if defined, clearly wasn't paying attention!
| #elif XASH_WASM | ||
| #define XASH_ARCHITECTURE ARCHITECTURE_WASM | ||
| #elif XASH_SPARC | ||
| #define XASH_ARCHITECTURE ARCHITECTURE_SPARC |
| case ARCHITECTURE_WASM: | ||
| return is64 ? "wasm64" : "wasm32"; | ||
| case ARCHITECTURE_SPARC: | ||
| return is64 ? "sparc64" : "sparc"; |
|
All tabs resolved. |
| case ARCHITECTURE_WASM: | ||
| return is64 ? "wasm64" : "wasm32"; | ||
| case ARCHITECTURE_SPARC: | ||
| return is64 ? "sparc64" : "sparc"; |
There was a problem hiding this comment.
Still spaces here. Please reconfigure or uninstall your text editor.
| return is64 ? "sparc64" : "sparc"; | |
| return is64 ? "sparc64" : "sparc"; |
There was a problem hiding this comment.
I think this is reconfigured correctly.
| //================================================================ | ||
| // | ||
| // PLATFORM DETECTION CODE | ||
| // PLATFORM DETECTION CODE |
There was a problem hiding this comment.
Useless change.
Really, just uninstall your code editor.
| #define PLATFORM_APPLE 5 | ||
| #define PLATFORM_NETBSD 6 | ||
| #define PLATFORM_OPENBSD 7 | ||
| #define PLATFORM_WIN32 1 |
There was a problem hiding this comment.
Yep, it's much worse now. Revert all of this. Only keep your own SPARC related changes.
I have added SPARC support into this library and plan to implement it for the rest of xash. If you could point out any other info that I should use to port over to SPARC that would be great!
As you can also see from the commit titles, I made some files executable.