diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-10-08 17:14:07 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-10-08 17:14:07 +0200 |
commit | 2598a9e3128e01b8aa7da14e39fcdab868030c86 (patch) | |
tree | 245ea6d4202ef77addea8466e8f0650769166044 /sys/src/cmd | |
parent | 285d96be4d642def1221e184f63bb9b75df75071 (diff) |
cc: restore side(), but do not consider OINDEX as side effect free
from charles forsuth:
because the previous version thought OINDEX might have a side effect, it
stopped it building a tower of them.
probably the best thing is to limit that anyway, since each one consumes
2-3 registers, so towering them can
keep even more active, and the x86 hasn't got that many.
the quick hack is to return that case to the earlier state by treating
OINDEX as a side-effect in side().
it's not a bad thing to do in the OSTRUCT case, for similar reasons: it's
better to collapse the indexed pointer
into a direct register, instead of repeating the indexing operation through
the copying of the value.
OINDEX isn't a machine-independent operation, so it doesn't affect the uses
in ../cc
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/cc/sub.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/cmd/cc/sub.c b/sys/src/cmd/cc/sub.c index d0bbeb89c..0133b2bea 100644 --- a/sys/src/cmd/cc/sub.c +++ b/sys/src/cmd/cc/sub.c @@ -961,6 +961,10 @@ loop: case OSTRING: case OLSTRING: case ONAME: + case OREGPAIR: + case OEXREG: + case OREGISTER: + case OINDREG: return 0; } return 1; |