Remove IND_LABEL_W and IND_LABEL_D
authorGeorge Koehler <xkernigh@netscape.net>
Sun, 16 Oct 2016 20:33:24 +0000 (16:33 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sun, 16 Oct 2016 20:33:24 +0000 (16:33 -0400)
Because li32 always loads a label into a GPR, it is sufficient to
coerce LABEL to REG, then use IND_RC_W or IND_RC_D for indirection
through the label.

mach/powerpc/ncg/table

index 05ebcfc..2c84182 100644 (file)
@@ -218,10 +218,8 @@ TOKENS
        IND_RC_H_S         = { GPR reg; INT off; }    4.
        IND_RC_W           = { GPR reg; INT off; }    4.
        IND_RR_W           = { GPR reg1; GPR reg2; }  4.
-       IND_LABEL_W        = { ADDR adr; }            4.
        IND_RC_D           = { GPR reg; INT off; }    8.
        IND_RR_D           = { GPR reg1; GPR reg2; }  8.
-       IND_LABEL_D        = { ADDR adr; }            8.
        
        NOT_R              = { GPR reg; }             4.
        
@@ -256,9 +254,9 @@ SETS
        LOGICAL_ALL        = NOT_R + AND_RR + OR_RR + OR_RC + XOR_RR +
                             XOR_RC.
        
-       IND_ALL_W          = IND_RC_W + IND_RR_W + IND_LABEL_W.
+       IND_ALL_W          = IND_RC_W + IND_RR_W.
 
-       IND_ALL_D          = IND_RC_D + IND_RR_D + IND_LABEL_D.
+       IND_ALL_D          = IND_RC_D + IND_RR_D.
        
        OP_ALL_W           = SUM_ALL + TRISTATE_ALL + SEX_ALL + LOGICAL_ALL +
                             IND_ALL_W.
@@ -462,12 +460,6 @@ MOVES
                gen
                        COMMENT("move IND_RR_W->GPR")
                        lwzx %2, %1.reg1, %1.reg2
-                       
-       from IND_LABEL_W to GPR
-               gen
-                       COMMENT("move IND_LABEL_W->GPR")
-                       move {LABEL, %1.adr}, RSCRATCH
-                       lwz %2, {GPRINDIRECT, RSCRATCH, 0}
 
        from IND_RC_W to FSREG
                gen
@@ -478,13 +470,7 @@ MOVES
                gen
                        COMMENT("move IND_RR_W->FSREG")
                        lfsx %2, %1.reg1, %1.reg2
-                       
-       from IND_LABEL_W to FSREG
-               gen
-                       COMMENT("move IND_LABEL_W->FSREG")
-                       move {LABEL, %1.adr}, RSCRATCH
-                       lfs %2, {GPRINDIRECT, RSCRATCH, 0}
-               
+
 /* Write word */
 
        from GPR to IND_RC_W
@@ -496,12 +482,6 @@ MOVES
                gen
                        COMMENT("move GPR->IND_RR_W")
                        stwx %1, %2.reg1, %2.reg2
-                       
-       from GPR to IND_LABEL_W
-               gen
-                       COMMENT("move GPR->IND_LABEL_D")
-                       move {LABEL, %2.adr}, RSCRATCH
-                       stw %1, {GPRINDIRECT, RSCRATCH, 0}
 
        from FSREG to IND_RC_W
                gen
@@ -513,12 +493,6 @@ MOVES
                        COMMENT("move FSREG->IND_RR_W")
                        stfsx %1, %2.reg1, %2.reg2
 
-       from FSREG to IND_LABEL_W
-               gen
-                       COMMENT("move FSREG->IND_LABEL_D")
-                       move {LABEL, %2.adr}, RSCRATCH
-                       stfs %1, {GPRINDIRECT, RSCRATCH, 0}
-                       
 /* Read double */
 
        from IND_RC_D to FPR
@@ -531,12 +505,6 @@ MOVES
                        COMMENT("move IND_RR_D->FPR")
                        lfdx %2, %1.reg1, %1.reg2
 
-       from IND_LABEL_D to FPR
-               gen
-                       COMMENT("move IND_LABEL_D->FPR")
-                       move {LABEL, %1.adr}, RSCRATCH
-                       lfd %2, {GPRINDIRECT, RSCRATCH, 0}
-               
 /* Write double */
 
        from FPR to IND_RC_D
@@ -548,13 +516,7 @@ MOVES
                gen
                        COMMENT("move FPR->IND_RR_W")
                        stfdx %1, %2.reg1, %2.reg2
-                       
-       from FPR to IND_LABEL_D
-               gen
-                       COMMENT("move FPR->IND_LABEL_D")
-                       move {LABEL, %2.adr}, RSCRATCH
-                       stfd %1, {GPRINDIRECT, RSCRATCH, 0}
-                       
+
 /* Extract condition code field (actually produces (CC&3)<<2) */
 
        from CR0 to GPR
@@ -1142,8 +1104,6 @@ PATTERNS
                        yields {IND_RC_W, %1.reg, %1.off}
                with SUM_RR
                        yields {IND_RR_W, %1.reg1, %1.reg2}
-               with LABEL
-                       yields {IND_LABEL_W, %1.adr}
 
        pat loi $1==INT64                  /* Load double-word indirect */
                with GPR
@@ -1152,8 +1112,6 @@ PATTERNS
                        yields {IND_RC_D, %1.reg, %1.off}
                with SUM_RR
                        yields {IND_RR_D, %1.reg1, %1.reg2}
-               with LABEL
-                       yields {IND_LABEL_D, %1.adr}
 
        pat loi                            /* Load arbitrary size */
                leaving
@@ -1216,9 +1174,6 @@ PATTERNS
                with SUM_RC GPR+FSREG
                        gen
                                move %2, {IND_RC_W, %1.reg, %1.off}
-               with LABEL GPR+FSREG
-                       gen
-                               move %2, {IND_LABEL_W, %1.adr}
 
        pat sti $1==INT64                  /* Store double-word indirect */
                with GPR FREG
@@ -1238,10 +1193,6 @@ PATTERNS
                        gen
                                move %2, {IND_RC_W, %1.reg, %1.off}
                                move %3, {IND_RC_W, %1.reg, %1.off+4}
-               with LABEL FREG
-                       gen
-                               move %2, {IND_LABEL_D, %1.adr}
-                               
 
        pat sti                            /* Store arbitrary size */
                leaving