Use ha16/lo16 to load or store 1, 2, 8 bytes from labels.
authorGeorge Koehler <xkernigh@netscape.net>
Wed, 8 Feb 2017 17:31:14 +0000 (12:31 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Wed, 8 Feb 2017 17:31:14 +0000 (12:31 -0500)
commit85391399a407abc734216a88952d90195a7fd3d4
tree351bb9860d3ddfa7b8f5e40a99f951500f58f881
parent5e00e1fce2583e08447324bdd0c3c60c51302445
Use ha16/lo16 to load or store 1, 2, 8 bytes from labels.

Add the tokens IND_RL_B, IND_RL_H, IND_RL_H_S, IND_RL_D, along with
the rules to use them.  These rules emit shorter code.  For example,
loading a byte becomes lis, lbz instead of lis, addi, lbz.

While making this, I wrongly set IND_RL_D to size 4.  Then ncg made
infinite recursion in codegen() and stackupto(), until it crashed by
stack overflow.  I correctly set IND_RL_D to size 8, preventing the
crash.
mach/powerpc/ncg/table