From 579b2c509d5322066736eacb5ceccc6b4edb9dec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 24 Oct 2020 17:52:37 +0200 Subject: [PATCH] readme: Explain that regalloc diffs are rare for truly equivalent code --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 35a88f01..c11311b5 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,8 @@ Feel free to join the [Zelda Decompilation](https://discord.zelda64.dev/) Discor 8. **Tweak the code to get a perfectly matching function**. * Clang is usually quite reasonable so it is very common for functions -- even complicated code -- to match on the first try. - * If you have large differences (e.g. entire sections of code being at the wrong location), focus on getting rid of them first and ignore small differences like regalloc or trivial reorderings. + * **Focus on large differences.** If you have large differences (e.g. entire sections of code being at the wrong location), focus on getting rid of them first and ignore small differences like regalloc or trivial reorderings. + * **Regalloc:** If you only have regalloc differences left in a function that *looks* semantically equivalent, double-check whether it is truly equivalent: such differences are typically caused by using the wrong variable. It is rare for LLVM to use a different set of registers if the code is equivalent. * This is usually the most difficult part of matching decomp. Please ask on Discord if you need help! 9. **Update the list of decompiled functions**.