Browse Source

Plan 9 from Bell Labs 2008-05-13

David du Colombier 11 years ago
parent
commit
f5d03985c3

+ 13 - 9
dist/replica/_plan9.db

@@ -267,7 +267,7 @@
 386/bin/games/mp3dec - 775 sys sys 1198183090 388585
 386/bin/games/mp3enc - 775 sys sys 1196220182 530357
 386/bin/games/playlistfs - 775 sys sys 1196742488 148960
-386/bin/games/sokoban - 775 sys sys 1210392732 165699
+386/bin/games/sokoban - 775 sys sys 1210563675 165646
 386/bin/games/sudoku - 775 sys sys 1210392735 171200
 386/bin/getmap - 775 sys sys 1168402311 65423
 386/bin/gif - 775 sys sys 1210476130 158695
@@ -903,12 +903,13 @@ dist - 20000000775 sys sys 1127243723 0
 dist/replica - 20000000775 sys sys 1195853927 0
 dist/replica/cd - 664 sys sys 1196638557 922
 dist/replica/kfs - 664 sys sys 1196638557 237
-dist/replica/network - 775 sys sys 1196638557 1075
+dist/replica/network - 775 sys sys 1210620438 1086
 dist/replica/plan9.proto - 664 sys sys 1196638558 2871
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 lib - 20000000775 sys sys 1161442421 0
 lib/areacodes - 664 sys sys 1208190057 26367
+lib/bunny.bit - 664 sys sys 1210619897 191872
 lib/cmap - 20000000775 sys sys 1039727323 0
 lib/cmap/5.oclock.shado - 664 sys sys 954523185 3872
 lib/cmap/559.56 - 664 sys sys 954523185 3344
@@ -7171,7 +7172,7 @@ sys/lib/tmac/tmac.pictures - 664 sys sys 944956203 4320
 sys/lib/tmac/tmac.psychrefs - 664 sys sys 944956203 608
 sys/lib/tmac/tmac.ptx - 664 sys sys 944956203 330
 sys/lib/tmac/tmac.rscover - 664 sys sys 944956203 2070
-sys/lib/tmac/tmac.s - 664 sys sys 1138396381 23086
+sys/lib/tmac/tmac.s - 664 sys sys 1210619960 23057
 sys/lib/tmac/tmac.scover - 664 sys sys 944956204 4616
 sys/lib/tmac/tmac.sdisp - 664 sys sys 944956204 864
 sys/lib/tmac/tmac.skeep - 664 sys sys 944956204 1346
@@ -7976,7 +7977,7 @@ sys/src/9/bitsy/etherwavelan.c - 664 sys sys 1071245513 870
 sys/src/9/bitsy/fns.h - 664 sys sys 1206317920 3052
 sys/src/9/bitsy/fpi.c - 664 sys sys 1017695513 5248
 sys/src/9/bitsy/fpi.h - 664 sys sys 1017695513 1679
-sys/src/9/bitsy/fpiarm.c - 664 sys sys 1173788243 9402
+sys/src/9/bitsy/fpiarm.c - 664 sys sys 1210622023 11058
 sys/src/9/bitsy/fpimem.c - 664 sys sys 1017695513 2229
 sys/src/9/bitsy/gamma.c - 664 sys sys 1017695513 646
 sys/src/9/bitsy/gamma.h - 664 sys sys 1017695514 540718
@@ -9508,7 +9509,7 @@ sys/src/cmd/acme/rows.c - 664 sys sys 1177527677 14708
 sys/src/cmd/acme/scrl.c - 664 sys sys 1111119426 2875
 sys/src/cmd/acme/text.c - 664 sys sys 1136064450 27870
 sys/src/cmd/acme/time.c - 664 sys sys 1014926095 1783
-sys/src/cmd/acme/util.c - 664 sys sys 1187899854 7994
+sys/src/cmd/acme/util.c - 664 sys sys 1210619998 8080
 sys/src/cmd/acme/wind.c - 664 sys sys 1122526112 11233
 sys/src/cmd/acme/xfid.c - 664 sys sys 1125314186 19766
 sys/src/cmd/aquarela - 20000000775 sys sys 1135892145 0
@@ -14256,7 +14257,7 @@ sys/src/cmd/upas/send/makefile - 664 sys sys 944961322 1247
 sys/src/cmd/upas/send/message.c - 664 sys sys 1143670612 11077
 sys/src/cmd/upas/send/mkfile - 664 sys sys 1064589602 706
 sys/src/cmd/upas/send/regtest.c - 664 sys sys 944961322 566
-sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1132331205 6386
+sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1210614801 6391
 sys/src/cmd/upas/send/send.h - 664 sys sys 1069366924 3265
 sys/src/cmd/upas/send/skipequiv.c - 664 sys sys 944961322 1747
 sys/src/cmd/upas/send/translate.c - 664 sys sys 944961322 804
@@ -14708,7 +14709,6 @@ sys/src/games/music/jukefs/print.h - 664 sys sys 1103793921 174
 sys/src/games/music/jukefs/search.c - 664 sys sys 1103793921 1058
 sys/src/games/music/jukefs/search.h - 664 sys sys 1103793921 101
 sys/src/games/music/jukefs/server.c - 664 sys sys 1113342063 3648
-sys/src/games/music/missing - 775 sys sys 1103793915 72
 sys/src/games/music/mkfile - 664 sys sys 1196736121 753
 sys/src/games/music/mkinc - 664 sys sys 1103793915 92
 sys/src/games/music/playlistfs - 20000000775 sys sys 1103794221 0
@@ -14717,7 +14717,7 @@ sys/src/games/music/playlistfs/fs.c - 664 sys sys 1111504109 17985
 sys/src/games/music/playlistfs/main.c - 664 sys sys 1103793922 1636
 sys/src/games/music/playlistfs/mk.dep - 664 sys sys 1103793923 594
 sys/src/games/music/playlistfs/mkfile - 664 sys sys 1103793923 187
-sys/src/games/music/playlistfs/player.c - 664 sys sys 1103793923 10228
+sys/src/games/music/playlistfs/player.c - 664 sys sys 1210620042 10541
 sys/src/games/music/playlistfs/playlist.h - 664 sys sys 1107436453 2579
 sys/src/games/music/playlistfs/playplumb.c - 664 sys sys 1103793924 280
 sys/src/games/music/playlistfs/volume.c - 664 sys sys 1103793924 2065
@@ -15018,6 +15018,7 @@ sys/src/libc/alpha/setjmp.s - 664 sys sys 944961723 271
 sys/src/libc/alpha/tas.s - 664 sys sys 944961723 196
 sys/src/libc/arm - 20000000775 sys sys 1132449120 0
 sys/src/libc/arm/argv0.s - 664 sys sys 1067719006 88
+sys/src/libc/arm/cas.s - 664 sys sys 1210620494 509
 sys/src/libc/arm/cycles.c - 664 sys sys 1067719006 71
 sys/src/libc/arm/div.s - 664 sys sys 944961713 1639
 sys/src/libc/arm/doprint.xc - 664 sys sys 944961713 8554
@@ -15027,7 +15028,7 @@ sys/src/libc/arm/main9.s - 664 sys sys 1067719007 489
 sys/src/libc/arm/main9p.s - 664 sys sys 1183607546 742
 sys/src/libc/arm/memmove.s - 664 sys sys 1183607546 4198
 sys/src/libc/arm/memset.s - 664 sys sys 1183607547 1002
-sys/src/libc/arm/mkfile - 664 sys sys 1183607636 401
+sys/src/libc/arm/mkfile - 664 sys sys 1210620494 409
 sys/src/libc/arm/notejmp.c - 664 sys sys 984709513 223
 sys/src/libc/arm/setjmp.s - 664 sys sys 984709513 367
 sys/src/libc/arm/strchr.s - 664 sys sys 984709513 841
@@ -15892,3 +15893,6 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/acme - 775 sys sys 1210648931 431948
+386/bin/games/playlistfs - 775 sys sys 1210648934 149337
+386/bin/upas/send - 775 sys sys 1210648938 192191

+ 29 - 24
dist/replica/network

@@ -1,5 +1,10 @@
 #!/bin/rc
 
+if(~ $fscons '')
+	fscons=fscons
+if(~ $replica '')
+	replica=replica
+
 s=/n/dist/dist/replica
 serverroot=/n/dist
 serverlog=$s/plan9.log
@@ -10,33 +15,33 @@ fn servermount {
 }
 fn serverupdate { status='' }
 
-fn clientmount {
-	unmount /n/boot >[2]/dev/null
-	if(test -e /srv/fscons){
-		if(! test -e /srv/replica){
-			echo 'srv -AWP replica' >>/srv/fscons >[2]/dev/null ||
-				echo 'warning: could not write to /srv/fscons' >[1=2]
-		}
-		if(! mount -c /srv/replica /n/boot)
-			echo 'warning: cannot mount /srv/replica' >[1=2]
-		status=''
-	}
-	if not if(test -e /srv/kfs){
-		mount -c /srv/kfs /n/boot
-		status=''
-	}
-	if(! test -d /n/boot/dist/replica){
-		echo 'warning: could not mount /srv/replica or /srv/kfs; using /srv/boot' >[1=2]
-		mount -c /srv/boot /n/boot
+if ( ! test -e /srv/boot && ! test -e /srv/kfs ) {
+	echo 'error: neither /srv/boot nor /srv/kfs present; make sure you are running on the file server'
+	exit '/srv/boot or /srv/kfs not present'
+}
+
+if (test -e /srv/$fscons) {
+	if ( ! test -w /srv/$fscons ) { 
+		echo 'error: no write access to /srv/'^$fscons^', make sure you are the host owner' 
+		exit 'no write access to /srv/fscons'
 	}
-	if(! test -d /n/boot/dist/replica){
-		echo 'could not mount client root' >[1=2]
-		exit 'no /dist/replica'
+
+	fn clientmount {
+		if(! test -e /srv/$replica){
+			echo 'srv -AWP '^$replica >>/srv/$fscons
+			sleep 5
+		}
+		mount -c /srv/$replica /n/boot
 	}
-	status=''
+	c=/n/boot/dist/replica
+	clientroot=/n/boot
+} 
+if not {
+	fn clientmount { 9fs kfs }
+	c=/n/kfs/dist/replica
+	clientroot=/n/kfs
 }
-c=/n/boot/dist/replica
-clientroot=/n/boot
+
 clientdb=$c/client/plan9.db
 clientexclude=(dist/replica/client)
 clientlog=$c/client/plan9.log

+ 13 - 12
dist/replica/plan9.db

@@ -19,7 +19,7 @@
 386/bin/9660srv - 775 sys sys 1208633111 105295
 386/bin/aan - 775 sys sys 1210392422 129981
 386/bin/acid - 775 sys sys 1209614047 405326
-386/bin/acme - 775 sys sys 1210392433 431948
+386/bin/acme - 775 sys sys 1210648931 431948
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1173754547 134719
 386/bin/ape/cc - 775 sys sys 1168402263 70642
@@ -266,8 +266,8 @@
 386/bin/games/memo - 775 sys sys 1210392726 156830
 386/bin/games/mp3dec - 775 sys sys 1198183090 388585
 386/bin/games/mp3enc - 775 sys sys 1196220182 530357
-386/bin/games/playlistfs - 775 sys sys 1196742488 148960
-386/bin/games/sokoban - 775 sys sys 1210392732 165699
+386/bin/games/playlistfs - 775 sys sys 1210648934 149337
+386/bin/games/sokoban - 775 sys sys 1210563675 165646
 386/bin/games/sudoku - 775 sys sys 1210392735 171200
 386/bin/getmap - 775 sys sys 1168402311 65423
 386/bin/gif - 775 sys sys 1210476130 158695
@@ -478,7 +478,7 @@
 386/bin/upas/ratfs - 775 sys sys 1209614758 111371
 386/bin/upas/runq - 775 sys sys 1209614760 112853
 386/bin/upas/scanmail - 775 sys sys 1209614764 128224
-386/bin/upas/send - 775 sys sys 1209614769 192191
+386/bin/upas/send - 775 sys sys 1210648938 192191
 386/bin/upas/smtp - 775 sys sys 1210393023 277548
 386/bin/upas/smtpd - 775 sys sys 1210393030 336053
 386/bin/upas/spam - 775 sys sys 1064598366 36
@@ -903,12 +903,13 @@ dist - 20000000775 sys sys 1127243723 0
 dist/replica - 20000000775 sys sys 1195853927 0
 dist/replica/cd - 664 sys sys 1196638557 922
 dist/replica/kfs - 664 sys sys 1196638557 237
-dist/replica/network - 775 sys sys 1196638557 1075
+dist/replica/network - 775 sys sys 1210620438 1086
 dist/replica/plan9.proto - 664 sys sys 1196638558 2871
 env - 20000000775 sys sys 1104813586 0
 fd - 20000000775 sys sys 1020896384 0
 lib - 20000000775 sys sys 1161442421 0
 lib/areacodes - 664 sys sys 1208190057 26367
+lib/bunny.bit - 664 sys sys 1210619897 191872
 lib/cmap - 20000000775 sys sys 1039727323 0
 lib/cmap/5.oclock.shado - 664 sys sys 954523185 3872
 lib/cmap/559.56 - 664 sys sys 954523185 3344
@@ -7171,7 +7172,7 @@ sys/lib/tmac/tmac.pictures - 664 sys sys 944956203 4320
 sys/lib/tmac/tmac.psychrefs - 664 sys sys 944956203 608
 sys/lib/tmac/tmac.ptx - 664 sys sys 944956203 330
 sys/lib/tmac/tmac.rscover - 664 sys sys 944956203 2070
-sys/lib/tmac/tmac.s - 664 sys sys 1138396381 23086
+sys/lib/tmac/tmac.s - 664 sys sys 1210619960 23057
 sys/lib/tmac/tmac.scover - 664 sys sys 944956204 4616
 sys/lib/tmac/tmac.sdisp - 664 sys sys 944956204 864
 sys/lib/tmac/tmac.skeep - 664 sys sys 944956204 1346
@@ -7976,7 +7977,7 @@ sys/src/9/bitsy/etherwavelan.c - 664 sys sys 1071245513 870
 sys/src/9/bitsy/fns.h - 664 sys sys 1206317920 3052
 sys/src/9/bitsy/fpi.c - 664 sys sys 1017695513 5248
 sys/src/9/bitsy/fpi.h - 664 sys sys 1017695513 1679
-sys/src/9/bitsy/fpiarm.c - 664 sys sys 1173788243 9402
+sys/src/9/bitsy/fpiarm.c - 664 sys sys 1210622023 11058
 sys/src/9/bitsy/fpimem.c - 664 sys sys 1017695513 2229
 sys/src/9/bitsy/gamma.c - 664 sys sys 1017695513 646
 sys/src/9/bitsy/gamma.h - 664 sys sys 1017695514 540718
@@ -9508,7 +9509,7 @@ sys/src/cmd/acme/rows.c - 664 sys sys 1177527677 14708
 sys/src/cmd/acme/scrl.c - 664 sys sys 1111119426 2875
 sys/src/cmd/acme/text.c - 664 sys sys 1136064450 27870
 sys/src/cmd/acme/time.c - 664 sys sys 1014926095 1783
-sys/src/cmd/acme/util.c - 664 sys sys 1187899854 7994
+sys/src/cmd/acme/util.c - 664 sys sys 1210619998 8080
 sys/src/cmd/acme/wind.c - 664 sys sys 1122526112 11233
 sys/src/cmd/acme/xfid.c - 664 sys sys 1125314186 19766
 sys/src/cmd/aquarela - 20000000775 sys sys 1135892145 0
@@ -14256,7 +14257,7 @@ sys/src/cmd/upas/send/makefile - 664 sys sys 944961322 1247
 sys/src/cmd/upas/send/message.c - 664 sys sys 1143670612 11077
 sys/src/cmd/upas/send/mkfile - 664 sys sys 1064589602 706
 sys/src/cmd/upas/send/regtest.c - 664 sys sys 944961322 566
-sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1132331205 6386
+sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1210614801 6391
 sys/src/cmd/upas/send/send.h - 664 sys sys 1069366924 3265
 sys/src/cmd/upas/send/skipequiv.c - 664 sys sys 944961322 1747
 sys/src/cmd/upas/send/translate.c - 664 sys sys 944961322 804
@@ -14708,7 +14709,6 @@ sys/src/games/music/jukefs/print.h - 664 sys sys 1103793921 174
 sys/src/games/music/jukefs/search.c - 664 sys sys 1103793921 1058
 sys/src/games/music/jukefs/search.h - 664 sys sys 1103793921 101
 sys/src/games/music/jukefs/server.c - 664 sys sys 1113342063 3648
-sys/src/games/music/missing - 775 sys sys 1103793915 72
 sys/src/games/music/mkfile - 664 sys sys 1196736121 753
 sys/src/games/music/mkinc - 664 sys sys 1103793915 92
 sys/src/games/music/playlistfs - 20000000775 sys sys 1103794221 0
@@ -14717,7 +14717,7 @@ sys/src/games/music/playlistfs/fs.c - 664 sys sys 1111504109 17985
 sys/src/games/music/playlistfs/main.c - 664 sys sys 1103793922 1636
 sys/src/games/music/playlistfs/mk.dep - 664 sys sys 1103793923 594
 sys/src/games/music/playlistfs/mkfile - 664 sys sys 1103793923 187
-sys/src/games/music/playlistfs/player.c - 664 sys sys 1103793923 10228
+sys/src/games/music/playlistfs/player.c - 664 sys sys 1210620042 10541
 sys/src/games/music/playlistfs/playlist.h - 664 sys sys 1107436453 2579
 sys/src/games/music/playlistfs/playplumb.c - 664 sys sys 1103793924 280
 sys/src/games/music/playlistfs/volume.c - 664 sys sys 1103793924 2065
@@ -15018,6 +15018,7 @@ sys/src/libc/alpha/setjmp.s - 664 sys sys 944961723 271
 sys/src/libc/alpha/tas.s - 664 sys sys 944961723 196
 sys/src/libc/arm - 20000000775 sys sys 1132449120 0
 sys/src/libc/arm/argv0.s - 664 sys sys 1067719006 88
+sys/src/libc/arm/cas.s - 664 sys sys 1210620494 509
 sys/src/libc/arm/cycles.c - 664 sys sys 1067719006 71
 sys/src/libc/arm/div.s - 664 sys sys 944961713 1639
 sys/src/libc/arm/doprint.xc - 664 sys sys 944961713 8554
@@ -15027,7 +15028,7 @@ sys/src/libc/arm/main9.s - 664 sys sys 1067719007 489
 sys/src/libc/arm/main9p.s - 664 sys sys 1183607546 742
 sys/src/libc/arm/memmove.s - 664 sys sys 1183607546 4198
 sys/src/libc/arm/memset.s - 664 sys sys 1183607547 1002
-sys/src/libc/arm/mkfile - 664 sys sys 1183607636 401
+sys/src/libc/arm/mkfile - 664 sys sys 1210620494 409
 sys/src/libc/arm/notejmp.c - 664 sys sys 984709513 223
 sys/src/libc/arm/setjmp.s - 664 sys sys 984709513 367
 sys/src/libc/arm/strchr.s - 664 sys sys 984709513 841

+ 14 - 0
dist/replica/plan9.log

@@ -19639,3 +19639,17 @@
 1210476604 6 c 386/bin/troff - 775 sys sys 1210476137 361158
 1210539605 0 c sys/src/games/sokoban/route.c - 664 sys sys 1210538927 4389
 1210539605 1 c sys/src/games/sokoban/sokoban.c - 664 sys sys 1210538907 6225
+1210564805 0 c 386/bin/games/sokoban - 775 sys sys 1210563675 165646
+1210615205 0 c sys/src/cmd/upas/send/rewrite.c - 664 sys sys 1210614801 6391
+1210620603 0 a lib/bunny.bit - 664 sys sys 1210619897 191872
+1210620603 1 c sys/lib/tmac/tmac.s - 664 sys sys 1210619960 23057
+1210620603 2 c sys/src/cmd/acme/util.c - 664 sys sys 1210619998 8080
+1210620603 3 c sys/src/games/music/playlistfs/player.c - 664 sys sys 1210620042 10541
+1210620603 4 a sys/src/libc/arm/cas.s - 664 sys sys 1210620494 509
+1210620603 5 c sys/src/libc/arm/mkfile - 664 sys sys 1210620494 409
+1210620603 6 c dist/replica/network - 775 sys sys 1210620438 1086
+1210620603 7 d sys/src/games/music/missing - 775 sys sys 1103793915 0
+1210622405 0 c sys/src/9/bitsy/fpiarm.c - 664 sys sys 1210622023 11058
+1210649404 0 c 386/bin/acme - 775 sys sys 1210648931 431948
+1210649404 1 c 386/bin/games/playlistfs - 775 sys sys 1210648934 149337
+1210649404 2 c 386/bin/upas/send - 775 sys sys 1210648938 192191

BIN
lib/bunny.bit


+ 9 - 9
sys/lib/tmac/tmac.s

@@ -830,12 +830,12 @@ Computing Science Technical Report No. \\*(MN
 .nr DV .5v	\" space before start of program
 .
 .de P1
-.nr P1 .4i	\" program indent in .P1
-.if \\n(.$ .nr P1 \\$1
+.RS
 .br
 .nr v \\n(.v
 .di p1
-.in \\n(P1u
+.if \\n(.$ .IP "" \\$1
+.ie .IP "" 2m
 .nf
 .ps -\\n(XP
 .vs -\\n(XVu
@@ -850,7 +850,6 @@ Computing Science Technical Report No. \\*(MN
 .vs \\n(VSp
 .vs \\nvu
 .ft 1
-.in -\\n(P1u
 .di
 .br
 .sp \\n(DVu
@@ -858,9 +857,9 @@ Computing Science Technical Report No. \\*(MN
 .if \\n(.$=0 .ne \\n(dnu  \" -\\n(DVu
 .nf
 .p1
+.RE
 .sp \\n(DVu
-.br
-.fi
+.RT
 ..
 .
 .de ME
@@ -1255,7 +1254,7 @@ ABSTRACT
 .ie \\n(ID>0 .sp \\n(IDu
 .el .sp \\n(PDu
 .nr IU \\n(IR+1
-.if \\n(.$>1 .nr I\\n(IU \\$2n+\\n(I\\n(IRu
+.if \\n(.$>1 .nr I\\n(IU \\n(I\\n(IRu+\\$2n
 .if \\n(I\\n(IU=0 .nr I\\n(IU \\n(PIu+\\n(I\\n(IRu
 .in \\n(I\\n(IUu
 .nr TY \\n(TZ-\\n(.i
@@ -1291,8 +1290,8 @@ ABSTRACT
 .nr IS \\n(IP
 .RT
 .nr IP \\n(IS
-.nr IU \\n(IR
-.nr IR +1
+.nr IR \\n(IU
+.nr IU +1
 .if !\\n(I\\n(IR .nr I\\n(IR \\n(I\\n(IU+\\n(PIu
 .in \\n(I\\n(IRu
 .nr TY \\n(TZ-\\n(.i
@@ -1303,6 +1302,7 @@ ABSTRACT
 .nr IS \\n(IP
 .RT
 .nr IP \\n(IS
+.nr IU \\n(IR
 .if \\n(IR>0 .nr IR -1
 .in \\n(I\\n(IRu
 ..

+ 91 - 4
sys/src/9/bitsy/fpiarm.c

@@ -442,6 +442,85 @@ fpemu(ulong pc, ulong op, Ureg *ur, FPsave *ufp)
 	}
 }
 
+void
+casemu(ulong pc, ulong op, Ureg *ur)
+{
+	ulong *rp, ro, rn, *rd;
+
+	USED(pc);
+
+	rp = (ulong*)ur;
+	ro = rp[op>>16 & 0x7];
+	rn = rp[op>>0 & 0x7];
+	rd = rp + (op>>12 & 0x7);
+	rp = (ulong*)*rd;
+	validaddr((ulong)rp, 4, 1);
+	splhi();
+	if(*rd = (*rp == ro))
+		*rp = rn;
+	spllo();
+}
+
+int ldrexvalid;
+
+void
+ldrex(ulong pc, ulong op, Ureg *ur)
+{
+	ulong *rp, *rd, *addr;
+
+	USED(pc);
+
+	rp = (ulong*)ur;
+	rd = rp + (op>>16 & 0x7);
+	addr = (ulong*)*rd;
+	validaddr((ulong)addr, 4, 0);
+	ldrexvalid = 1;
+	rp[op>>12 & 0x7] = *addr;
+	if(fpemudebug)
+		print("ldrex, r%ld = [r%ld]@0x%8.8p = 0x%8.8lux",
+			op>>12 & 0x7, op>>16 & 0x7, addr, rp[op>>12 & 0x7]);
+}
+
+void
+strex(ulong pc, ulong op, Ureg *ur)
+{
+	ulong *rp, rn, *rd, *addr;
+
+	USED(pc);
+
+	rp = (ulong*)ur;
+	rd = rp + (op>>16 & 0x7);
+	rn = rp[op>>0 & 0x7];
+	addr = (ulong*)*rd;
+	validaddr((ulong)addr, 4, 1);
+	splhi();
+	if(ldrexvalid){
+		if(fpemudebug)
+			print("strex valid, [r%ld]@0x%8.8p = r%ld = 0x%8.8lux",
+				op>>16 & 0x7, addr, op>>0 & 0x7, rn);
+		*addr = rn;
+		ldrexvalid = 0;
+		rp[op>>12 & 0x7] = 0;
+	}else{
+		if(fpemudebug)
+			print("strex invalid, r%ld = 1", op>>16 & 0x7);
+		rp[op>>12 & 0x7] = 1;
+	}
+	spllo();
+}
+
+struct {
+	ulong	opc;
+	ulong	mask;
+	void	(*f)(ulong, ulong, Ureg*);
+} specialopc[] = {
+	{ 0x01900f9f, 0x0ff00fff, ldrex },
+	{ 0x01800f90, 0x0ff00ff0, strex },
+	{ 0x0ed00100, 0x0ef08100, casemu },
+	{ 0x00000000, 0x00000000, nil }
+};
+
+
 /*
  * returns the number of FP instructions emulated
  */
@@ -450,7 +529,7 @@ fpiarm(Ureg *ur)
 {
 	ulong op, o;
 	FPsave *ufp;
-	int n;
+	int i, n;
 
 	if (up == nil)
 		panic("fpiarm not in a process");
@@ -472,10 +551,18 @@ fpiarm(Ureg *ur)
 		validaddr(ur->pc, 4, 0);
 		op = *(ulong*)(ur->pc);
 		o = (op>>24) & 0xF;
-		if(((op>>8) & 0xF) != 1 || o != 0xE && (o&~1) != 0xC)
+		if(condok(ur->psr, op>>28)){
+			for(i = 0; specialopc[i].f; i++)
+				if((op & specialopc[i].mask) == specialopc[i].opc)
+					break;
+			if(specialopc[i].f)
+				specialopc[i].f(ur->pc, op, ur);
+			else if((op & 0xF00) != 0x100 || o != 0xE && (o&~1) != 0xC)
+				break;
+			else
+				fpemu(ur->pc, op, ur, ufp);
+		}else if((op & 0xF00) != 0x100 || o != 0xE && (o&~1) != 0xC)
 			break;
-		if(condok(ur->psr, op>>28))
-			fpemu(ur->pc, op, ur, ufp);
 		ur->pc += 4;
 	}
 	if(fpemudebug) print("\n");

+ 4 - 1
sys/src/cmd/acme/util.c

@@ -307,10 +307,13 @@ isalnum(Rune c)
 	 * Hard to get absolutely right.  Use what we know about ASCII
 	 * and assume anything above the Latin control characters is
 	 * potentially an alphanumeric.
+	 *
+	 * Treat 0xA0 (non-breaking space) as a special alphanumeric
+	 * character [sape]
 	 */
 	if(c <= ' ')
 		return FALSE;
-	if(0x7F<=c && c<=0xA0)
+	if(0x7F<=c && c<0xA0)
 		return FALSE;
 	if(utfrune("!\"#$%&'()*+,-./:;<=>?@[\\]^`{|}~", c))
 		return FALSE;

+ 2 - 1
sys/src/cmd/upas/send/rewrite.c

@@ -168,7 +168,8 @@ findrule(String *addrp, int authorized)
 			continue;
 		memset(rp->subexp, 0, sizeof(rp->subexp));
 		if(debug)
-			print("matching %s aginst %s\n", s_to_c(addrp), rp->matchre->base);
+			print("matching %s against %s\n", s_to_c(addrp),
+				rp->matchre->base);
 		if(regexec(rp->program, s_to_c(addrp), rp->subexp, NSUBEXP))
 		if(s_to_c(addrp) == rp->subexp[0].sp)
 		if((s_to_c(addrp) + strlen(s_to_c(addrp))) == rp->subexp[0].ep)

+ 0 - 3
sys/src/games/music/missing

@@ -1,3 +0,0 @@
-#!/bin/rc
-
-for(i in `{games/jukefs -l | sort -u}) test -e $i || echo $i

+ 19 - 3
sys/src/games/music/playlistfs/player.c

@@ -281,9 +281,7 @@ pcmproc(void*)
 	 */
 	threadsetname("pcmproc");
 	close(srvfd[1]);
-	fd = open("/dev/audio", OWRITE);
-	if (fd < 0)
-		sysfatal("/dev/audio: %r");
+	fd = -1;
 	localstate.cmd = 0;	/* Force initial playupdate */
 	newstate.cmd = Stop;
 	newstate.off = 0;
@@ -312,6 +310,10 @@ pcmproc(void*)
 			case Pause:
 				a[1].op = CHANNOP;
 				newstate.cmd = Pause;
+				if(fd >= 0){
+					close(fd);
+					fd = -1;
+				}
 				break;
 			case Stop:
 				/* Dump all data in the buffer */
@@ -323,6 +325,10 @@ pcmproc(void*)
 						sendp(empty, b);
 				newstate.m = pb->m;
 				a[1].op = CHANRCV;
+				if(fd >= 0){
+					close(fd);
+					fd = -1;
+				}
 				break;
 			case Skip:
 				/* Dump all data in the buffer, then fall through */
@@ -363,6 +369,16 @@ pcmproc(void*)
 				sendp(spare, pb);
 				break;
 			case Play:
+				if(fd < 0 && (fd = open("/dev/audio", OWRITE)) < 0){
+					a[1].op = CHANNOP;
+					newstate.cmd = Pause;
+					pb->cmd = Error;
+					snprint(pb->data, sizeof(pb->data),
+						"/dev/audio: %r");
+					playupdate(pb->Pmsg, pb->data);
+					sendp(empty, pb);
+					break;
+				}
 				/* play out this buffer */
 				totbytes += pb->len;
 				totbuffers++;

+ 28 - 0
sys/src/libc/arm/cas.s

@@ -0,0 +1,28 @@
+
+/*
+ * int swp(int r, int *p);
+ * uchar swpb(uchar r, uchar *p);
+ *
+ * int cas(uintptr *p, uintptr ov, uintptr nv);
+ */
+
+#define	LDREX(a,r)	WORD	$(0xe<<28|0x01900f9f | (a)<<16 | (r)<<12)
+#define	STREX(a,v,r)	WORD	$(0xe<<28|0x01800f90 | (a)<<16 | (r)<<12 | (v)<<0)
+
+TEXT	cas+0(SB),0,$12		/* r0 holds p */
+	MOVW	ov+4(FP), R1
+	MOVW	nv+8(FP), R2
+spin:
+/*	LDREX	0(R0),R3	*/
+	LDREX(0,3)
+	CMP.S	R3, R1
+	BNE	fail
+/*	STREX	0(R0),R2,R4	*/
+	STREX(0,2,4)
+	CMP.S	$0, R4
+	BNE	spin
+	MOVW	$1, R0
+	RET
+fail:
+	MOVW	$0, R0
+	RET

+ 1 - 0
sys/src/libc/arm/mkfile

@@ -4,6 +4,7 @@ objtype=arm
 LIB=/$objtype/lib/libc.a
 SFILES=\
 	argv0.s\
+	cas.s\
 	div.s\
 	getcallerpc.s\
 	getfcr.s\