Describe NON_EQUIVALENT and NON_MATCHING purposes in CONTRIBUTING.md (#474)

* describe NON_EQUIVALENT and NON_MATCHING purposes

* Update CONTRIBUTING.md
This commit is contained in:
Alex Bates 2021-10-16 12:40:22 +01:00 committed by GitHub
parent 85ba892809
commit b0bdb367bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,3 +94,21 @@ Once you've matched a function, run the following:
```
Then, go ahead and [create a pull request](https://github.com/pmret/papermario/pulls)!
## NON_EQUIVALENT
If you make significant progress on a function but are unable to 100% match it, feel free to wrap it in a NON_EQUIVALENT check:
```c
#ifdef NON_EQUIVALENT
void func(void) {
// ...
}
#else
INCLUDE_ASM(void, "file", func, void);
#endif
```
## NON_MATCHING
If you are unable to match a function but are sure it behaves the same, wrap **equivalent** C code in NON_MATCHING.