Mercurial > hg > CbC > old > device
diff test/bitfield1.c @ 427:0c256ea2a97e
Bitfield left value for ia32
author | kono |
---|---|
date | Sat, 30 Oct 2004 18:49:25 +0900 |
parents | ca34f02b2056 |
children | 61c77ff18023 |
line wrap: on
line diff
--- a/test/bitfield1.c Sat Oct 30 14:04:45 2004 +0900 +++ b/test/bitfield1.c Sat Oct 30 18:49:25 2004 +0900 @@ -75,103 +75,103 @@ main() { int i; - printf("%d\n",a.i); + printf("#0077:%d\n",a.i); ll1.b.v = -1; - printf("01:%llx\n",ll1.b.v); - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); + printf("#0080:01:%llx\n",ll1.b.v); + printf("#0081:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); ll1.b.v = 0; ll1.b.w = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); + printf("#0084:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); ll1.b.w = 0; ll1.b.x = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); + printf("#0087:02:"); for(i=0;i<32;i++) printf("%02x",ll1.a[i]); printf("\n"); ll0.b.v = -1; - printf("01:%llx\n",ll0.b.v); - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); + printf("#0090:01:%llx\n",ll0.b.v); + printf("#0091:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); ll0.b.v = 0; ll0.b.w = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); + printf("#0094:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); ll0.b.w = 0; ll0.b.x = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); + printf("#0097:02:"); for(i=0;i<32;i++) printf("%02x",ll0.a[i]); printf("\n"); ll.b.v = -1; - printf("1:%llx\n",ll.b.v); - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); + printf("#0100:1:%llx\n",ll.b.v); + printf("#0101:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); ll.b.v = 0; ll.b.w = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); + printf("#0104:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); ll.b.w = 0; ll.b.x = -1; - printf("02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); + printf("#0107:02:"); for(i=0;i<32;i++) printf("%02x",ll.a[i]); printf("\n"); - printf("char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n"); + printf("#0109:char a:1; char b:4; char c:7; char d:4; char e:4; char f:4;\n"); cc.b.a = -1; - printf("a:%08x\n",cc.a); + printf("#0111:a:%08x\n",cc.a); cc.b.b = -1; - printf("b:%08x\n",cc.a); + printf("#0113:b:%08x\n",cc.a); cc.b.c = -1; - printf("c:%08x\n",cc.a); + printf("#0115:c:%08x\n",cc.a); cc.b.d = -1; - printf("d:%08x\n",cc.a); + printf("#0117:d:%08x\n",cc.a); cc.b.e = -1; - printf("e:%08x\n",cc.a); + printf("#0119:e:%08x\n",cc.a); cc.b.f = -1; - printf("f:%08x\n",cc.a); - printf("3:%d %d\n",cc.b.c,cc.b.d); + printf("#0121:f:%08x\n",cc.a); + printf("#0122:3:%d %d\n",cc.b.c,cc.b.d); cc.a = -1; - printf("f:%08x\n",cc.a); + printf("#0124:f:%08x\n",cc.a); cc.b.a = 0; - printf("a:%08x\n",cc.a); + printf("#0126:a:%08x\n",cc.a); cc.b.b = 0; - printf("b:%08x\n",cc.a); + printf("#0128:b:%08x\n",cc.a); cc.b.c = 0; - printf("c:%08x\n",cc.a); + printf("#0130:c:%08x\n",cc.a); cc.b.d = 0; - printf("d:%08x\n",cc.a); + printf("#0132:d:%08x\n",cc.a); cc.b.e = 0; - printf("e:%08x\n",cc.a); + printf("#0134:e:%08x\n",cc.a); cc.b.f = 0; - printf("f:%08x\n",cc.a); - printf("3:%d %d\n",cc.b.c,cc.b.d); + printf("#0136:f:%08x\n",cc.a); + printf("#0137:3:%d %d\n",cc.b.c,cc.b.d); cc.a = 0; - printf("f:%08x\n",cc.a); + printf("#0139:f:%08x\n",cc.a); cc.b.a = 1; - printf("a:%08x\n",cc.a); + printf("#0141:a:%08x\n",cc.a); cc.b.b = 1; - printf("b:%08x\n",cc.a); + printf("#0143:b:%08x\n",cc.a); cc.b.c = 1; - printf("c:%08x\n",cc.a); + printf("#0145:c:%08x\n",cc.a); cc.b.d = 1; - printf("d:%08x\n",cc.a); + printf("#0147:d:%08x\n",cc.a); cc.b.e = 1; - printf("e:%08x\n",cc.a); + printf("#0149:e:%08x\n",cc.a); cc.b.f = 1; - printf("f:%08x\n",cc.a); - printf("3:%d %d\n",cc.b.c,cc.b.d); + printf("#0151:f:%08x\n",cc.a); + printf("#0152:3:%d %d\n",cc.b.c,cc.b.d); cc.a = -1; - printf("f:%08x\n",cc.a); + printf("#0154:f:%08x\n",cc.a); cc.b.a = 1; - printf("a:%08x\n",cc.a); + printf("#0156:a:%08x\n",cc.a); cc.b.b = 1; - printf("b:%08x\n",cc.a); + printf("#0158:b:%08x\n",cc.a); cc.b.c = 1; - printf("c:%08x\n",cc.a); + printf("#0160:c:%08x\n",cc.a); cc.b.d = 1; - printf("d:%08x\n",cc.a); + printf("#0162:d:%08x\n",cc.a); cc.b.e = 1; - printf("e:%08x\n",cc.a); + printf("#0164:e:%08x\n",cc.a); cc.b.f = 1; - printf("f:%08x\n",cc.a); - printf("3:%d %d\n",cc.b.c,cc.b.d); + printf("#0166:f:%08x\n",cc.a); + printf("#0167:3:%d %d\n",cc.b.c,cc.b.d); ii.b.a = -1; - printf("6:%08x\n",ii.a); + printf("#0170:6:%08x\n",ii.a); ii.b.d = -1; - printf("6:%08x\n",ii.a); - printf("5:%d %d\n",ii.b.a,ii.b.d); + printf("#0172:6:%08x\n",ii.a); + printf("#0173:5:%d %d\n",ii.b.a,ii.b.d); main5(); return 0; @@ -183,13 +183,13 @@ int i,j,bit=1; for(i=0;i<32;i++,bit<<=1) { ii.a = bit; - printf("%08x:ii.b.a=%d ii.b.b=%d ii.b.c=%d ii.b.d=%d ii.b.e=%d ii.b.f=%d\n",bit, + printf("#0185:%08x:ii.b.a=%d ii.b.b=%d ii.b.c=%d ii.b.d=%d ii.b.e=%d ii.b.f=%d\n",bit, ii.b.a,ii.b.b,ii.b.c,ii.b.d,ii.b.e,ii.b.f); } bit=1; for(i=0;i<32;i++,bit<<=1) { cc.a = bit; - printf("%08x:cc.b.a=%d cc.b.b=%d cc.b.c=%d cc.b.d=%d cc.b.e=%d cc.b.f=%d\n",bit, + printf("#0191:%08x:cc.b.a=%d cc.b.b=%d cc.b.c=%d cc.b.d=%d cc.b.e=%d cc.b.f=%d\n",bit, cc.b.a,cc.b.b,cc.b.c,cc.b.d,cc.b.e,cc.b.f); } ll.a[0]=ll.a[1]=ll.a[2]=ll.a[3]= ll.a[4]=ll.a[5]=ll.a[6]=ll.a[7]=0; @@ -198,11 +198,11 @@ bit=1; for(j=0;j<32;j++,bit<<=1) { ll.a[i] = bit; - printf("02:%08x %08x %08x %08x %08x %08x %08x %08x\n", + printf("#0200:02:%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] ); - printf(" ll.b.v=%d ll.b.w=%d ll.b.x=%d\n",ll.b.v,ll.b.w,ll.b.x); + printf("#0204: ll.b.v=%d ll.b.w=%d ll.b.x=%d\n",ll.b.v,ll.b.w,ll.b.x); } ll.a[i]=0; }