From b0bdb367bfdf3e862f5d3bdd55313a572223a5ec Mon Sep 17 00:00:00 2001 From: Alex Bates Date: Sat, 16 Oct 2021 12:40:22 +0100 Subject: [PATCH] Describe NON_EQUIVALENT and NON_MATCHING purposes in CONTRIBUTING.md (#474) * describe NON_EQUIVALENT and NON_MATCHING purposes * Update CONTRIBUTING.md --- CONTRIBUTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccfa3a989e..413434e5e4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.