ref: e829d4f84d0f89ebd8b1626ad50e5168d9e8a216
parent: 0a156f6de8961950b3e91a5b53b956ae9670452e
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Jun 23 11:37:49 EDT 2016
[cc2-qbe] Update children pointers in sethi() We need to update the pointers in sethi() because in other case it is really hard to modify the tree.
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
@@ -60,10 +60,12 @@
np->address = 11;
break;
default:
- sethi(lp);
- sethi(rp);
+ lp = sethi(lp);
+ rp = sethi(rp);
break;
}
+ np->left = lp;
+ np->right = rp;
if (np->address > 10)
return np;