Browse Source

Plan 9 from Bell Labs 2012-04-08

David du Colombier 12 years ago
parent
commit
2993c5c46e
5 changed files with 37 additions and 6 deletions
  1. 9 0
      sys/lib/dist/defs
  2. 4 5
      sys/lib/dist/mkfile
  3. 3 0
      sys/lib/dist/setup
  4. 15 1
      sys/src/cmd/5c/5.out.h
  5. 6 0
      sys/src/cmd/5c/enam.c

+ 9 - 0
sys/lib/dist/defs

@@ -0,0 +1,9 @@
+#!/bin/rc
+# defs - definitions for the mkfile
+src9=/n/sources/plan9		# what to export
+dist=/sys/lib/dist		# where this machinery lives
+scr=/n/other/dist		# scratch space before copying to web.protect
+
+srccpy=/n/other/srcs.copy
+srcbin=/n/other/srcs.bin
+srcs=/n/sources/plan9

+ 4 - 5
sys/lib/dist/mkfile

@@ -1,9 +1,8 @@
 # /sys/lib/dist/mkfile
-src9=/n/sources/plan9		# what to export
-dist=/sys/lib/dist		# where this machinery lives
-scr=/n/other/dist		# scratch space before copying to web.protect
-# import /sys/lib/dist/web.protect from the outside
-x=`{setup}
+
+<defs
+
+x=`{setup}	# import /sys/lib/dist/web.protect from the outside
 
 cd:V: $scr/plan9.iso
 

+ 3 - 0
sys/lib/dist/setup

@@ -1,8 +1,11 @@
 #!/bin/rc
 # setup - prep for the mkfile
+. ./defs
+
 9fs sources
 9fs other
 9fs outfsother
+
 if (test -e /cfg/$sysname/config)
 	. /cfg/$sysname/config
 if not

+ 15 - 1
sys/src/cmd/5c/5.out.h

@@ -25,6 +25,7 @@
 #define	NFREG		8
 #define	FREGRET		0
 #define	FREGEXT		7
+#define	FREGTMP		15
 /* compiler allocates register variables F0 up */
 /* compiler allocates external registers F7 down */
 
@@ -92,6 +93,8 @@ enum	as
 	AMULD,
 	ADIVF,
 	ADIVD,
+//	ASQRTF,
+//	ASQRTD,
 
 	ASRL,
 	ASRA,
@@ -143,6 +146,16 @@ enum	as
 
 	ASIGNAME,
 
+	/* moved here to preserve values of older identifiers */
+	ASQRTF,
+	ASQRTD,
+
+	ALDREX,
+	ASTREX,
+	
+	ALDREXD,
+	ASTREXD,
+
 	ALAST,
 };
 
@@ -173,7 +186,8 @@ enum	as
 
 #define	D_SHIFT		(D_NONE+19)
 #define	D_FPCR		(D_NONE+20)
-#define 	D_REGREG	(D_NONE+21)
+#define	D_REGREG	(D_NONE+21)
+#define	D_ADDR		(D_NONE+22)
 
 /* name */
 #define	D_EXTERN	(D_NONE+3)

+ 6 - 0
sys/src/cmd/5c/enam.c

@@ -94,5 +94,11 @@ char*	anames[] =
 	"BXRET",
 	"DWORD",
 	"SIGNAME",
+	"SQRTF",
+	"SQRTD",
+	"LDREX",
+	"STREX",
+	"LDREXD",
+	"STREXD",
 	"LAST",
 };