diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-06-18 13:28:15 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-06-18 13:28:15 +0200 |
commit | 3bb5168c6f21b38e5b4415419f986b4fa466cbd9 (patch) | |
tree | cd57f5e4521c32de1dd1fc15bd827a57eee6337f | |
parent | 873a7716e0652df14ecf881ba61767a2d78f3824 (diff) | |
download | plan9front-3bb5168c6f21b38e5b4415419f986b4fa466cbd9.tar.xz |
8c, 6c: fix INDEX node #reg calculation
-rw-r--r-- | sys/src/cmd/6c/sgen.c | 2 | ||||
-rw-r--r-- | sys/src/cmd/8c/sgen.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/6c/sgen.c b/sys/src/cmd/6c/sgen.c index fa5df6634..936559bea 100644 --- a/sys/src/cmd/6c/sgen.c +++ b/sys/src/cmd/6c/sgen.c @@ -162,6 +162,8 @@ xcom(Node *n) l->scale = idx.scale; l->addable = 9; l->complex = l->right->complex; + if(l->complex == 0) + l->complex++; l->type = l->left->type; n->op = OADDR; n->left = l; diff --git a/sys/src/cmd/8c/sgen.c b/sys/src/cmd/8c/sgen.c index 1c9527b17..7ba88b90d 100644 --- a/sys/src/cmd/8c/sgen.c +++ b/sys/src/cmd/8c/sgen.c @@ -169,6 +169,8 @@ xcom(Node *n) l->scale = idx.scale; l->addable = 9; l->complex = l->right->complex; + if(l->complex == 0) + l->complex++; l->type = l->left->type; n->op = OADDR; n->left = l; |