Browse Source

Plan 9 from Bell Labs 2006-01-04

David du Colombier 14 years ago
parent
commit
708c4f3031

+ 20 - 20
dist/replica/_plan9.db

@@ -19,7 +19,7 @@
 386/bin/8l - 775 sys sys 1130384229 115712
 386/bin/9660srv - 775 sys sys 1135570766 104023
 386/bin/aan - 775 sys sys 1135570767 130761
-386/bin/acid - 775 sys sys 1135570768 400931
+386/bin/acid - 775 sys sys 1136346850 400912
 386/bin/acme - 775 sys sys 1136087521 429186
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1134151323 132870
@@ -189,7 +189,7 @@
 386/bin/cpu - 775 sys sys 1135570800 139202
 386/bin/crop - 775 sys sys 1135570800 116024
 386/bin/date - 775 sys sys 1130384272 43279
-386/bin/db - 775 sys sys 1135570801 345779
+386/bin/db - 775 sys sys 1136346851 345745
 386/bin/dc - 775 sys sys 1135570801 99015
 386/bin/dd - 775 sys sys 1130384273 45416
 386/bin/deroff - 775 sys sys 1135570802 74231
@@ -396,7 +396,7 @@
 386/bin/sha1sum - 775 sys sys 1135570844 61123
 386/bin/size - 775 sys sys 1135570844 78748
 386/bin/sleep - 775 sys sys 1085077097 3413
-386/bin/snap - 775 sys sys 1132950493 313634
+386/bin/snap - 775 sys sys 1136346852 313627
 386/bin/snapfs - 775 sys sys 1134389876 388292
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1135570845 168197
@@ -430,7 +430,7 @@
 386/bin/topng - 775 sys sys 1135570850 138333
 386/bin/toppm - 775 sys sys 1135570850 165236
 386/bin/touch - 775 sys sys 1135570850 63751
-386/bin/tprof - 775 sys sys 1135570851 297542
+386/bin/tprof - 775 sys sys 1136346853 297508
 386/bin/tr - 775 sys sys 1135570851 61845
 386/bin/trace - 775 sys sys 1135570851 181182
 386/bin/troff - 775 sys sys 1134151360 357941
@@ -555,7 +555,7 @@
 386/lib/libhttpd.a - 664 sys sys 1127790504 99596
 386/lib/libip.a - 664 sys sys 1116126324 35602
 386/lib/libl.a - 664 sys sys 1115950154 5384
-386/lib/libmach.a - 664 sys sys 1134389887 783460
+386/lib/libmach.a - 664 sys sys 1136346854 783354
 386/lib/libmemdraw.a - 664 sys sys 1135447284 284166
 386/lib/libmemlayer.a - 664 sys sys 1115950157 47360
 386/lib/libmp.a - 664 sys sys 1127360619 79944
@@ -5598,7 +5598,7 @@ sys/doc/8½/8½.ms - 664 sys sys 1020895859 31593
 sys/doc/8½/8½.ps - 664 sys sys 1020895860 797150
 sys/doc/8½/fig1.ps - 664 sys sys 1020895859 473747
 sys/doc/8½/mkfile - 664 sys sys 1020895860 215
-sys/doc/9.html - 664 sys sys 1091459042 87309
+sys/doc/9.html - 664 sys sys 1136302690 87619
 sys/doc/9.ms - 664 sys sys 953237044 84632
 sys/doc/9.ps - 664 sys sys 960837924 508340
 sys/doc/acid.html - 664 sys sys 1091459045 71723
@@ -7923,7 +7923,7 @@ sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
 sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
-sys/src/9/pc/dat.h - 664 sys sys 1131537242 6554
+sys/src/9/pc/dat.h - 664 sys sys 1136347070 6583
 sys/src/9/pc/devarch.c - 664 sys sys 1136048694 18625
 sys/src/9/pc/devether.c - 664 sys sys 1131290265 10315
 sys/src/9/pc/devfloppy.c - 664 sys sys 1055689885 20024
@@ -7978,7 +7978,7 @@ sys/src/9/pc/main.c - 664 sys sys 1131290418 15224
 sys/src/9/pc/mem.h - 664 sys sys 1131290422 5209
 sys/src/9/pc/memory.c - 664 sys sys 1131573303 18191
 sys/src/9/pc/mkfile - 664 sys sys 1131907946 3571
-sys/src/9/pc/mmu.c - 664 sys sys 1132341477 23864
+sys/src/9/pc/mmu.c - 664 sys sys 1136336093 24152
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1131538523 17317
 sys/src/9/pc/mp.h - 664 sys sys 1131538511 6652
@@ -8002,7 +8002,7 @@ sys/src/9/pc/ptclbsum386.s - 664 sys sys 1015014521 1493
 sys/src/9/pc/random.c - 664 sys sys 1036812832 2021
 sys/src/9/pc/realmode.c - 664 sys sys 1131294602 2658
 sys/src/9/pc/rebootcode.s - 664 sys sys 1015014522 988
-sys/src/9/pc/screen.c - 664 sys sys 1133356380 13831
+sys/src/9/pc/screen.c - 664 sys sys 1136336092 13971
 sys/src/9/pc/screen.h - 664 sys sys 1131290516 4156
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1131538448 55207
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
@@ -9277,14 +9277,14 @@ sys/src/cmd/acid/builtin.c - 664 sys sys 1133802425 20958
 sys/src/cmd/acid/dbg.y - 664 sys sys 1131289463 5568
 sys/src/cmd/acid/dot.c - 664 sys sys 1131289462 2162
 sys/src/cmd/acid/exec.c - 664 sys sys 1132674180 8383
-sys/src/cmd/acid/expr.c - 664 sys sys 1131289461 15220
+sys/src/cmd/acid/expr.c - 664 sys sys 1136312279 15220
 sys/src/cmd/acid/lex.c - 664 sys sys 1131289460 7963
 sys/src/cmd/acid/list.c - 664 sys sys 1131289462 3680
 sys/src/cmd/acid/main.c - 664 sys sys 1134233059 8561
 sys/src/cmd/acid/mkfile - 664 sys sys 1046199006 366
 sys/src/cmd/acid/print.c - 664 sys sys 1131289462 6831
 sys/src/cmd/acid/proc.c - 664 sys sys 1131289462 4356
-sys/src/cmd/acid/util.c - 664 sys sys 1131289461 4609
+sys/src/cmd/acid/util.c - 664 sys sys 1136312279 4671
 sys/src/cmd/acme - 20000000775 sys sys 969511023 0
 sys/src/cmd/acme/acme.c - 664 sys sys 1134233060 19621
 sys/src/cmd/acme/addr.c - 664 sys sys 1111171698 4805
@@ -14871,26 +14871,26 @@ sys/src/libmach/0c - 20000000775 sys sys 1114459438 0
 sys/src/libmach/0c/README - 664 sys sys 1114459609 73
 sys/src/libmach/0c/ureg.h - 664 sys sys 1114459438 886
 sys/src/libmach/2.c - 664 sys sys 1131289379 2074
-sys/src/libmach/2db.c - 664 sys sys 1131289383 61298
+sys/src/libmach/2db.c - 664 sys sys 1136322405 61334
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
 sys/src/libmach/5.c - 664 sys sys 1131289380 1553
-sys/src/libmach/5db.c - 664 sys sys 1131289383 21545
+sys/src/libmach/5db.c - 664 sys sys 1136322405 21586
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
 sys/src/libmach/6.c - 664 sys sys 1131289380 3464
 sys/src/libmach/6c - 20000000775 sys sys 1123100867 0
 sys/src/libmach/6c/6.out.h - 664 sys sys 1114459480 7984
 sys/src/libmach/6obj.c - 664 sys sys 1114459831 2382
 sys/src/libmach/7.c - 664 sys sys 1131289380 3299
-sys/src/libmach/7db.c - 664 sys sys 1131289384 17330
+sys/src/libmach/7db.c - 664 sys sys 1136322405 17355
 sys/src/libmach/7obj.c - 664 sys sys 1091732676 2367
 sys/src/libmach/8.c - 664 sys sys 1131289381 2060
-sys/src/libmach/8db.c - 664 sys sys 1132940238 50849
+sys/src/libmach/8db.c - 664 sys sys 1136322405 50889
 sys/src/libmach/8obj.c - 664 sys sys 1091732625 2200
 sys/src/libmach/access.c - 664 sys sys 1131289377 4588
 sys/src/libmach/elf.h - 664 sys sys 1131292881 2301
 sys/src/libmach/executable.c - 664 sys sys 1131289375 16128
 sys/src/libmach/k.c - 664 sys sys 1131289378 3370
-sys/src/libmach/kdb.c - 664 sys sys 1131289381 21161
+sys/src/libmach/kdb.c - 664 sys sys 1136322404 21222
 sys/src/libmach/kobj.c - 664 sys sys 1091732625 2217
 sys/src/libmach/machdata.c - 664 sys sys 1131289377 8799
 sys/src/libmach/map.c - 664 sys sys 1131289376 3056
@@ -14898,7 +14898,7 @@ sys/src/libmach/mkfile - 664 sys sys 1131375713 479
 sys/src/libmach/obj.c - 664 sys sys 1131289376 5929
 sys/src/libmach/obj.h - 664 sys sys 1131292890 604
 sys/src/libmach/q.c - 664 sys sys 1131289379 3630
-sys/src/libmach/qdb.c - 664 sys sys 1131289382 27506
+sys/src/libmach/qdb.c - 664 sys sys 1136322404 27544
 sys/src/libmach/qobj.c - 664 sys sys 1091732625 2310
 sys/src/libmach/setmach.c - 664 sys sys 1119476886 2911
 sys/src/libmach/swap.c - 664 sys sys 1131289376 1056
@@ -14907,11 +14907,11 @@ sys/src/libmach/u.c - 664 sys sys 1131289378 3436
 sys/src/libmach/uc - 20000000775 sys sys 1114459488 0
 sys/src/libmach/uc/README - 664 sys sys 1114459488 73
 sys/src/libmach/uc/u.out.h - 664 sys sys 1114459488 3137
-sys/src/libmach/udb.c - 664 sys sys 1131289382 21910
+sys/src/libmach/udb.c - 664 sys sys 1136322404 21967
 sys/src/libmach/uobj.c - 664 sys sys 1114459831 2219
 sys/src/libmach/v.c - 664 sys sys 1131289378 3446
-sys/src/libmach/vcodas.c - 664 sys sys 1131289385 10258
-sys/src/libmach/vdb.c - 664 sys sys 1131289381 22264
+sys/src/libmach/vcodas.c - 664 sys sys 1136329351 10293
+sys/src/libmach/vdb.c - 664 sys sys 1136329351 22299
 sys/src/libmach/vobj.c - 664 sys sys 1091732625 2206
 sys/src/libmemdraw - 20000000775 sys sys 985020762 0
 sys/src/libmemdraw/alloc.c - 664 sys sys 1135895512 3334

+ 20 - 20
dist/replica/plan9.db

@@ -19,7 +19,7 @@
 386/bin/8l - 775 sys sys 1130384229 115712
 386/bin/9660srv - 775 sys sys 1135570766 104023
 386/bin/aan - 775 sys sys 1135570767 130761
-386/bin/acid - 775 sys sys 1135570768 400931
+386/bin/acid - 775 sys sys 1136346850 400912
 386/bin/acme - 775 sys sys 1136087521 429186
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1134151323 132870
@@ -189,7 +189,7 @@
 386/bin/cpu - 775 sys sys 1135570800 139202
 386/bin/crop - 775 sys sys 1135570800 116024
 386/bin/date - 775 sys sys 1130384272 43279
-386/bin/db - 775 sys sys 1135570801 345779
+386/bin/db - 775 sys sys 1136346851 345745
 386/bin/dc - 775 sys sys 1135570801 99015
 386/bin/dd - 775 sys sys 1130384273 45416
 386/bin/deroff - 775 sys sys 1135570802 74231
@@ -396,7 +396,7 @@
 386/bin/sha1sum - 775 sys sys 1135570844 61123
 386/bin/size - 775 sys sys 1135570844 78748
 386/bin/sleep - 775 sys sys 1085077097 3413
-386/bin/snap - 775 sys sys 1132950493 313634
+386/bin/snap - 775 sys sys 1136346852 313627
 386/bin/snapfs - 775 sys sys 1134389876 388292
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1135570845 168197
@@ -430,7 +430,7 @@
 386/bin/topng - 775 sys sys 1135570850 138333
 386/bin/toppm - 775 sys sys 1135570850 165236
 386/bin/touch - 775 sys sys 1135570850 63751
-386/bin/tprof - 775 sys sys 1135570851 297542
+386/bin/tprof - 775 sys sys 1136346853 297508
 386/bin/tr - 775 sys sys 1135570851 61845
 386/bin/trace - 775 sys sys 1135570851 181182
 386/bin/troff - 775 sys sys 1134151360 357941
@@ -555,7 +555,7 @@
 386/lib/libhttpd.a - 664 sys sys 1127790504 99596
 386/lib/libip.a - 664 sys sys 1116126324 35602
 386/lib/libl.a - 664 sys sys 1115950154 5384
-386/lib/libmach.a - 664 sys sys 1134389887 783460
+386/lib/libmach.a - 664 sys sys 1136346854 783354
 386/lib/libmemdraw.a - 664 sys sys 1135447284 284166
 386/lib/libmemlayer.a - 664 sys sys 1115950157 47360
 386/lib/libmp.a - 664 sys sys 1127360619 79944
@@ -5598,7 +5598,7 @@ sys/doc/8½/8½.ms - 664 sys sys 1020895859 31593
 sys/doc/8½/8½.ps - 664 sys sys 1020895860 797150
 sys/doc/8½/fig1.ps - 664 sys sys 1020895859 473747
 sys/doc/8½/mkfile - 664 sys sys 1020895860 215
-sys/doc/9.html - 664 sys sys 1091459042 87309
+sys/doc/9.html - 664 sys sys 1136302690 87619
 sys/doc/9.ms - 664 sys sys 953237044 84632
 sys/doc/9.ps - 664 sys sys 960837924 508340
 sys/doc/acid.html - 664 sys sys 1091459045 71723
@@ -7923,7 +7923,7 @@ sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
 sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
-sys/src/9/pc/dat.h - 664 sys sys 1131537242 6554
+sys/src/9/pc/dat.h - 664 sys sys 1136347070 6583
 sys/src/9/pc/devarch.c - 664 sys sys 1136048694 18625
 sys/src/9/pc/devether.c - 664 sys sys 1131290265 10315
 sys/src/9/pc/devfloppy.c - 664 sys sys 1055689885 20024
@@ -7978,7 +7978,7 @@ sys/src/9/pc/main.c - 664 sys sys 1131290418 15224
 sys/src/9/pc/mem.h - 664 sys sys 1131290422 5209
 sys/src/9/pc/memory.c - 664 sys sys 1131573303 18191
 sys/src/9/pc/mkfile - 664 sys sys 1131907946 3571
-sys/src/9/pc/mmu.c - 664 sys sys 1132341477 23864
+sys/src/9/pc/mmu.c - 664 sys sys 1136336093 24152
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1131538523 17317
 sys/src/9/pc/mp.h - 664 sys sys 1131538511 6652
@@ -8002,7 +8002,7 @@ sys/src/9/pc/ptclbsum386.s - 664 sys sys 1015014521 1493
 sys/src/9/pc/random.c - 664 sys sys 1036812832 2021
 sys/src/9/pc/realmode.c - 664 sys sys 1131294602 2658
 sys/src/9/pc/rebootcode.s - 664 sys sys 1015014522 988
-sys/src/9/pc/screen.c - 664 sys sys 1133356380 13831
+sys/src/9/pc/screen.c - 664 sys sys 1136336092 13971
 sys/src/9/pc/screen.h - 664 sys sys 1131290516 4156
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1131538448 55207
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
@@ -9277,14 +9277,14 @@ sys/src/cmd/acid/builtin.c - 664 sys sys 1133802425 20958
 sys/src/cmd/acid/dbg.y - 664 sys sys 1131289463 5568
 sys/src/cmd/acid/dot.c - 664 sys sys 1131289462 2162
 sys/src/cmd/acid/exec.c - 664 sys sys 1132674180 8383
-sys/src/cmd/acid/expr.c - 664 sys sys 1131289461 15220
+sys/src/cmd/acid/expr.c - 664 sys sys 1136312279 15220
 sys/src/cmd/acid/lex.c - 664 sys sys 1131289460 7963
 sys/src/cmd/acid/list.c - 664 sys sys 1131289462 3680
 sys/src/cmd/acid/main.c - 664 sys sys 1134233059 8561
 sys/src/cmd/acid/mkfile - 664 sys sys 1046199006 366
 sys/src/cmd/acid/print.c - 664 sys sys 1131289462 6831
 sys/src/cmd/acid/proc.c - 664 sys sys 1131289462 4356
-sys/src/cmd/acid/util.c - 664 sys sys 1131289461 4609
+sys/src/cmd/acid/util.c - 664 sys sys 1136312279 4671
 sys/src/cmd/acme - 20000000775 sys sys 969511023 0
 sys/src/cmd/acme/acme.c - 664 sys sys 1134233060 19621
 sys/src/cmd/acme/addr.c - 664 sys sys 1111171698 4805
@@ -14871,26 +14871,26 @@ sys/src/libmach/0c - 20000000775 sys sys 1114459438 0
 sys/src/libmach/0c/README - 664 sys sys 1114459609 73
 sys/src/libmach/0c/ureg.h - 664 sys sys 1114459438 886
 sys/src/libmach/2.c - 664 sys sys 1131289379 2074
-sys/src/libmach/2db.c - 664 sys sys 1131289383 61298
+sys/src/libmach/2db.c - 664 sys sys 1136322405 61334
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
 sys/src/libmach/5.c - 664 sys sys 1131289380 1553
-sys/src/libmach/5db.c - 664 sys sys 1131289383 21545
+sys/src/libmach/5db.c - 664 sys sys 1136322405 21586
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
 sys/src/libmach/6.c - 664 sys sys 1131289380 3464
 sys/src/libmach/6c - 20000000775 sys sys 1123100867 0
 sys/src/libmach/6c/6.out.h - 664 sys sys 1114459480 7984
 sys/src/libmach/6obj.c - 664 sys sys 1114459831 2382
 sys/src/libmach/7.c - 664 sys sys 1131289380 3299
-sys/src/libmach/7db.c - 664 sys sys 1131289384 17330
+sys/src/libmach/7db.c - 664 sys sys 1136322405 17355
 sys/src/libmach/7obj.c - 664 sys sys 1091732676 2367
 sys/src/libmach/8.c - 664 sys sys 1131289381 2060
-sys/src/libmach/8db.c - 664 sys sys 1132940238 50849
+sys/src/libmach/8db.c - 664 sys sys 1136322405 50889
 sys/src/libmach/8obj.c - 664 sys sys 1091732625 2200
 sys/src/libmach/access.c - 664 sys sys 1131289377 4588
 sys/src/libmach/elf.h - 664 sys sys 1131292881 2301
 sys/src/libmach/executable.c - 664 sys sys 1131289375 16128
 sys/src/libmach/k.c - 664 sys sys 1131289378 3370
-sys/src/libmach/kdb.c - 664 sys sys 1131289381 21161
+sys/src/libmach/kdb.c - 664 sys sys 1136322404 21222
 sys/src/libmach/kobj.c - 664 sys sys 1091732625 2217
 sys/src/libmach/machdata.c - 664 sys sys 1131289377 8799
 sys/src/libmach/map.c - 664 sys sys 1131289376 3056
@@ -14898,7 +14898,7 @@ sys/src/libmach/mkfile - 664 sys sys 1131375713 479
 sys/src/libmach/obj.c - 664 sys sys 1131289376 5929
 sys/src/libmach/obj.h - 664 sys sys 1131292890 604
 sys/src/libmach/q.c - 664 sys sys 1131289379 3630
-sys/src/libmach/qdb.c - 664 sys sys 1131289382 27506
+sys/src/libmach/qdb.c - 664 sys sys 1136322404 27544
 sys/src/libmach/qobj.c - 664 sys sys 1091732625 2310
 sys/src/libmach/setmach.c - 664 sys sys 1119476886 2911
 sys/src/libmach/swap.c - 664 sys sys 1131289376 1056
@@ -14907,11 +14907,11 @@ sys/src/libmach/u.c - 664 sys sys 1131289378 3436
 sys/src/libmach/uc - 20000000775 sys sys 1114459488 0
 sys/src/libmach/uc/README - 664 sys sys 1114459488 73
 sys/src/libmach/uc/u.out.h - 664 sys sys 1114459488 3137
-sys/src/libmach/udb.c - 664 sys sys 1131289382 21910
+sys/src/libmach/udb.c - 664 sys sys 1136322404 21967
 sys/src/libmach/uobj.c - 664 sys sys 1114459831 2219
 sys/src/libmach/v.c - 664 sys sys 1131289378 3446
-sys/src/libmach/vcodas.c - 664 sys sys 1131289385 10258
-sys/src/libmach/vdb.c - 664 sys sys 1131289381 22264
+sys/src/libmach/vcodas.c - 664 sys sys 1136329351 10293
+sys/src/libmach/vdb.c - 664 sys sys 1136329351 22299
 sys/src/libmach/vobj.c - 664 sys sys 1091732625 2206
 sys/src/libmemdraw - 20000000775 sys sys 985020762 0
 sys/src/libmemdraw/alloc.c - 664 sys sys 1135895512 3334

+ 24 - 0
dist/replica/plan9.log

@@ -24703,3 +24703,27 @@
 1136201453 0 m lib/face/48x48x8/q/quanstro.1 - 664 sys sys 1136131296 2250
 1136219457 0 c sys/src/cmd/lex/parser.y - 664 sys sys 1136219175 14263
 1136224859 0 c 386/bin/lex - 775 sys sys 1136224362 99020
+1136300474 0 c sys/doc/9.html - 664 sys sys 1136300231 87516
+1136302276 0 c sys/doc/9.html - 664 sys sys 1136302192 87622
+1136304076 0 c sys/doc/9.html - 664 sys sys 1136302690 87619
+1136313077 0 c sys/src/cmd/acid/expr.c - 664 sys sys 1136312279 15220
+1136313077 1 c sys/src/cmd/acid/util.c - 664 sys sys 1136312279 4671
+1136320282 0 c 386/bin/acid - 775 sys sys 1136319254 400946
+1136323882 0 c 386/lib/libmach.a - 664 sys sys 1136322403 785282
+1136323882 1 c sys/src/libmach/2db.c - 664 sys sys 1136322405 61334
+1136323882 2 c sys/src/libmach/5db.c - 664 sys sys 1136322405 21586
+1136323882 3 c sys/src/libmach/7db.c - 664 sys sys 1136322405 17355
+1136323882 4 c sys/src/libmach/8db.c - 664 sys sys 1136322405 50889
+1136323882 5 c sys/src/libmach/kdb.c - 664 sys sys 1136322404 21222
+1136323882 6 c sys/src/libmach/qdb.c - 664 sys sys 1136322404 27544
+1136323882 7 c sys/src/libmach/udb.c - 664 sys sys 1136322404 21967
+1136329283 0 c sys/src/libmach/vcodas.c - 664 sys sys 1136329351 10293
+1136329283 1 c sys/src/libmach/vdb.c - 664 sys sys 1136329351 22299
+1136336485 0 c sys/src/9/pc/mmu.c - 664 sys sys 1136336093 24152
+1136336485 1 c sys/src/9/pc/screen.c - 664 sys sys 1136336092 13971
+1136347288 0 c 386/bin/acid - 775 sys sys 1136346850 400912
+1136347288 1 c 386/bin/db - 775 sys sys 1136346851 345745
+1136347288 2 c 386/bin/snap - 775 sys sys 1136346852 313627
+1136347288 3 c 386/bin/tprof - 775 sys sys 1136346853 297508
+1136347288 4 c 386/lib/libmach.a - 664 sys sys 1136346854 783354
+1136347288 5 c sys/src/9/pc/dat.h - 664 sys sys 1136347070 6583

+ 54 - 53
sys/doc/9.html

@@ -1,9 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
 <title>
 -
 </title>
 <body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#330088" ALINK="#FF0044">
-<H1>Plan 9 from Bell Labs
+<center><H1>Plan 9 from Bell Labs
 </H1>
 <DL><DD><I>Rob Pike<br>
 Dave Presotto<br>
@@ -14,7 +15,7 @@ Howard Trickey<br>
 Phil Winterbottom<br>
 Bell Laboratories, Murray Hill, NJ, 07974
 USA<br>
-</I></DL>
+</center></I></DL>
 <H4>Motivation
 </H4>
 <P>
@@ -84,7 +85,7 @@ desired, rather than doing all computing on a private machine.
 It soon became clear that this model was richer
 than we had foreseen, and the ideas of per-process name spaces
 and file-system-like resources were extended throughout
-the system&#173;to processes, graphics, even the network itself.
+the system&#x2014;to processes, graphics, even the network itself.
 </P>
 <P>
 By 1989 the system had become solid enough
@@ -142,7 +143,7 @@ from the lowest building blocks to the computing environment seen by users.
 It also serves as an introduction to the rest of the Plan 9 Programmer's Manual,
 which it accompanies.  More detail about topics in this paper
 can be found elsewhere in the manual.
-</P>
+</center></P>
 <H4>Design
 </H4>
 <P>
@@ -167,7 +168,7 @@ servers to office- and home-resident workstations or PCs, called terminals
 in Plan 9 terminology.
 Figure 1 shows the arrangement.
 <DL><DT><DD><TT><PRE>
-<br><img src="network.pic.19237420.gif"><br>
+<br><img src="network.pic.0.gif"><br>
 </PRE></TT></DL>
 </P>
 <DL>
@@ -265,23 +266,23 @@ so services built this way are ready-made for a distributed system.
 (This is a distinction from `object-oriented' models, where these issues
 must be faced anew for every class of object.)
 Examples in the sections that follow illustrate these ideas in action.
-</P>
+</center></P>
 <H4>The Command-level View
 </H4>
 <P>
 Plan 9 is meant to be used from a machine with a screen running
 the window system.
 It has no notion of `teletype' in the UNIX sense.  The keyboard handling of
-the bare system is rudimentary, but once the window system, 8&#189; [Pike91],
+the bare system is rudimentary, but once the window system, 8&frac12; [Pike91],
 is running,
 text can be edited with `cut and paste' operations from a pop-up menu,
 copied between windows, and so on.
-8&#189; permits editing text from the past, not just on the current input line.
-The text-editing capabilities of 8&#189; are strong enough to displace
+8&frac12; permits editing text from the past, not just on the current input line.
+The text-editing capabilities of 8&frac12; are strong enough to displace
 special features such as history in the shell,
 paging and scrolling,
 and mail editors.
-8&#189; windows do not support cursor addressing and,
+8&frac12; windows do not support cursor addressing and,
 except for one terminal emulator to simplify connecting to traditional systems,
 there is no cursor-addressing software in Plan 9.
 </P>
@@ -307,14 +308,14 @@ and
 <TT>/dev/cons</TT>
 (analogous to UNIX's
 <TT>/dev/tty</TT>).
-These files are provided by 8&#189;, which is implemented as a file server.
+These files are provided by 8&frac12;, which is implemented as a file server.
 Unlike X windows, where a new application typically creates a new window
-to run in, an 8&#189; graphics application usually runs in the window where it starts.
+to run in, an 8&frac12; graphics application usually runs in the window where it starts.
 It is possible and efficient for an application to create a new window, but
 that is not the style of the system.
 Again contrasting to X, in which a remote application makes a network
 call to the X server to start running,
-a remote 8&#189; application sees the
+a remote 8&frac12; application sees the
 <TT>mouse</TT>,
 <TT>bitblt</TT>,
 and
@@ -366,7 +367,7 @@ Finally, about half the commands are new.
 Compatibility was not a requirement for the system.
 Where the old commands or notation seemed good enough, we
 kept them.  When they didn't, we replaced them.
-</P>
+</center></P>
 <H4>The File Server
 </H4>
 <P>
@@ -491,7 +492,7 @@ doubling the capacity of the individual disks.
 If we were to upgrade to the new media,
 we would have more free space than in the original empty jukebox.
 Technology has created storage faster than we can use it.
-</P>
+</center></P>
 <H4>Unusual file servers
 </H4>
 <P>
@@ -503,9 +504,9 @@ a user process, or a remote server is irrelevant to the way it is used.
 There are dozens of such servers; in this section we present three representative ones.
 </P>
 <P>
-Perhaps the most remarkable file server in Plan 9 is 8&#189;, the window system.
+Perhaps the most remarkable file server in Plan 9 is 8&frac12;, the window system.
 It is discussed at length elsewhere [Pike91], but deserves a brief explanation here.
-8&#189; provides two interfaces: to the user seated at the terminal, it offers a traditional
+8&frac12; provides two interfaces: to the user seated at the terminal, it offers a traditional
 style of interaction with multiple windows, each running an application, all controlled
 by a mouse and keyboard.
 To the client programs, the view is also fairly traditional:
@@ -526,27 +527,27 @@ on which clients write encoded messages to execute graphical operations such as
 <TT>bitblt</TT>
 (RasterOp).
 What is unusual is how this is done:
-8&#189; is a file server, serving the files in
+8&frac12; is a file server, serving the files in
 <TT>/dev</TT>
 to the clients running in each window.
 Although every window looks the same to its client,
 each window has a distinct set of files in
 <TT>/dev</TT>.
-8&#189; multiplexes its clients' access to the resources of the terminal
+8&frac12; multiplexes its clients' access to the resources of the terminal
 by serving multiple sets of files.  Each client is given a private name space
 with a
 <I>different</I>
 set of files that behave the same as in all other windows.
 There are many advantages to this structure.
-One is that 8&#189; serves the same files it needs for its own implementation&#173;it
-multiplexes its own interface&#173;so it may be run, recursively, as a client of itself.
+One is that 8&frac12; serves the same files it needs for its own implementation&#x2014;it
+multiplexes its own interface&#x2014;so it may be run, recursively, as a client of itself.
 Also, consider the implementation of
 <TT>/dev/tty</TT>
 in UNIX, which requires special code in the kernel to redirect
 <TT>open</TT>
 calls to the appropriate device.
-Instead, in 8&#189; the equivalent service falls out
-automatically: 8&#189; serves
+Instead, in 8&frac12; the equivalent service falls out
+automatically: 8&frac12; serves
 <TT>/dev/cons</TT>
 as its basic function; there is nothing extra to do.
 When a program wants to
@@ -557,7 +558,7 @@ Again, local name spaces make this possible; conventions about the consistency o
 the files within them make it natural.
 </P>
 <P>
-8&#189; has a unique feature made possible by its design.
+8&frac12; has a unique feature made possible by its design.
 Because it is implemented as a file server,
 it has the power to postpone answering read requests for a particular window.
 This behavior is toggled by a reserved key on the keyboard.
@@ -690,7 +691,7 @@ For example, it is reasonable
 to start a window system in a window running a
 <TT>cpu</TT>
 command; all windows created there automatically start processes on the CPU server.
-</P>
+</center></P>
 <H4>Configurability and administration
 </H4>
 <P>
@@ -716,8 +717,8 @@ workstation community, machines tend to be owned by people who customize them
 by storing private information on local disk.
 We reject this style of use,
 although the system itself can be used this way.
-In our group, we have a laboratory with many public-access machines&#173;a terminal
-room&#173;and a user may sit down at any one of them and work.
+In our group, we have a laboratory with many public-access machines&#x2014;a terminal
+room&#x2014;and a user may sit down at any one of them and work.
 </P>
 <P>
 Central file servers centralize not just the files, but also their administration
@@ -772,7 +773,7 @@ The money saved by avoiding regular upgrades of terminals
 is instead spent on the newest, fastest multiprocessor servers.
 We estimate this costs about half the money of networked workstations
 yet provides general access to more powerful machines.
-</P>
+</center></P>
 <H4>C Programming
 </H4>
 <P>
@@ -805,7 +806,7 @@ For example, the standard Plan 9 library is called
 so all C source files include
 <TT>&lt;libc.h&gt;</TT>.
 These rules guarantee that all functions
-are called with arguments having the expected types &#173; something
+are called with arguments having the expected types &#x2014; something
 that was not true with pre-ANSI C programs.
 </P>
 <P>
@@ -909,7 +910,7 @@ POSIX specifications.
 To port network-based software such as X Windows, it was necessary to add
 some extensions to those
 specifications, such as the BSD networking functions.
-</P>
+</center></P>
 <H4>Portability and Compilation
 </H4>
 <P>
@@ -1047,7 +1048,7 @@ that configures the build to use the appropriate compilers and loader.
 Although simple-minded, this technique works well in practice:
 all applications in Plan 9 are built from a single source tree
 and it is possible to build the various architectures in parallel without conflict.
-</P>
+</center></P>
 <H4>Parallel programming
 </H4>
 <P>
@@ -1114,7 +1115,7 @@ it is hard to find two calls to
 <TT>rfork</TT>
 with the same bits set; programs
 use it to create many different forms of sharing and resource allocation.
-A system with just two types of processes&#173;regular processes and threads&#173;could
+A system with just two types of processes&#x2014;regular processes and threads&#x2014;could
 not handle this variety.
 </P>
 <P>
@@ -1217,7 +1218,7 @@ Complex applications such as Acme prove that
 careful operating system support can reduce the difficulty of writing
 multi-threaded applications without moving threading and
 synchronization primitives into the kernel.
-</P>
+</center></P>
 <H4>Implementation of Name Spaces
 </H4>
 <P>
@@ -1537,7 +1538,7 @@ If the file recovered from a walk has the same type, device, and qid path
 as an entry in the mount table, they are the same file and the
 corresponding substitution from the mount table is made.
 This is how the name space is implemented.
-</P>
+</center></P>
 <H4>File Caching
 </H4>
 <P>
@@ -1559,13 +1560,13 @@ The same method can be used to build a local caching file server.
 This user-level server interposes on the 9P connection to the remote server and
 monitors the traffic, copying data to a local disk.
 When it sees a read of known data, it answers directly,
-while writes are passed on immediately&#173;the cache is write-through&#173;to keep
+while writes are passed on immediately&#x2014;the cache is write-through&#x2014;to keep
 the central copy up to date.
 This is transparent to processes on the terminal and requires no change to 9P;
 it works well on home machines connected over serial lines.
 A similar method can be applied to build a general client cache in unused local
 memory, but this has not been done in Plan 9.
-</P>
+</center></P>
 <H4>Networks and Communication Devices
 </H4>
 <P>
@@ -1686,7 +1687,7 @@ hides the details.
 The uniform structure for networks in Plan 9 makes the
 <TT>import</TT>
 command all that is needed to construct gateways.
-</P>
+</center></P>
 <H4>Kernel structure for networks
 </H4>
 <P>
@@ -1709,7 +1710,7 @@ inserts data into the stream.
 Each module calls the succeeding one to send data up or down the stream.
 Like UNIX streams [Rit84],
 Plan 9 streams can be dynamically configured.
-</P>
+</center></P>
 <H4>The IL Protocol
 </H4>
 <P>
@@ -1739,7 +1740,7 @@ Full details are in another paper [PrWi95].
 <P>
 In Plan 9, the implementation of IL is smaller and faster than TCP.
 IL is our main Internet transport protocol.
-</P>
+</center></P>
 <H4>Overview of authentication
 </H4>
 <P>
@@ -1804,12 +1805,12 @@ this is how a CPU server runs processes on behalf of its clients.
 Plan 9's authentication structure builds
 secure services rather than depending on firewalls.
 Whereas firewalls require special code for every service penetrating the wall,
-the Plan 9 approach permits authentication to be done in a single place&#173;9P&#173;for
+the Plan 9 approach permits authentication to be done in a single place&#x2014;9P&#x2014;for
 all services.
 For example, the
 <TT>cpu</TT>
 command works securely across the Internet.
-</P>
+</center></P>
 <H4>Authenticating external connections
 </H4>
 <P>
@@ -1826,7 +1827,7 @@ Since a correct challenge/response exchange is valid only once
 and keys are never sent over the network,
 this procedure is not susceptible to replay attacks, yet
 is compatible with protocols like Telnet and FTP.
-</P>
+</center></P>
 <H4>Special users
 </H4>
 <P>
@@ -1880,7 +1881,7 @@ but makes it possible to make local files available to guests
 by binding them explicitly into the space.
 A restricted name space is more secure than the usual technique of exporting
 an ad hoc directory tree; the result is a kind of cage around untrusted users.
-</P>
+</center></P>
 <H4>The cpu command and proxied authentication
 </H4>
 <P>
@@ -1915,7 +1916,7 @@ for example saying that user
 in one domain is the same person as user
 <TT>rtmorris</TT>
 in another.
-</P>
+</center></P>
 <H4>File Permissions
 </H4>
 <P>
@@ -1990,7 +1991,7 @@ Also, since the dump file system is immutable, the file cannot be changed;
 it is read-protected forever.
 Drawbacks are that if the file is readable but should have been read-protected,
 it is readable forever, and that user names are hard to re-use.
-</P>
+</center></P>
 <H4>Performance
 </H4>
 <P>
@@ -2022,13 +2023,13 @@ and
 It also measures the time to send a byte on a pipe from one process
 to another and the throughput on a pipe between two processes.
 The results appear in Table 1.
-<br><img src="-.19237421.gif"><br>
+<br><img src="-.1.gif"><br>
 Table 1.  Performance comparison.
 </P>
 <br>&#32;<br>
 Although the Plan 9 times are not spectacular, they show that the kernel is
 competitive with commercial systems.
-<H4>Discussion
+</center><H4>Discussion
 </H4>
 <P>
 Plan 9 has a relatively conventional kernel;
@@ -2173,7 +2174,7 @@ Active use forces us to address shortcomings as they arise and to adapt the syst
 to solve our problems.
 Through this process, Plan 9 has become a comfortable, productive programming
 environment, as well as a vehicle for further systems research.
-</P>
+</center></P>
 <H4>References
 <DL COMPACT>
 <DT>[9man]<DD>
@@ -2203,7 +2204,7 @@ ISO/IEC JTC1/SC2/WG2 N 1036, dated 1994-08-01.
 <DT>[ISO10646] <DD>
 ISO/IEC DIS 10646-1:1993
 Information technology -
-Universal Multiple-Octet Coded Character Set (UCS) &#173;
+Universal Multiple-Octet Coded Character Set (UCS) &#x2014;
 Part 1: Architecture and Basic Multilingual Plane.
 <DT>[Kill84]<DD>
 T.J. Killian,
@@ -2255,7 +2256,7 @@ Rob Pike, ``The Text Editor <TT>sam</TT>'',
 Software - Practice and Experience,
 Nov 1987, <B>17</B>(11), pp. 813-845; reprinted in this volume.
 <DT>[Pike91]<DD>
-Rob Pike, ``8&#189;, the Plan 9 Window System'',
+Rob Pike, ``8&frac12;, the Plan 9 Window System'',
 USENIX Summer Conf. Proc.,
 Nashville, June, 1991, pp. 257-265,
 reprinted in this volume.
@@ -2279,7 +2280,7 @@ AT&amp;T Bell Laboratories,
 Murray Hill, NJ,
 1995.
 <DT>[POSIX]<DD>
-Information Technology&#173;Portable Operating
+Information Technology&#x2014;Portable Operating
 System Interface (POSIX) Part 1:
 System Application Program Interface (API)
 [C Language],
@@ -2333,7 +2334,7 @@ AT&amp;T Bell Laboratories Technical Journal,
 <B>63</B>(8), October, 1984.
 <DT>[Tric95]<DD>
 Howard Trickey,
-``APE &#173; The ANSI/POSIX Environment'',
+``APE &#x2014; The ANSI/POSIX Environment'',
 Plan 9 Programmer's Manual,
 Volume 2,
 AT&amp;T Bell Laboratories,
@@ -2368,5 +2369,5 @@ Murray Hill, NJ,
 </dl>
 <br>&#32;<br>
 <A href=http://www.lucent.com/copyright.html>
-Copyright</A> &#169; 2004 Lucent Technologies Inc.  All rights reserved.
+Copyright</A> &#169; 2006 Lucent Technologies Inc.  All rights reserved.
 </body></html>

+ 2 - 0
sys/src/9/pc/dat.h

@@ -214,6 +214,8 @@ struct Mach
 	int	havetsc;
 	int	havepge;
 	uvlong	tscticks;
+	int	pdballoc;
+	int	pdbfree;
 
 	vlong	mtrrcap;
 	vlong	mtrrdef;

+ 16 - 9
sys/src/9/pc/mmu.c

@@ -211,6 +211,7 @@ mmupdballoc(void)
 	ulong *pdb;
 
 	s = splhi();
+	m->pdballoc++;
 	if(m->pdbpool == 0){
 		spllo();
 		page = newpage(0, 0, 0);
@@ -234,12 +235,14 @@ mmupdbfree(Proc *proc, Page *p)
 {
 	if(islo())
 		panic("mmupdbfree: islo");
+	m->pdbfree++;
 	if(m->pdbcnt >= 10){
 		p->next = proc->mmufree;
 		proc->mmufree = p;
 	}else{
 		p->next = m->pdbpool;
 		m->pdbpool = p;
+		m->pdbcnt++;
 	}
 }
 
@@ -322,10 +325,11 @@ mmuswitch(Proc* proc)
 void
 mmurelease(Proc* proc)
 {
-	int s;
 	Page *page, *next;
 	ulong *pdb;
 
+	if(islo())
+		panic("mmurelease: islo");
 	taskswitch(PADDR(m->pdb), (ulong)m + BY2PG);
 	if(proc->kmaptable){
 		if(proc->mmupdb == nil)
@@ -337,14 +341,12 @@ mmurelease(Proc* proc)
 		/*
 		 * remove kmaptable from pdb before putting pdb up for reuse.
 		 */
-		s = splhi();
 		pdb = tmpmap(proc->mmupdb);
 		if(PPN(pdb[PDX(KMAP)]) != proc->kmaptable->pa)
 			panic("mmurelease: bad kmap pde %#.8lux kmap %#.8lux",
 				pdb[PDX(KMAP)], proc->kmaptable->pa);
 		pdb[PDX(KMAP)] = 0;
 		tmpunmap(pdb);
-		splx(s);
 		/*
 		 * move kmaptable to free list.
 		 */
@@ -383,7 +385,8 @@ upallocpdb(void)
 	pdb[PDX(MACHADDR)] = m->pdb[PDX(MACHADDR)];
 	tmpunmap(pdb);
 	up->mmupdb = page;
-	mmuflushtlb(up->mmupdb->pa);
+//XXX should have this	m->tss->cr3 = up->mmupdb->pa;
+	putcr3(up->mmupdb->pa);
 	splx(s);
 }
 	
@@ -393,13 +396,12 @@ upallocpdb(void)
 void
 putmmu(ulong va, ulong pa, Page*)
 {
-	int old, s;
+	int old;
 	Page *page;
 
 	if(up->mmupdb == nil)
 		upallocpdb();
 
-	s = splhi();
 	if(!(vpd[PDX(va)]&PTEVALID)){
 		if(up->mmufree == 0)
 			page = newpage(0, 0, 0);
@@ -418,7 +420,8 @@ putmmu(ulong va, ulong pa, Page*)
 	vpt[VPTX(va)] = pa|PTEUSER|PTEVALID;
 	if(old&PTEVALID)
 		flushpg(va);
-	splx(s);
+	if(getcr3() != up->mmupdb->pa)
+		print("bad cr3 %.8lux %.8lux\n", getcr3(), up->mmupdb->pa);
 }
 
 /*
@@ -572,7 +575,7 @@ vmapalloc(ulong size)
 		n = (size+4*MB-1) / (4*MB);
 		if((o = findhole(vpdb, vpdbsize, n)) != -1)
 			return VMAP + o*4*MB;
-		return VMAP + o;
+		return 0;
 	}
 	n = (size+BY2PG-1) / BY2PG;
 	for(i=0; i<vpdbsize; i++)
@@ -988,8 +991,12 @@ countpagerefs(ulong *ref, int print)
 					pg->pa, i);
 		}
 	}
-	if(!print)
+	if(!print){
 		iprint("%d pages in mach pdbpools\n", n);
+		for(i=0; i<conf.nmach; i++)
+			iprint("cpu%d: %d pdballoc, %d pdbfree\n",
+				i, MACHP(i)->pdballoc, MACHP(i)->pdbfree);
+	}
 }
 
 void

+ 6 - 0
sys/src/9/pc/screen.c

@@ -511,6 +511,12 @@ vgalinearaddr(VGAscr *scr, ulong paddr, int size)
 	npaddr = paddr-x;
 	nsize = PGROUND(size+x);
 
+	/*
+	 * Don't bother trying to map more than 4000x4000x32 = 64MB.
+	 * We only have a 256MB window.
+	 */
+	if(nsize > 64*MB)
+		nsize = 64*MB;
 	scr->vaddr = vmap(npaddr, nsize);
 	if(scr->vaddr == 0)
 		error("cannot allocate vga frame buffer");

+ 1 - 1
sys/src/cmd/acid/expr.c

@@ -20,9 +20,9 @@ static int fsize[] =
 	['S'] 4,
 	['U'] 4,
 	['V'] 8,
+	['W'] 8,
 	['X'] 4,
 	['Y'] 8,
-	['W'] 8,
 	['Z'] 8,
 	['a'] 4,
 	['b'] 1,

+ 9 - 3
sys/src/cmd/acid/util.c

@@ -190,11 +190,17 @@ rget(Map *map, char *reg)
 	if(s == 0)
 		fatal("rget: %s\n", reg);
 
-	if(s->v->fmt == 'W')
-		ret = get8(map, s->v->ival, &v);
-	else {
+	switch(s->v->fmt){
+	default:
 		ret = get4(map, s->v->ival, &x);
 		v = x;
+		break;
+	case 'V':
+	case 'W':
+	case 'Y':
+	case 'Z':
+		ret = get8(map, s->v->ival, &v);
+		break;
 	}
 	if(ret < 0)
 		error("can't get register %s: %r\n", reg);

+ 5 - 2
sys/src/libmach/2db.c

@@ -1296,6 +1296,8 @@ instruction(Inst *ip)
 	return 0;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Inst *i, char *fmt, ...)
 {
@@ -1315,7 +1317,8 @@ static	char	*regname[] =
 static void
 plocal(Inst *ip, Operand *ap)
 {
-	int ret, offset;
+	int ret;
+	long offset;
 	uvlong moved;
 	Symbol s;
 
@@ -1533,7 +1536,7 @@ pea(int reg, Inst *ip, Operand *ap)
 	case ADisp:	/* references off the static base */
 		if (reg == 6 && mach->sb && ap->disp) {
 			ip->curr += symoff(ip->curr, left, ap->disp+mach->sb, CANY);
-			bprint(ip, "(SB)", reg);
+			bprint(ip, "(SB)");
 			break;
 		}
 			/* reference autos and parameters off the stack */

+ 5 - 3
sys/src/libmach/5db.c

@@ -212,6 +212,8 @@ decode(Map *map, uvlong pc, Instr *i)
 	return 1;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {
@@ -254,7 +256,7 @@ plocal(Instr *i)
 			class == CAUTO ? " auto" : "param", offset);
 		return 0;
 	}
-	bprint(i, "%s%c%d%s", s.name, class == CPARAM ? '+' : '-', s.value, reg);
+	bprint(i, "%s%c%lld%s", s.name, class == CPARAM ? '+' : '-', s.value, reg);
 	return 1;
 }
 
@@ -885,11 +887,11 @@ format(char *mnemonic, Instr *i, char *f)
 			break;
 				
 		case 'M':
-			bprint(i, "%d", (i->w>>8) & 0xf);
+			bprint(i, "%lud", (i->w>>8) & 0xf);
 			break;
 				
 		case 'm':
-			bprint(i, "%d", (i->w>>7) & 0x1f);
+			bprint(i, "%lud", (i->w>>7) & 0x1f);
 			break;
 
 		case 'h':

+ 4 - 2
sys/src/libmach/7db.c

@@ -169,6 +169,8 @@ mkinstr(uvlong pc, Instr *i)
 	return 1;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {
@@ -256,7 +258,7 @@ _store(Opcode *o, Instr *i, char r)
 	if (i->rb == 29 && mach->sb) {
 		bprint(i, "%s\t%c%d,", m, r, i->ra);
 		i->curr += symoff(i->curr, i->end-i->curr, i->mem+mach->sb, CANY);
-		bprint(i, "(SB)", r, i->ra);
+		bprint(i, "(SB)");
 		return;
 	}
 	format(o->mnemonic, i, o->ken);
@@ -769,7 +771,7 @@ format(char *mnemonic, Instr *i, char *f)
 
 		case 'v':
 			if (i->islit)
-				bprint(i, "$%lx", i->literal);
+				bprint(i, "$%ux", i->literal);
 			else
 				bprint(i, "R%d", i->rb);
 			break;

+ 5 - 2
sys/src/libmach/8db.c

@@ -1701,6 +1701,8 @@ badop:
 	return op;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *ip, char *fmt, ...)
 {
@@ -1750,7 +1752,8 @@ static char *sreg[] = { "ES", "CS", "SS", "DS", "FS", "GS" };
 static void
 plocal(Instr *ip)
 {
-	int ret, offset;
+	int ret;
+	long offset;
 	Symbol s;
 	char *reg;
 
@@ -1975,7 +1978,7 @@ prinstr(Instr *ip, char *fmt)
 				bprint(ip, "CBW");
 			break;
 		case 'd':
-			bprint(ip,"%lux:%lux",ip->seg,ip->disp);
+			bprint(ip,"%ux:%lux",ip->seg,ip->disp);
 			break;
 		case 'm':
 			if (ip->mod == 3 && ip->osize != 'B') {

+ 53 - 50
sys/src/libmach/kdb.c

@@ -277,6 +277,26 @@ static struct opcode sparcop3[64]={
 	[0x1F]	"swapa",	loada,	0,
 };
 
+#pragma	varargck	argpos	bprint	2
+#pragma	varargck	type	"T"	char*
+
+/* convert to lower case from upper, according to dascase */
+static int
+Tfmt(Fmt *f)
+{
+	char buf[128];
+	char *s, *t, *oa;
+
+	oa = va_arg(f->args, char*);
+	if(dascase){
+		for(s=oa,t=buf; *t = *s; s++,t++)
+			if('A'<=*t && *t<='Z')
+				*t += 'a'-'A';
+		return fmtstrcpy(f, buf);
+	}
+	return fmtstrcpy(f, oa);
+}
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {
@@ -375,7 +395,7 @@ printins(Map *map, uvlong pc, char *buf, int n)
 		break;
 
 	case 1:
-		bprint(&instr, "%X", "CALL\t");
+		bprint(&instr, "%T", "CALL\t");
 		instr.curr += symoff(instr.curr, instr.end-instr.curr,
 					pc+instr.disp30*4, CTEXT);
 		if (!dascase)
@@ -406,23 +426,6 @@ printins(Map *map, uvlong pc, char *buf, int n)
 	return instr.size*4;
 }
 
-/* convert to lower case from upper, according to dascase */
-static int
-Xfmt(Fmt *f)
-{
-	char buf[128];
-	char *s, *t, *oa;
-
-	oa = va_arg(f->args, char*);
-	if(dascase){
-		for(s=oa,t=buf; *t = *s; s++,t++)
-			if('A'<=*t && *t<='Z')
-				*t += 'a'-'A';
-		return fmtstrcpy(f, buf);
-	}
-	return fmtstrcpy(f, oa);
-}
-
 static int
 sparcinst(Map *map, uvlong pc, char modifier, char *buf, int n)
 {
@@ -431,7 +434,7 @@ sparcinst(Map *map, uvlong pc, char modifier, char *buf, int n)
 		/* a modifier of 'I' toggles the dissassembler type */
 	if (!fmtinstalled) {
 		fmtinstalled = 1;
-		fmtinstall('X', Xfmt);
+		fmtinstall('T', Tfmt);
 	}
 	if ((asstype == ASUNSPARC && modifier == 'i')
 		|| (asstype == ASPARC && modifier == 'I'))
@@ -483,7 +486,7 @@ plocal(Instr *i)
 		return -1;
 	if (s.value > i->simm13) {
 		if(getauto(&s, s.value-i->simm13, CAUTO, &s)) {
-			bprint(i, "%s+%d(SP)", s.name, s.value);
+			bprint(i, "%s+%lld(SP)", s.name, s.value);
 			return 1;
 		}
 	} else {
@@ -518,17 +521,17 @@ address(Instr *i)
 		}
 		bprint(i, "%s", s.name);
 		if (s.value != off)
-			bprint(i, "+%lux", s.value-off);
+			bprint(i, "+%llux", s.value-off);
 		bprint(i, "(SB)");
 		return;
 	}
-	bprint(i, "%lux(R%d)", i->simm13, i->rs1);
+	bprint(i, "%ux(R%d)", i->simm13, i->rs1);
 }
 
 static void
 unimp(Instr *i, char *m)
 {
-	bprint(i, "%X", m);
+	bprint(i, "%T", m);
 }
 
 static char	*bratab[16] = {	/* page 91 */
@@ -595,9 +598,9 @@ bra1(Instr *i, char *m, char *tab[])
 
 	imm = i->simmdisp22;
 	if(i->a)
-		bprint(i, "%X%X.%c\t", m, tab[i->cond], 'A'+dascase);
+		bprint(i, "%T%T.%c\t", m, tab[i->cond], 'A'+dascase);
 	else
-		bprint(i, "%X%X\t", m, tab[i->cond]);
+		bprint(i, "%T%T\t", m, tab[i->cond]);
 	i->curr += symoff(i->curr, i->end-i->curr, i->addr+4*imm, CTEXT);
 	if (!dascase)
 		bprint(i, "(SB)");
@@ -625,9 +628,9 @@ static void
 trap(Instr *i, char *m)			/* page 101 */
 {
 	if(i->i == 0)
-		bprint(i, "%X%X\tR%d+R%d", m, bratab[i->cond], i->rs2, i->rs1);
+		bprint(i, "%T%T\tR%d+R%d", m, bratab[i->cond], i->rs2, i->rs1);
 	else
-		bprint(i, "%X%X\t$%lux+R%d", m, bratab[i->cond], i->simm13, i->rs1);
+		bprint(i, "%T%T\t$%ux+R%d", m, bratab[i->cond], i->simm13, i->rs1);
 }
 
 static void
@@ -637,7 +640,7 @@ sethi(Instr *i, char *m)		/* page 89 */
 
 	imm = i->immdisp22<<10;
 	if(dascase){
-		bprint(i, "%X\t%lux, R%d", m, imm, i->rd);
+		bprint(i, "%T\t%lux, R%d", m, imm, i->rd);
 		return;
 	}
 	if(imm==0 && i->rd==0){
@@ -733,25 +736,25 @@ shift(Instr *i, char *m)	/* page 88 */
 	if(i->i == 0){
 		if(i->rs1 == i->rd)
 			if(dascase)
-				bprint(i, "%X\tR%d, R%d", m, i->rs1, i->rs2);
+				bprint(i, "%T\tR%d, R%d", m, i->rs1, i->rs2);
 			else
-				bprint(i, "%X\tR%d, R%d", m, i->rs2, i->rs1);
+				bprint(i, "%T\tR%d, R%d", m, i->rs2, i->rs1);
 		else
 			if(dascase)
-				bprint(i, "%X\tR%d, R%d, R%d", m, i->rs1, i->rs2, i->rd);
+				bprint(i, "%T\tR%d, R%d, R%d", m, i->rs1, i->rs2, i->rd);
 			else
-				bprint(i, "%X\tR%d, R%d, R%d", m, i->rs2, i->rs1, i->rd);
+				bprint(i, "%T\tR%d, R%d, R%d", m, i->rs2, i->rs1, i->rd);
 	}else{
 		if(i->rs1 == i->rd)
 			if(dascase)
-				bprint(i, "%X\t$%d,R%d", m, i->simm13&0x1F, i->rs1);
+				bprint(i, "%T\t$%d,R%d", m, i->simm13&0x1F, i->rs1);
 			else
-				bprint(i, "%X\tR%d, $%d", m,  i->rs1, i->simm13&0x1F);
+				bprint(i, "%T\tR%d, $%d", m,  i->rs1, i->simm13&0x1F);
 		else
 			if(dascase)
-				bprint(i, "%X\tR%d, $%d, R%d",m,i->rs1,i->simm13&0x1F,i->rd);
+				bprint(i, "%T\tR%d, $%d, R%d",m,i->rs1,i->simm13&0x1F,i->rd);
 			else
-				bprint(i, "%X\t$%d, R%d, R%d",m,i->simm13&0x1F,i->rs1,i->rd);
+				bprint(i, "%T\t$%d, R%d, R%d",m,i->simm13&0x1F,i->rs1,i->rd);
 	}
 }
 
@@ -760,24 +763,24 @@ add(Instr *i, char *m)	/* page 82 */
 {
 	if(i->i == 0){
 		if(dascase)
-			bprint(i, "%X\tR%d, R%d", m, i->rs1, i->rs2);
+			bprint(i, "%T\tR%d, R%d", m, i->rs1, i->rs2);
 		else
 			if(i->op3==2 && i->rs1==0 && i->rd)  /* OR R2, R0, R1 */
 				bprint(i, "MOVW\tR%d", i->rs2);
 			else
-				bprint(i, "%X\tR%d, R%d", m, i->rs2, i->rs1);
+				bprint(i, "%T\tR%d, R%d", m, i->rs2, i->rs1);
 	}else{
 		if(dascase)
-			bprint(i, "%X\tR%d, $%lux", m, i->rs1, i->simm13);
+			bprint(i, "%T\tR%d, $%ux", m, i->rs1, i->simm13);
 		else
 			if(i->op3==0 && i->rd && i->rs1==0)	/* ADD $x, R0, R1 */
-				bprint(i, "MOVW\t$%lux", i->simm13);
+				bprint(i, "MOVW\t$%ux", i->simm13);
 			else if(i->op3==0 && i->rd && i->rs1==2){
 				/* ADD $x, R2, R1 -> MOVW $x(SB), R1 */
 				bprint(i, "MOVW\t$");
 				address(i);
 			} else
-				bprint(i, "%X\t$%lux, R%d", m, i->simm13, i->rs1);
+				bprint(i, "%T\t$%ux, R%d", m, i->simm13, i->rs1);
 	}
 	if(i->rs1 != i->rd)
 		bprint(i, ", R%d", i->rd);
@@ -793,7 +796,7 @@ cmp(Instr *i, char *m)
 	if(i->i == 0)
 		bprint(i, "CMP\tR%d, R%d", i->rs1, i->rs2);
 	else
-		bprint(i, "CMP\tR%d, $%lux", i->rs1, i->simm13);
+		bprint(i, "CMP\tR%d, $%ux", i->rs1, i->simm13);
 }
 
 static char *regtab[4] = {
@@ -810,14 +813,14 @@ wr(Instr *i, char *m)		/* page 82 */
 		if(i->i == 0)
 			bprint(i, "%s\tR%d, R%d", m, i->rs1, i->rs2);
 		else
-			bprint(i, "%s\tR%d, $%lux", m, i->rs1, i->simm13);
+			bprint(i, "%s\tR%d, $%ux", m, i->rs1, i->simm13);
 	}else{
 		if(i->i && i->simm13==0)
 			bprint(i, "MOVW\tR%d", i->rs1);
 		else if(i->i == 0)
 			bprint(i, "wr\tR%d, R%d", i->rs2, i->rs1);
 		else
-			bprint(i, "wr\t$%lux, R%d", i->simm13, i->rs1);
+			bprint(i, "wr\t$%ux, R%d", i->simm13, i->rs1);
 	}
 	bprint(i, ", %s", regtab[i->op3&3]);
 }
@@ -842,14 +845,14 @@ jmpl(Instr *i, char *m)		/* page 82 */
 {
 	if(i->i == 0){
 		if(i->rd == 15)
-			bprint(i, "%X\t(R%d+R%d)", "CALL", i->rs2, i->rs1);
+			bprint(i, "%T\t(R%d+R%d)", "CALL", i->rs2, i->rs1);
 		else
-			bprint(i, "%X\t(R%d+R%d), R%d", m, i->rs2, i->rs1, i->rd);
+			bprint(i, "%T\t(R%d+R%d), R%d", m, i->rs2, i->rs1, i->rd);
 	}else{
 		if(!dascase && i->simm13==8 && i->rs1==15 && i->rd==0)
 			bprint(i, "RETURN");
 		else{
-			bprint(i, "%X\t", m);
+			bprint(i, "%T\t", m);
 			address(i);
 			bprint(i, ", R%d", i->rd);
 		}
@@ -995,15 +998,15 @@ fpop(Instr *i, char *m)	/* page 108-116 */
 	}
 	for(j=0; fptab1[j].name; j++)
 		if(fptab1[j].opf == i->opf){
-			bprint(i, "%X\tF%d, F%d", fptab1[j].name, i->rs2, i->rd);
+			bprint(i, "%T\tF%d, F%d", fptab1[j].name, i->rs2, i->rd);
 			return;
 		}
 	for(j=0; fptab2[j].name; j++)
 		if(fptab2[j].opf == i->opf){
-			bprint(i, "%X\tF%d, F%d, F%d", fptab2[j].name, i->rs1, i->rs2, i->rd);
+			bprint(i, "%T\tF%d, F%d, F%d", fptab2[j].name, i->rs1, i->rs2, i->rd);
 			return;
 		}
-	bprint(i, "%X%ux\tF%d, F%d, F%d", m, i->opf, i->rs1, i->rs2, i->rd);
+	bprint(i, "%T%ux\tF%d, F%d, F%d", m, i->opf, i->rs1, i->rs2, i->rd);
 }
 
 static int

+ 15 - 13
sys/src/libmach/qdb.c

@@ -157,6 +157,8 @@ typedef struct {
 #define	IBF(v,a,b) (((ulong)(v)>>(32-(b)-1)) & ~(~0L<<(((b)-(a)+1))))
 #define	IB(v,b) IBF((v),(b),(b))
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {
@@ -250,7 +252,7 @@ mkinstr(uvlong pc, Instr *i)
 static int
 plocal(Instr *i)
 {
-	int offset;
+	long offset;
 	Symbol s;
 
 	if (!findsym(i->addr, CTEXT, &s) || !findlocal(&s, FRAMENAME, &s))
@@ -258,12 +260,12 @@ plocal(Instr *i)
 	offset = s.value - i->immediate;
 	if (offset > 0) {
 		if(getauto(&s, offset, CAUTO, &s)) {
-			bprint(i, "%s+%d(SP)", s.name, s.value);
+			bprint(i, "%s+%lld(SP)", s.name, s.value);
 			return 1;
 		}
 	} else {
 		if (getauto(&s, -offset-4, CPARAM, &s)) {
-			bprint(i, "%s+%d(FP)", s.name, -offset);
+			bprint(i, "%s+%ld(FP)", s.name, -offset);
 			return 1;
 		}
 	}
@@ -289,13 +291,13 @@ pglobal(Instr *i, uvlong off, int anyoff, char *reg)
 		}
 		bprint(i, "%s", s.name);
 		if (s.value != off)
-			bprint(i, "+%lux", off-s.value);
+			bprint(i, "+%llux", off-s.value);
 		bprint(i, reg);
 		return 1;
 	}
 	if(!anyoff)
 		return 0;
-	bprint(i, "%lux%s", off, reg);
+	bprint(i, "%llux%s", off, reg);
 	return 1;
 }
 
@@ -307,7 +309,7 @@ address(Instr *i)
 	if (i->ra == REGSB && mach->sb && pglobal(i, mach->sb+i->immediate, 0, "(SB)") >= 0)
 		return;
 	if(i->simm < 0)
-		bprint(i, "-%lx(R%d)", -i->simm, i->ra);
+		bprint(i, "-%x(R%d)", -i->simm, i->ra);
 	else
 		bprint(i, "%lux(R%d)", i->immediate, i->ra);
 }
@@ -389,7 +391,7 @@ addis(Opcode *o, Instr *i)
 		address(i);
 		bprint(i, ",R%d", i->rd);
 	} else if(i->op==15 && v < 0) {
-		bprint(i, "SUB\t$%d,R%d", -v, i->ra);
+		bprint(i, "SUB\t$%ld,R%d", -v, i->ra);
 		if(i->rd != i->ra)
 			bprint(i, ",R%d", i->rd);
 	} else {
@@ -1058,17 +1060,17 @@ format(char *mnemonic, Instr *i, char *f)
 
 		case 'l':
 			if(i->simm < 0)
-				bprint(i, "-%lx(R%d)", -i->simm, i->ra);
+				bprint(i, "-%x(R%d)", -i->simm, i->ra);
 			else
-				bprint(i, "%lx(R%d)", i->simm, i->ra);
+				bprint(i, "%x(R%d)", i->simm, i->ra);
 			break;
 
 		case 'i':
-			bprint(i, "$%ld", i->simm);
+			bprint(i, "$%d", i->simm);
 			break;
 
 		case 'I':
-			bprint(i, "$%lx", i->uimm);
+			bprint(i, "$%ux", i->uimm);
 			break;
 
 		case 'w':
@@ -1099,11 +1101,11 @@ format(char *mnemonic, Instr *i, char *f)
 			break;
 
 		case 'm':
-			bprint(i, "%lx", i->crm);
+			bprint(i, "%ux", i->crm);
 			break;
 
 		case 'M':
-			bprint(i, "%lx", i->fm);
+			bprint(i, "%ux", i->fm);
 			break;
 
 		case 'z':

+ 55 - 52
sys/src/libmach/udb.c

@@ -304,6 +304,26 @@ static struct opcode sparc64op3[64]={
 	[0x1F]	"swapa",	loada,	0,
 };
 
+#pragma	varargck	argpos	bprint	2
+#pragma	varargck	type	"T"	char*
+
+/* convert to lower case from upper, according to dascase */
+static int
+Tfmt(Fmt *f)
+{
+	char buf[128];
+	char *s, *t, *oa;
+
+	oa = va_arg(f->args, char*);
+	if(dascase){
+		for(s=oa,t=buf; *t = *s; s++,t++)
+			if('A'<=*t && *t<='Z')
+				*t += 'a'-'A';
+		return fmtstrcpy(f, buf);
+	}
+	return fmtstrcpy(f, oa);
+}
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {
@@ -402,7 +422,7 @@ printins(Map *map, uvlong pc, char *buf, int n)
 		break;
 
 	case 1:
-		bprint(&instr, "%X", "CALL\t");
+		bprint(&instr, "CALL\t");
 		instr.curr += symoff(instr.curr, instr.end-instr.curr,
 					pc+instr.disp30*4, CTEXT);
 		if (!dascase)
@@ -433,23 +453,6 @@ printins(Map *map, uvlong pc, char *buf, int n)
 	return instr.size*4;
 }
 
-/* convert to lower case from upper, according to dascase */
-static int
-Xfmt(Fmt *f)
-{
-	char buf[128];
-	char *s, *t, *oa;
-
-	oa = va_arg(f->args, char*);
-	if(dascase){
-		for(s=oa,t=buf; *t = *s; s++,t++)
-			if('A'<=*t && *t<='Z')
-				*t += 'a'-'A';
-		return fmtstrcpy(f, buf);
-	}
-	return fmtstrcpy(f, oa);
-}
-
 static int
 sparc64inst(Map *map, uvlong pc, char modifier, char *buf, int n)
 {
@@ -458,7 +461,7 @@ sparc64inst(Map *map, uvlong pc, char modifier, char *buf, int n)
 		/* a modifier of 'I' toggles the dissassembler type */
 	if (!fmtinstalled) {
 		fmtinstalled = 1;
-		fmtinstall('X', Xfmt);
+		fmtinstall('T', Tfmt);
 	}
 	if ((asstype == ASUNSPARC && modifier == 'i')
 		|| (asstype == ASPARC && modifier == 'I'))
@@ -503,20 +506,20 @@ sparc64instlen(Map *map, uvlong pc)
 static int
 plocal(Instr *i)
 {
-	int offset;
+	long offset;
 	Symbol s;
 
 	if (!findsym(i->addr, CTEXT, &s) || !findlocal(&s, FRAMENAME, &s))
 		return -1;
 	if (s.value > i->simm13) {
 		if(getauto(&s, s.value-i->simm13, CAUTO, &s)) {
-			bprint(i, "%s+%d(SP)", s.name, s.value);
+			bprint(i, "%s+%lld(SP)", s.name, s.value);
 			return 1;
 		}
 	} else {
 		offset = i->simm13-s.value;
 		if (getauto(&s, offset-4, CPARAM, &s)) {
-			bprint(i, "%s+%d(FP)", s.name, offset);
+			bprint(i, "%s+%ld(FP)", s.name, offset);
 			return 1;
 		}
 	}
@@ -545,17 +548,17 @@ address(Instr *i)
 		}
 		bprint(i, "%s", s.name);
 		if (s.value != off)
-			bprint(i, "+%lux", s.value-off);
+			bprint(i, "+%llux", s.value-off);
 		bprint(i, "(SB)");
 		return;
 	}
-	bprint(i, "%lux(R%d)", i->simm13, i->rs1);
+	bprint(i, "%ux(R%d)", i->simm13, i->rs1);
 }
 
 static void
 unimp(Instr *i, char *m)
 {
-	bprint(i, "%X", m);
+	bprint(i, "%T", m);
 }
 
 static char	*bratab[16] = {		/* page 91 */
@@ -622,9 +625,9 @@ bra1(Instr *i, char *m, char *tab[])
 
 	imm = i->simmdisp22;
 	if(i->a)
-		bprint(i, "%X%X.%c\t", m, tab[i->cond], 'A'+dascase);
+		bprint(i, "%T%T.%c\t", m, tab[i->cond], 'A'+dascase);
 	else
-		bprint(i, "%X%X\t", m, tab[i->cond]);
+		bprint(i, "%T%T\t", m, tab[i->cond]);
 	i->curr += symoff(i->curr, i->end-i->curr, i->addr+4*imm, CTEXT);
 	if (!dascase)
 		bprint(i, "(SB)");
@@ -652,9 +655,9 @@ static void
 trap(Instr *i, char *m)			/* page 101 */
 {
 	if(i->i == 0)
-		bprint(i, "%X%X\tR%d+R%d", m, bratab[i->cond], i->rs2, i->rs1);
+		bprint(i, "%T%T\tR%d+R%d", m, bratab[i->cond], i->rs2, i->rs1);
 	else
-		bprint(i, "%X%X\t$%lux+R%d", m, bratab[i->cond], i->simm13, i->rs1);
+		bprint(i, "%T%T\t$%ux+R%d", m, bratab[i->cond], i->simm13, i->rs1);
 }
 
 static void
@@ -664,7 +667,7 @@ sethi(Instr *i, char *m)		/* page 89 */
 
 	imm = i->immdisp22<<10;
 	if(dascase){
-		bprint(i, "%X\t%lux, R%d", m, imm, i->rd);
+		bprint(i, "%T\t%lux, R%d", m, imm, i->rd);
 		return;
 	}
 	if(imm==0 && i->rd==0){
@@ -760,25 +763,25 @@ shift(Instr *i, char *m)		/* page 88 */
 	if(i->i == 0){
 		if(i->rs1 == i->rd)
 			if(dascase)
-				bprint(i, "%X\tR%d, R%d", m, i->rs1, i->rs2);
+				bprint(i, "%T\tR%d, R%d", m, i->rs1, i->rs2);
 			else
-				bprint(i, "%X\tR%d, R%d", m, i->rs2, i->rs1);
+				bprint(i, "%T\tR%d, R%d", m, i->rs2, i->rs1);
 		else
 			if(dascase)
-				bprint(i, "%X\tR%d, R%d, R%d", m, i->rs1, i->rs2, i->rd);
+				bprint(i, "%T\tR%d, R%d, R%d", m, i->rs1, i->rs2, i->rd);
 			else
-				bprint(i, "%X\tR%d, R%d, R%d", m, i->rs2, i->rs1, i->rd);
+				bprint(i, "%T\tR%d, R%d, R%d", m, i->rs2, i->rs1, i->rd);
 	}else{
 		if(i->rs1 == i->rd)
 			if(dascase)
-				bprint(i, "%X\t$%d,R%d", m, i->simm13&0x1F, i->rs1);
+				bprint(i, "%T\t$%d,R%d", m, i->simm13&0x1F, i->rs1);
 			else
-				bprint(i, "%X\tR%d, $%d", m,  i->rs1, i->simm13&0x1F);
+				bprint(i, "%T\tR%d, $%d", m,  i->rs1, i->simm13&0x1F);
 		else
 			if(dascase)
-				bprint(i, "%X\tR%d, $%d, R%d",m,i->rs1,i->simm13&0x1F,i->rd);
+				bprint(i, "%T\tR%d, $%d, R%d",m,i->rs1,i->simm13&0x1F,i->rd);
 			else
-				bprint(i, "%X\t$%d, R%d, R%d",m,i->simm13&0x1F,i->rs1,i->rd);
+				bprint(i, "%T\t$%d, R%d, R%d",m,i->simm13&0x1F,i->rs1,i->rd);
 	}
 }
 
@@ -787,24 +790,24 @@ add(Instr *i, char *m)			/* page 82 */
 {
 	if(i->i == 0){
 		if(dascase)
-			bprint(i, "%X\tR%d, R%d", m, i->rs1, i->rs2);
+			bprint(i, "%T\tR%d, R%d", m, i->rs1, i->rs2);
 		else
 			if(i->op3==2 && i->rs1==0 && i->rd)  /* OR R2, R0, R1 */
 				bprint(i, "MOVW\tR%d", i->rs2);
 			else
-				bprint(i, "%X\tR%d, R%d", m, i->rs2, i->rs1);
+				bprint(i, "%T\tR%d, R%d", m, i->rs2, i->rs1);
 	}else{
 		if(dascase)
-			bprint(i, "%X\tR%d, $%lux", m, i->rs1, i->simm13);
+			bprint(i, "%T\tR%d, $%ux", m, i->rs1, i->simm13);
 		else
 			if(i->op3==0 && i->rd && i->rs1==0)	/* ADD $x, R0, R1 */
-				bprint(i, "MOVW\t$%lux", i->simm13);
+				bprint(i, "MOVW\t$%ux", i->simm13);
 			else if(i->op3==0 && i->rd && i->rs1==2){
 				/* ADD $x, R2, R1 -> MOVW $x(SB), R1 */
 				bprint(i, "MOVW\t$");
 				address(i);
 			} else
-				bprint(i, "%X\t$%lux, R%d", m, i->simm13, i->rs1);
+				bprint(i, "%T\t$%ux, R%d", m, i->simm13, i->rs1);
 	}
 	if(i->rs1 != i->rd)
 		bprint(i, ", R%d", i->rd);
@@ -820,7 +823,7 @@ cmp(Instr *i, char *m)
 	if(i->i == 0)
 		bprint(i, "CMP\tR%d, R%d", i->rs1, i->rs2);
 	else
-		bprint(i, "CMP\tR%d, $%lux", i->rs1, i->simm13);
+		bprint(i, "CMP\tR%d, $%ux", i->rs1, i->simm13);
 }
 
 static char *regtab[4] = {
@@ -837,14 +840,14 @@ wr(Instr *i, char *m)			/* page 82 */
 		if(i->i == 0)
 			bprint(i, "%s\tR%d, R%d", m, i->rs1, i->rs2);
 		else
-			bprint(i, "%s\tR%d, $%lux", m, i->rs1, i->simm13);
+			bprint(i, "%s\tR%d, $%ux", m, i->rs1, i->simm13);
 	}else{
 		if(i->i && i->simm13==0)
 			bprint(i, "MOVW\tR%d", i->rs1);
 		else if(i->i == 0)
 			bprint(i, "wr\tR%d, R%d", i->rs2, i->rs1);
 		else
-			bprint(i, "wr\t$%lux, R%d", i->simm13, i->rs1);
+			bprint(i, "wr\t$%ux, R%d", i->simm13, i->rs1);
 	}
 	bprint(i, ", %s", regtab[i->op3&3]);
 }
@@ -869,14 +872,14 @@ jmpl(Instr *i, char *m)			/* page 82 */
 {
 	if(i->i == 0){
 		if(i->rd == 15)
-			bprint(i, "%X\t(R%d+R%d)", "CALL", i->rs2, i->rs1);
+			bprint(i, "%T\t(R%d+R%d)", "CALL", i->rs2, i->rs1);
 		else
-			bprint(i, "%X\t(R%d+R%d), R%d", m, i->rs2, i->rs1, i->rd);
+			bprint(i, "%T\t(R%d+R%d), R%d", m, i->rs2, i->rs1, i->rd);
 	}else{
 		if(!dascase && i->simm13==8 && i->rs1==15 && i->rd==0)
 			bprint(i, "RETURN");
 		else{
-			bprint(i, "%X\t", m);
+			bprint(i, "%T\t", m);
 			address(i);
 			bprint(i, ", R%d", i->rd);
 		}
@@ -1022,15 +1025,15 @@ fpop(Instr *i, char *m)			/* page 108-116 */
 	}
 	for(j=0; fptab1[j].name; j++)
 		if(fptab1[j].opf == i->opf){
-			bprint(i, "%X\tF%d, F%d", fptab1[j].name, i->rs2, i->rd);
+			bprint(i, "%T\tF%d, F%d", fptab1[j].name, i->rs2, i->rd);
 			return;
 		}
 	for(j=0; fptab2[j].name; j++)
 		if(fptab2[j].opf == i->opf){
-			bprint(i, "%X\tF%d, F%d, F%d", fptab2[j].name, i->rs1, i->rs2, i->rd);
+			bprint(i, "%T\tF%d, F%d, F%d", fptab2[j].name, i->rs1, i->rs2, i->rd);
 			return;
 		}
-	bprint(i, "%X%ux\tF%d, F%d, F%d", m, i->opf, i->rs1, i->rs2, i->rd);
+	bprint(i, "%T%ux\tF%d, F%d, F%d", m, i->opf, i->rs1, i->rs2, i->rd);
 }
 
 static int

+ 2 - 0
sys/src/libmach/vcodas.c

@@ -306,6 +306,8 @@ mkinstr(Instr *i, Map *map, uvlong pc)
 	return 1;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {

+ 2 - 0
sys/src/libmach/vdb.c

@@ -224,6 +224,8 @@ mkinstr(uvlong pc, Instr *i)
 	return 1;
 }
 
+#pragma	varargck	argpos	bprint		2
+
 static void
 bprint(Instr *i, char *fmt, ...)
 {