view test/bitfield.c @ 522:a513979e5495

*** empty log message ***
author kono
date Tue, 27 Dec 2005 17:19:49 +0900
parents a379da780856
children 2f577690bcfb
line wrap: on
line source

int printf(const char *format, ...);


typedef union {
    struct _PTE {
	    unsigned long v:1;
	    unsigned long vsid:24;
	    unsigned long h:1;
	    unsigned long api:6;
	    unsigned long rpn:20;

	    unsigned long :3;
	    unsigned long r:1;
	    unsigned long c:1;
	    unsigned long w:1;
	    unsigned long i:1;
	    unsigned long m:1;
	    unsigned long g:1;
	    unsigned long :1;
	    unsigned long pp:2;
	    long long lpn:40;
    } pte;
    struct {
	    char v:1;
	    signed long vsid:24;
	    unsigned long h:1;
	    signed char api:6;
	    signed long rpn:20;

	    signed long :3;
	    unsigned long r:1;
	    unsigned long c:1;
	    unsigned long w:1;
	    unsigned long i:1;
	    unsigned long m:1;
	    unsigned long g:1;
	    unsigned long :1;
	    signed long pp:2;
    } sg;
    unsigned long u[2];
} PTE;

PTE g;

main()
{
       PTE a,*p;
      int i = 0;
      int j = 0;

      a.pte.rpn = 55;
      j = a.pte.rpn;
printf("#0052:% 3d:  %d\n",i++,j);
      a.pte.c = 1;
      j = a.pte.c;
printf("#0055:% 3d:  %d\n",i++,j);
      a.pte.pp = -1;
      j = a.pte.pp;
printf("#0058:% 3d:  %d\n",i++,j);
      a.sg.pp = -1;
      j = a.sg.pp;
printf("#0061:% 3d:  %d\n",i++,j);

      p = &g;

      g.u[0]=0;
      g.u[1]=0;
       
printf("#0068:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. v = 3;
printf("#0070:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. vsid = -1;
printf("#0072:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. h = 3;
printf("#0074:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. api = 3;
printf("#0076:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. rpn = 3;
printf("#0078:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.pte. r = 3;
printf("#0081:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. c = 3;
printf("#0083:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. w = 3;
printf("#0085:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. i = 3;
printf("#0087:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. m = 3;
printf("#0089:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. g = 3;
printf("#0091:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. pp = 3;
printf("#0093:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

printf("#0098:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. v = 0;
printf("#0100:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. vsid = 0;
printf("#0102:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. h = 0;
printf("#0104:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. api = 0;
printf("#0106:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. rpn = 0;
printf("#0108:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.pte. r = 0;
printf("#0111:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. c = 0;
printf("#0113:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. w = 0;
printf("#0115:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. i = 0;
printf("#0117:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. m = 0;
printf("#0119:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. g = 0;
printf("#0121:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. pp = 0;
printf("#0123:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

printf("#0128:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. v = 0x5555555;
printf("#0130:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. vsid = 0x5555555;
printf("#0132:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. h = 0x5555555;
printf("#0134:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. api = 0x5555555;
printf("#0136:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. rpn = 0x5555555;
printf("#0138:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.pte. r = 0x5555555;
printf("#0141:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. c = 0x5555555;
printf("#0143:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. w = 0x5555555;
printf("#0145:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. i = 0x5555555;
printf("#0147:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. m = 0x5555555;
printf("#0149:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. g = 0x5555555;
printf("#0151:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. pp = 0x5555555;
printf("#0153:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

for(i=0;i<0x200;i++) {
printf("#0159:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. v = i;
printf("#0161:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. vsid = i;
printf("#0163:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. h = i;
printf("#0165:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. api = i;
printf("#0167:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. rpn = i;
printf("#0169:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.pte. r = i;
printf("#0172:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. c = i;
printf("#0174:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. w = i;
printf("#0176:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. i = i;
printf("#0178:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. m = i;
printf("#0180:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. g = i;
printf("#0182:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.pte. pp = i;
printf("#0184:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
}

      g = a;

      printf("#0189:%d %d %d\n",a.pte.pp,g.pte.pp,p->pte.pp);
     main2();
     main5();
     main5c();
     main3();
     main4();
     main6();
     main7();
    return 0;
}

main2()
{
      int i = 0;

      g.u[0]=0;
      g.u[1]=0;
       
printf("#0207:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. v = 3;
printf("#0209:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. vsid = -1;
printf("#0211:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. h = 3;
printf("#0213:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. api = 3;
printf("#0215:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. rpn = 3;
printf("#0217:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.sg. r = 3;
printf("#0220:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. c = 3;
printf("#0222:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. w = 3;
printf("#0224:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. i = 3;
printf("#0226:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. m = 3;
printf("#0228:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. g = 3;
printf("#0230:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. pp = 3;
printf("#0232:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

printf("#0237:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. v = 0;
printf("#0239:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. vsid = 0;
printf("#0241:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. h = 0;
printf("#0243:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. api = 0;
printf("#0245:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. rpn = 0;
printf("#0247:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.sg. r = 0;
printf("#0250:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. c = 0;
printf("#0252:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. w = 0;
printf("#0254:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. i = 0;
printf("#0256:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. m = 0;
printf("#0258:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. g = 0;
printf("#0260:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. pp = 0;
printf("#0262:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

printf("#0267:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. v = 0x55;
printf("#0269:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. vsid = 0x5555555;
printf("#0271:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. h = 0x5555555;
printf("#0273:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. api = 0x55;
printf("#0275:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. rpn = 0x5555555;
printf("#0277:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.sg. r = 0x5555555;
printf("#0280:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. c = 0x5555555;
printf("#0282:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. w = 0x5555555;
printf("#0284:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. i = 0x5555555;
printf("#0286:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. m = 0x5555555;
printf("#0288:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. g = 0x5555555;
printf("#0290:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. pp = 0x5555555;
printf("#0292:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

      g.u[0]=-1;
      g.u[1]=-1;

for(i=-0x100;i<0x100;i++) {
printf("#0298:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. v = i;
printf("#0300:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. vsid = i;
printf("#0302:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. h = i;
printf("#0304:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. api = i;
printf("#0306:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. rpn = i;
printf("#0308:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);

        g.sg. r = i;
printf("#0311:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. c = i;
printf("#0313:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. w = i;
printf("#0315:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. i = i;
printf("#0317:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. m = i;
printf("#0319:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. g = i;
printf("#0321:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
        g.sg. pp = i;
printf("#0323:% 3d:  0x%08x%08x\n",i++,g.u[0],g.u[1]);
}

// printf("#0326:size of %d\n",sizeof(g.sg.pp));    no size of for bit-field

}

//  int :12         bit-field cannot be a return value;
//  main3( int a:8 ) bit-field cannot be an argument;
main3( int a )
{
     // int b:9;       // nor local variable
     int b,i;
     i = 7;


     b = g.pte.rpn = -333;
     printf("#0340:main3-0: %d\n",b);
     b = g.pte.rpn--;
     printf("#0342:main3-1: %d\n",b);
     b = g.pte.rpn++;
     printf("#0344:main3-2: %d\n",b);
     b = --g.pte.rpn;
     printf("#0346:main3-3: %d\n",b);
     b = ++g.pte.rpn;
     printf("#0348:main3-4: %d\n",b);
     b = (g.pte.rpn += 3);
     printf("#0350:main3-5: %d\n",b);
     b = (g.pte.rpn -= 3);
     printf("#0352:main3-6: %d\n",b);
     b = (g.pte.rpn *= 3);
     printf("#0354:main3-7: %d\n",b);
     b = (g.pte.rpn /= 3);
     printf("#0356:main3-8: %d\n",b);
     b = (g.pte.rpn %= 3);
     printf("#0358:main3-9: %d\n",b);
     b = (g.pte.rpn |= 3);
     printf("#0360:main3-10: %d\n",b);
     b = (g.pte.rpn &= 3);
     printf("#0362:main3-12: %d\n",b);
     b = (g.pte.rpn ^= 3);
     printf("#0364:main3-13: %d\n",b);
     b = (g.pte.rpn <<= 3);
     printf("#0366:main3-14: %d\n",b);
     b = (g.pte.rpn >>= 3);
     printf("#0368:main3-15: %d\n",b);

     g.pte.rpn = -333;
     printf("#0371:main3-16: %d\n",b);
     b = g.pte.rpn--;
     printf("#0373:main3-17: %d\n",b);
     b = g.pte.rpn++;
     printf("#0375:main3-18: %d\n",b);
     b = --g.pte.rpn;
     printf("#0377:main3-19: %d\n",b);
     b = ++g.pte.rpn;
     printf("#0379:main3-20: %d\n",b);
     b = (g.pte.rpn += i);
     printf("#0381:main3-21: %d\n",b);
     b = (g.pte.rpn -= i);
     printf("#0383:main3-22: %d\n",b);
     b = (g.pte.rpn *= i);
     printf("#0385:main3-23: %d\n",b);
     b = (g.pte.rpn /= i);
     printf("#0387:main3-24: %d\n",b);
     b = (g.pte.rpn %= i);
     printf("#0389:main3-25: %d\n",b);
     b = (g.pte.rpn |= i);
     printf("#0391:main3-26: %d\n",b);
     b = (g.pte.rpn &= i);
     printf("#0393:main3-27: %d\n",b);
     b = (g.pte.rpn ^= i);
     printf("#0395:main3-28: %d\n",b);
     b = (g.pte.rpn <<= i);
     printf("#0397:main3-29: %d\n",b);
     b = (g.pte.rpn >>= i);
     printf("#0399:main3-30: %d\n",b);

     return --b;
}

main4( int a )
{
     // int b:9;       // nor local variable
     int b,i;
     PTE *pg = &g;

     i = 7;


     pg->pte.rpn = -333;
     printf("#0414:main4-0: %d\n",b);
     b = pg->pte.rpn--;
     printf("#0416:main4-1: %d\n",b);
     b = pg->pte.rpn++;
     printf("#0418:main4-2: %d\n",b);
     b = --pg->pte.rpn;
     printf("#0420:main4-3: %d\n",b);
     b = ++pg->pte.rpn;
     printf("#0422:main4-4: %d\n",b);
     b = (pg->pte.rpn += 3);
     printf("#0424:main4-5: %d\n",b);
     b = (pg->pte.rpn -= 3);
     printf("#0426:main4-6: %d\n",b);
     b = (pg->pte.rpn *= 3);
     printf("#0428:main4-7: %d\n",b);
     b = (pg->pte.rpn /= 3);
     printf("#0430:main4-8: %d\n",b);
     b = (pg->pte.rpn %= 3);
     printf("#0432:main4-9: %d\n",b);
     b = (pg->pte.rpn |= 3);
     printf("#0434:main4-10: %d\n",b);
     b = (pg->pte.rpn &= 3);
     printf("#0436:main4-12: %d\n",b);
     b = (pg->pte.rpn ^= 3);
     printf("#0438:main4-13: %d\n",b);
     b = (pg->pte.rpn <<= 3);
     printf("#0440:main4-14: %d\n",b);
     b = (pg->pte.rpn >>= 3);
     printf("#0442:main4-15: %d\n",b);

     pg->pte.rpn = -333;
     printf("#0445:main4-16: %d\n",b);
     b = pg->pte.rpn--;
     printf("#0447:main4-17: %d\n",b);
     b = pg->pte.rpn++;
     printf("#0449:main4-18: %d\n",b);
     b = --pg->pte.rpn;
     printf("#0451:main4-19: %d\n",b);
     b = ++pg->pte.rpn;
     printf("#0453:main4-20: %d\n",b);
     b = (pg->pte.rpn += i);
     printf("#0455:main4-21: %d\n",b);
     b = (pg->pte.rpn -= i);
     printf("#0457:main4-22: %d\n",b);
     b = (pg->pte.rpn *= i);
     printf("#0459:main4-23: %d\n",b);
     b = (pg->pte.rpn /= i);
     printf("#0461:main4-24: %d\n",b);
     b = (pg->pte.rpn %= i);
     printf("#0463:main4-25: %d\n",b);
     b = (pg->pte.rpn |= i);
     printf("#0465:main4-26: %d\n",b);
     b = (pg->pte.rpn &= i);
     printf("#0467:main4-27: %d\n",b);
     b = (pg->pte.rpn ^= i);
     printf("#0469:main4-28: %d\n",b);
     b = (pg->pte.rpn <<= i);
     printf("#0471:main4-29: %d\n",b);
     b = (pg->pte.rpn >>= i);
     printf("#0473:main4-30: %d\n",b);

     return --b;
}





union ll1 {
   int a[8];
   struct {
        char a:4;
	long long v:33;
	long long w:33;
	long long x:33;
   } b;
} ll1;

union ll0 {
   int a[8];
   struct {
        char a:4;
	long long v:48;
	long long w:48;
	long long x:48;
   } b;
} ll0;


union ll {
   int a[8];
   struct {
        char a:4;
	long long v:56;
	long long w:56;
	long long x:56;
   } b;
} ll;

union cc {
   int a;
   struct {
	char a:1;
	char b:4;
	char c:7;
	char d:4;
	char e:4;
	char f:4;
   } b;
} cc;

union ii {
   int a;
   struct {
	int a:1;
	int b:4;
	int c:4;
	int d:4;
	int e:4;
	int f:4;
    } b;
} ii;

long long m1 = 0x123456789abcdefLL;
int p1 = 1;
int zero = 0;

main5c()
{
     ii.b.a = -1;
     printf("#0544:m5c-00:%d\n",ii.b.a);

     ll1.b.v = 0x123456789abcdefLL;
     printf("#0547:m5c-01:%llx\n",ll1.b.v);
     printf("#0548:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.v = 0;
     printf("#0553:m5c-01:%llx\n",
	 ll1.b.w = 0x123456789abcdefLL);
     printf("#0555:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.w = 0;
     printf("#0560:m5c-01:%llx\n",
	 ll1.b.x = 0x123456789abcdefLL);
     printf("#0562:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.x = 0;

     printf("#0568:m5c-01:%llx\n",
	 ll0.b.v = 0x123456789abcdefLL);
     printf("#0570:m5c-01:%llx\n",ll0.b.v);
     printf("#0571:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.v = 0;
     printf("#0576:m5c-01:%llx\n",
	 ll0.b.w = 0x123456789abcdefLL);
     printf("#0578:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.w = 0;
     printf("#0583:m5c-01:%llx\n",
	 ll0.b.x = 0x123456789abcdefLL);
     printf("#0585:m5c-02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.x = 0;

     printf("#0591:m5c-01:%llx\n",
	 ll.b.v = 0x123456789abcdefLL);
     printf("#0593:m5c-1:%llx\n",ll.b.v);
     printf("#0594:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.v = 0;
     printf("#0599:m5c-01:%llx\n",
	 ll.b.w = 0x123456789abcdefLL);
     printf("#0601:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.w = 0;
     printf("#0606:m5c-01:%llx\n",
	 ll.b.x = 0x123456789abcdefLL);
     printf("#0608:m5c-2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.x = 0;

     printf("#0614:m5c-char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
     cc.a = 0;
     cc.b.a = -1;
     printf("#0617:m5c-a:%08x\n",cc.a);
     cc.b.b = -1;
     printf("#0619:m5c-b:%08x\n",cc.a);
     cc.b.c = -1;
     printf("#0621:m5c-c:%08x\n",cc.a);
     cc.b.d = -1;
     printf("#0623:m5c-d:%08x\n",cc.a);
     cc.b.e = -1;
     printf("#0625:m5c-e:%08x\n",cc.a);
     cc.b.f = -1;
     printf("#0627:m5c-f:%08x\n",cc.a);
     printf("#0628:m5c-3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = -1;
     printf("#0630:m5c-f:%08x\n",cc.a);
     cc.b.a = 0;
     printf("#0632:m5c-a:%08x\n",cc.a);
     cc.b.b = 0;
     printf("#0634:m5c-b:%08x\n",cc.a);
     cc.b.c = 0;
     printf("#0636:m5c-c:%08x\n",cc.a);
     cc.b.d = 0;
     printf("#0638:m5c-d:%08x\n",cc.a);
     cc.b.e = 0;
     printf("#0640:m5c-e:%08x\n",cc.a);
     cc.b.f = 0;
     printf("#0642:m5c-f:%08x\n",cc.a);
     printf("#0643:m5c-3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = 0;
     printf("#0645:m5c-f:%08x\n",cc.a);
     cc.b.a = 1;
     printf("#0647:m5c-a:%08x\n",cc.a);
     cc.b.b = 1;
     printf("#0649:m5c-b:%08x\n",cc.a);
     cc.b.c = 1;
     printf("#0651:m5c-c:%08x\n",cc.a);
     cc.b.d = 1;
     printf("#0653:m5c-d:%08x\n",cc.a);
     cc.b.e = 1;
     printf("#0655:m5c-e:%08x\n",cc.a);
     cc.b.f = 1;
     printf("#0657:m5c-f:%08x\n",cc.a);
     printf("#0658:m5c-3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = -1;
     printf("#0660:m5c-f:%08x\n",cc.a);
     cc.b.a = 1;
     printf("#0662:m5c-a:%08x\n",cc.a);
     cc.b.b = 1;
     printf("#0664:m5c-b:%08x\n",cc.a);
     cc.b.c = 1;
     printf("#0666:m5c-c:%08x\n",cc.a);
     cc.b.d = 1;
     printf("#0668:m5c-d:%08x\n",cc.a);
     cc.b.e = 1;
     printf("#0670:m5c-e:%08x\n",cc.a);
     cc.b.f = 1;
     printf("#0672:m5c-f:%08x\n",cc.a);
     printf("#0673:m5c-3:%d %d\n",cc.b.c,cc.b.d);

     ii.b.a = -1;
     printf("#0676:m5c-6:%08x\n",ii.a);
     ii.b.d = -1;
     printf("#0678:m5c-6:%08x\n",ii.a);
     printf("#0679:m5c-5:%d %d\n",ii.b.a,ii.b.d);
}

main5()
{
     ii.b.a = -1;
     printf("#0685:00:%d\n",ii.b.a);

     ll1.b.v = m1;
     printf("#0688:01:%llx\n",ll1.b.v);
     printf("#0689:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.v = zero;
     ll1.b.w = m1;
     printf("#0695:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.w = zero;
     ll1.b.x = m1;
     printf("#0701:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll1.a[0],ll1.a[1],ll1.a[2],ll1.a[3],
	ll1.a[4],ll1.a[5],ll1.a[6],ll1.a[7]
      );
     ll1.b.x = zero;

     ll0.b.v = m1;
     printf("#0708:01:%llx\n",ll0.b.v);
     printf("#0709:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.v = zero;
     ll0.b.w = m1;
     printf("#0715:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.w = zero;
     ll0.b.x = m1;
     printf("#0721:02:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll0.a[0],ll0.a[1],ll0.a[2],ll0.a[3],
	ll0.a[4],ll0.a[5],ll0.a[6],ll0.a[7]
      );
     ll0.b.x = zero;

     ll.b.v = m1;
     printf("#0728:1:%llx\n",ll.b.v);
     printf("#0729:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.v = zero;
     ll.b.w = m1;
     printf("#0735:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.w = zero;
     ll.b.x = m1;
     printf("#0741:2:%08x %08x %08x %08x %08x %08x %08x %08x\n",
	ll.a[0],ll.a[1],ll.a[2],ll.a[3],
	ll.a[4],ll.a[5],ll.a[6],ll.a[7]
      );
     ll.b.x = zero;

     cc.a = zero;
     printf("#0748:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n");
     cc.b.a = m1;
     printf("#0750:a:%08x\n",cc.a);
     cc.b.b = m1;
     printf("#0752:b:%08x\n",cc.a);
     cc.b.c = m1;
     printf("#0754:c:%08x\n",cc.a);
     cc.b.d = m1;
     printf("#0756:d:%08x\n",cc.a);
     cc.b.e = m1;
     printf("#0758:e:%08x\n",cc.a);
     cc.b.f = m1;
     printf("#0760:f:%08x\n",cc.a);
     printf("#0761:3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = m1;
     printf("#0763:f:%08x\n",cc.a);
     cc.b.a = zero;
     printf("#0765:a:%08x\n",cc.a);
     cc.b.b = zero;
     printf("#0767:b:%08x\n",cc.a);
     cc.b.c = zero;
     printf("#0769:c:%08x\n",cc.a);
     cc.b.d = zero;
     printf("#0771:d:%08x\n",cc.a);
     cc.b.e = zero;
     printf("#0773:e:%08x\n",cc.a);
     cc.b.f = zero;
     printf("#0775:f:%08x\n",cc.a);
     printf("#0776:3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = zero;
     printf("#0778:f:%08x\n",cc.a);
     cc.b.a = p1;
     printf("#0780:a:%08x\n",cc.a);
     cc.b.b = p1;
     printf("#0782:b:%08x\n",cc.a);
     cc.b.c = p1;
     printf("#0784:c:%08x\n",cc.a);
     cc.b.d = p1;
     printf("#0786:d:%08x\n",cc.a);
     cc.b.e = p1;
     printf("#0788:e:%08x\n",cc.a);
     cc.b.f = p1;
     printf("#0790:f:%08x\n",cc.a);
     printf("#0791:3:%d %d\n",cc.b.c,cc.b.d);
     cc.a = m1;
     printf("#0793:f:%08x\n",cc.a);
     cc.b.a = p1;
     printf("#0795:a:%08x\n",cc.a);
     cc.b.b = p1;
     printf("#0797:b:%08x\n",cc.a);
     cc.b.c = p1;
     printf("#0799:c:%08x\n",cc.a);
     cc.b.d = p1;
     printf("#0801:d:%08x\n",cc.a);
     cc.b.e = p1;
     printf("#0803:e:%08x\n",cc.a);
     cc.b.f = p1;
     printf("#0805:f:%08x\n",cc.a);
     printf("#0806:3:%d %d\n",cc.b.c,cc.b.d);

     ii.b.a = m1;
     printf("#0809:6:%08x\n",ii.a);
     ii.b.d = m1;
     printf("#0811:6:%08x\n",ii.a);
     printf("#0812:5:%d %d\n",ii.b.a,ii.b.d);
}


main3l( int a )
{
     // int b:9;       // nor local variable
     long long b,i;
     i = 7;


     g.pte.lpn = -333;
     printf("#0824:main3l-0: %d\n",b);
     b = g.pte.lpn--;
     printf("#0826:main3l-1: %d\n",b);
     b = g.pte.lpn++;
     printf("#0828:main3l-2: %d\n",b);
     b = --g.pte.lpn;
     printf("#0830:main3l-3: %d\n",b);
     b = ++g.pte.lpn;
     printf("#0832:main3l-4: %d\n",b);
     b = (g.pte.lpn += 3);
     printf("#0834:main3l-5: %d\n",b);
     b = (g.pte.lpn -= 3);
     printf("#0836:main3l-6: %d\n",b);
     b = (g.pte.lpn *= 3);
     printf("#0838:main3l-7: %d\n",b);
     b = (g.pte.lpn /= 3);
     printf("#0840:main3l-8: %d\n",b);
     b = (g.pte.lpn %= 3);
     printf("#0842:main3l-9: %d\n",b);
     b = (g.pte.lpn |= 3);
     printf("#0844:main3l-10: %d\n",b);
     b = (g.pte.lpn &= 3);
     printf("#0846:main3l-12: %d\n",b);
     b = (g.pte.lpn ^= 3);
     printf("#0848:main3l-13: %d\n",b);
     b = (g.pte.lpn <<= 3);
     printf("#0850:main3l-14: %d\n",b);
     b = (g.pte.lpn >>= 3);
     printf("#0852:main3l-15: %d\n",b);

     g.pte.lpn = -333;
     printf("#0855:main3l-16: %d\n",b);
     b = g.pte.lpn--;
     printf("#0857:main3l-17: %d\n",b);
     b = g.pte.lpn++;
     printf("#0859:main3l-18: %d\n",b);
     b = --g.pte.lpn;
     printf("#0861:main3l-19: %d\n",b);
     b = ++g.pte.lpn;
     printf("#0863:main3l-20: %d\n",b);
     b = (g.pte.lpn += i);
     printf("#0865:main3l-21: %d\n",b);
     b = (g.pte.lpn -= i);
     printf("#0867:main3l-22: %d\n",b);
     b = (g.pte.lpn *= i);
     printf("#0869:main3l-23: %d\n",b);
     b = (g.pte.lpn /= i);
     printf("#0871:main3l-24: %d\n",b);
     b = (g.pte.lpn %= i);
     printf("#0873:main3l-25: %d\n",b);
     b = (g.pte.lpn |= i);
     printf("#0875:main3l-26: %d\n",b);
     b = (g.pte.lpn &= i);
     printf("#0877:main3l-27: %d\n",b);
     b = (g.pte.lpn ^= i);
     printf("#0879:main3l-28: %d\n",b);
     b = (g.pte.lpn <<= i);
     printf("#0881:main3l-29: %d\n",b);
     b = (g.pte.lpn >>= i);
     printf("#0883:main3l-30: %d\n",b);

     return --b;
}


main6()
{
    int i =0;
	g.pte.api = 0;
	printf("#0893:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 1;
	printf("#0895:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 2;
	printf("#0897:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 3;
	printf("#0899:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 4;
	printf("#0901:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 5;
	printf("#0903:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 6;
	printf("#0905:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 7;
	printf("#0907:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 8;
	printf("#0909:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 9;
	printf("#0911:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 10;
	printf("#0913:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 11;
	printf("#0915:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 12;
	printf("#0917:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 13;
	printf("#0919:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 14;
	printf("#0921:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 15;
	printf("#0923:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 16;
	printf("#0925:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 17;
	printf("#0927:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 18;
	printf("#0929:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 19;
	printf("#0931:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 20;
	printf("#0933:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 21;
	printf("#0935:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 22;
	printf("#0937:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 23;
	printf("#0939:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 24;
	printf("#0941:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 25;
	printf("#0943:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 26;
	printf("#0945:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 27;
	printf("#0947:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 28;
	printf("#0949:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 29;
	printf("#0951:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 30;
	printf("#0953:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 31;
	printf("#0955:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 32;
	printf("#0957:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 33;
	printf("#0959:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 34;
	printf("#0961:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 35;
	printf("#0963:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 36;
	printf("#0965:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 37;
	printf("#0967:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 38;
	printf("#0969:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 39;
	printf("#0971:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 40;
	printf("#0973:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 41;
	printf("#0975:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 42;
	printf("#0977:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 43;
	printf("#0979:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 44;
	printf("#0981:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 45;
	printf("#0983:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 46;
	printf("#0985:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 47;
	printf("#0987:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 48;
	printf("#0989:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 49;
	printf("#0991:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 50;
	printf("#0993:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 51;
	printf("#0995:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 52;
	printf("#0997:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 53;
	printf("#0999:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 54;
	printf("#1001:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 55;
	printf("#1003:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 56;
	printf("#1005:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 57;
	printf("#1007:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 58;
	printf("#1009:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 59;
	printf("#1011:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 60;
	printf("#1013:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 61;
	printf("#1015:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 62;
	printf("#1017:main5: %d %d\n",i++,g.pte.api);
	g.pte.api = 63;
	printf("#1019:main5: %d %d\n",i++,g.pte.api);
}

main7()
{
    int i;
    for (i=-2;i<2;i++) {
	g.pte.api = i;
	if (g.pte.api) {
	    printf("#1028:main 7:1 %d yes\n",i);
	} else {
	    printf("#1030:main 7:1 %d no\n",i);
	}
	if (g.pte.api==1) {
	    printf("#1033:main 7:2 %d yes\n",i);
	} else {
	    printf("#1035:main 7:2 %d no\n",i);
	}
	if (g.pte.api==-1) {
	    printf("#1038:main 7:3 %d yes\n",i);
	} else {
	    printf("#1040:main 7:3 %d no\n",i);
	}
    }
    for (i=-2;i<2;i++) {
	g.sg.v = i;
	if (g.sg.v) {
	    printf("#1046:main 7:4 %d yes\n",i);
	} else {
	    printf("#1048:main 7:4 %d no\n",i);
	}
	if (g.sg.v==1) {
	    printf("#1051:main 7:5 %d yes\n",i);
	} else {
	    printf("#1053:main 7:5 %d no\n",i);
	}
	if (g.sg.v==-1) {
	    printf("#1056:main 7:6 %d yes\n",i);
	} else {
	    printf("#1058:main 7:6 %d no\n",i);
	}
    }
}

/* end */