fix critical bug in GTE macros, refactor test functions, add one more func#233
fix critical bug in GTE macros, refactor test functions, add one more func#233mateusfavarin merged 3 commits intomainfrom
Conversation
|
|
||
| #include <ctr/math.h> | ||
| #include <psn00bsdk/include/inline_c.h> | ||
| #include <ctr/nugget/inline_n.h> |
There was a problem hiding this comment.
Are you more sure that this doesn't have bugs in it like psn00bsdk? If it does have bugs, will we have to manually vet gte instructions ourselves?
There was a problem hiding this comment.
This one doesn't, yea
| TEST_COLL_ProjectPointToEdge(v1, v2, point, out); | ||
| /* This is a hand written assembly function that breaks the ABI, | ||
| and some callers expect the argument registers to be untouched */ | ||
| __asm__ volatile("move $a0, %0" : : "r"((u32)out)); |
There was a problem hiding this comment.
Did you ever fully solve this problem? Was it ultimately because of psn00bsdk?
There was a problem hiding this comment.
Yep, t1 being trashed during the gte registers was causing this bug
rewrite/src/tests/test.c
Outdated
| __asm__ volatile("move $k1, %0" : : "r"(addr)); | ||
|
|
||
| u32 index = 0; | ||
| u32 index = UINT32_MAX; |
There was a problem hiding this comment.
to match our integral types paradigm, should this be named U32_MAX instead?
There was a problem hiding this comment.
this is a stdint macro, i guess i could define our macros to match yea
There was a problem hiding this comment.
Ah, if that's the case then maybe this isn't a big deal to just keep them. Up to you.
| TEST_FUNC(COLL_TestLeaf_Quadblock), | ||
| }; | ||
|
|
||
| const char* s_nameTestedFunc = nullptr; |
| @@ -105,9 +105,6 @@ typedef struct CollDCache | |||
|
|
|||
| #define DCACHE_COLL (*(CollDCache*) 0x1f800108) | |||
There was a problem hiding this comment.
Is there no memory overlap behavior for the scratchpad within a namespace (i.e., we had unions in the OG scratchpad because several namespaces used it), but I thought even within a single namespace (e.g., coll), that there was still memory usage overlap.
There was a problem hiding this comment.
I haven't seen any overlap yet
No description provided.