Use ha16/lo16 to load or store 1, 2, 8 bytes from labels. zzz-old-reloppc
authorGeorge Koehler <xkernigh@netscape.net>
Tue, 7 Feb 2017 19:55:51 +0000 (14:55 -0500)
committerGeorge Koehler <xkernigh@netscape.net>
Tue, 7 Feb 2017 19:55:51 +0000 (14:55 -0500)
commit34bfd8a81495f9ad793ba8f028e5ee3f085e9e87
treebdf96a7cd4659a1e7c4d7c32d1a5d5656d8c546b
parente2ddfd9f722e492e8baeee86efa7cca853a7b200
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