]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/6c/txt.c
8c, 6c: native ROL (cyclic shift) instruction support, improve peephole optimizers
[plan9front.git] / sys / src / cmd / 6c / txt.c
index 5239b5633f182558c90f0411ce985ee3788adbfe..861cdfde4e2cdac4ccfe24ba911f717639e46ebd 100644 (file)
@@ -1305,6 +1305,16 @@ gopcode(int o, Type *ty, Node *f, Node *t)
                        a = ASALQ;
                break;
 
+       case OROL:
+               a = AROLL;
+               if(et == TCHAR || et == TUCHAR)
+                       a = AROLB;
+               if(et == TSHORT || et == TUSHORT)
+                       a = AROLW;
+               if(et == TVLONG || et == TUVLONG || et == TIND)
+                       a = AROLQ;
+               break;
+
        case OFUNC:
                a = ACALL;
                break;