Added sparc_solaris stuff
authorceriel <none@none>
Wed, 6 Oct 1993 16:42:05 +0000 (16:42 +0000)
committerceriel <none@none>
Wed, 6 Oct 1993 16:42:05 +0000 (16:42 +0000)
18 files changed:
mach/sparc_solaris/.distr [new file with mode: 0644]
mach/sparc_solaris/Action [new file with mode: 0644]
mach/sparc_solaris/ce/.distr [new file with mode: 0644]
mach/sparc_solaris/ce/proto.make [new file with mode: 0644]
mach/sparc_solaris/ce_cg/.distr [new file with mode: 0644]
mach/sparc_solaris/ce_cg/proto.make [new file with mode: 0644]
mach/sparc_solaris/libdb/.distr [new file with mode: 0644]
mach/sparc_solaris/libdb/machdep.s [new file with mode: 0644]
mach/sparc_solaris/libem/.distr [new file with mode: 0644]
mach/sparc_solaris/libem/Makefile [new file with mode: 0644]
mach/sparc_solaris/libem/READ_ME [new file with mode: 0644]
mach/sparc_solaris/libend/.distr [new file with mode: 0644]
mach/sparc_solaris/libend/LIST [new file with mode: 0644]
mach/sparc_solaris/libend/edata.s [new file with mode: 0644]
mach/sparc_solaris/libend/em_end.s [new file with mode: 0644]
mach/sparc_solaris/libend/end.s [new file with mode: 0644]
mach/sparc_solaris/libend/etext.s [new file with mode: 0644]
mach/sparc_solaris/mach_params [new file with mode: 0644]

diff --git a/mach/sparc_solaris/.distr b/mach/sparc_solaris/.distr
new file mode 100644 (file)
index 0000000..99e11b9
--- /dev/null
@@ -0,0 +1,8 @@
+Action
+ce
+ce_cg
+libdb
+libem
+libend
+libsys
+mach_params
diff --git a/mach/sparc_solaris/Action b/mach/sparc_solaris/Action
new file mode 100644 (file)
index 0000000..f1d5343
--- /dev/null
@@ -0,0 +1,24 @@
+name "Sparc Solaris code expander library"
+system "sparc_solaris"
+dir ce
+end
+name "Sparc Solaris code expander"
+system "sparc_solaris"
+dir ce_cg
+end
+name "Sparc Solaris EM library"
+system "sparc_solaris"
+dir libem
+end
+name "Sparc Solaris end library"
+system "sparc_solaris"
+dir libend
+end
+name "Sparc Solaris system call library"
+system "sparc_solaris"
+dir libsys
+end
+name "Sparc Solaris debugger support library"
+system "sparc_solaris"
+dir libdb
+end
diff --git a/mach/sparc_solaris/ce/.distr b/mach/sparc_solaris/ce/.distr
new file mode 100644 (file)
index 0000000..cafc230
--- /dev/null
@@ -0,0 +1 @@
+proto.make
diff --git a/mach/sparc_solaris/ce/proto.make b/mach/sparc_solaris/ce/proto.make
new file mode 100644 (file)
index 0000000..aeb71f5
--- /dev/null
@@ -0,0 +1,37 @@
+# $Header$
+
+#PARAMS                do not remove this line!
+
+MACH = sparc_solaris
+OBJ = as
+SRC_DIR = $(SRC_HOME)/mach/sparc/ce
+
+CEG = $(TARGET_HOME)/lib.bin/ceg/util
+
+all:
+       ( cd $(SRC_DIR); make )
+       make -f $(CEG)/make_asobj "OBJ="$(OBJ) "MACH="$(MACH) "SRC_DIR="$(SRC_DIR)
+
+install:
+       ( cd $(SRC_DIR); make )
+       -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
+       make -f $(CEG)/make_asobj "OBJ="$(OBJ) "MACH="$(MACH) "SRC_DIR="$(SRC_DIR) install
+
+cmp:
+       ( cd $(SRC_DIR); make )
+       make -f $(CEG)/make_asobj "OBJ="$(OBJ) "MACH="$(MACH) "SRC_DIR="$(SRC_DIR) cmp
+
+pr:
+       @pr $(SRC_DIR)/proto.make $(SRC_DIR)/EM_table.x $(SRC_DIR)/mach.h \
+           $(SRC_DIR)/mach.c $(SRC_DIR)/cache.c.x
+
+opr:
+       make pr | opr
+
+# total cleanup
+clean:
+       make -f $(CEG)/make_asobj "OBJ="$(OBJ) clean
+
+# only remove ce, ceg, and back directories
+dclean:
+       make -f $(CEG)/make_asobj "OBJ="$(OBJ) dclean
diff --git a/mach/sparc_solaris/ce_cg/.distr b/mach/sparc_solaris/ce_cg/.distr
new file mode 100644 (file)
index 0000000..cafc230
--- /dev/null
@@ -0,0 +1 @@
+proto.make
diff --git a/mach/sparc_solaris/ce_cg/proto.make b/mach/sparc_solaris/ce_cg/proto.make
new file mode 100644 (file)
index 0000000..d51a077
--- /dev/null
@@ -0,0 +1,42 @@
+# $Header$
+
+#PARAMS                do not remove this line!
+
+SRC_DIR=$(SRC_HOME)/mach/sparc/ce_cg
+MACH=sparc_solaris
+LIB_DIR=$(TARGET_HOME)/modules/lib
+EM_LIB=$(TARGET_HOME)/lib.bin
+INCLUDE=-I$(TARGET_HOME)/modules/h -I$(TARGET_HOME)/h
+CE_A= $(TARGET_HOME)/lib.bin/$(MACH)/ce.$(LIBSUF)
+BACK_A= $(TARGET_HOME)/lib.bin/$(MACH)/back.$(LIBSUF)
+
+CFLAGS=$(INCLUDE) -DCODE_EXPANDER $(COPTIONS)
+LDFLAGS=$(LDOPTIONS)
+LDLIBS=$(LIB_DIR)/libread_emk.$(LIBSUF) $(CE_A) $(BACK_A) \
+       $(LIB_DIR)/libprint.$(LIBSUF) $(LIB_DIR)/libstring.$(LIBSUF) \
+       $(LIB_DIR)/liballoc.$(LIBSUF) $(LIB_DIR)/libsystem.$(LIBSUF) \
+       $(EM_LIB)/em_data.$(LIBSUF) $(LIB_DIR)/libflt.$(LIBSUF)
+
+all:   cg
+
+install:       all
+       -mkdir $(TARGET_HOME)/lib.bin/$(MACH)
+       cp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
+
+cmp:   all
+       cmp cp cg $(TARGET_HOME)/lib.bin/$(MACH)/cg
+
+clean:
+       rm -f *.$(SUF) cg
+
+cg:    convert.$(SUF) $(CE_A) $(BACK_A)
+       $(CC) $(LDFLAGS) -o cg convert.$(SUF) $(LDLIBS) 
+
+convert.$(SUF):        $(SRC_DIR)/convert.c
+       $(CC) $(CFLAGS) -c $(SRC_DIR)/convert.c
+
+pr:
+       @pr $(SRC_DIR)/proto.make $(SRC_DIR)/convert.c
+
+opr:
+       make pr | opr
diff --git a/mach/sparc_solaris/libdb/.distr b/mach/sparc_solaris/libdb/.distr
new file mode 100644 (file)
index 0000000..af5eda4
--- /dev/null
@@ -0,0 +1 @@
+machdep.s
diff --git a/mach/sparc_solaris/libdb/machdep.s b/mach/sparc_solaris/libdb/machdep.s
new file mode 100644 (file)
index 0000000..a1241f6
--- /dev/null
@@ -0,0 +1,64 @@
+.globl $__Get_PC, $__Set_PC
+
+! $Header$
+
+! This is the machine-dependant part of the ACK debugger support.
+! $__Get_PC takes a frame pointer (local base) argument and returns the
+!          return address from this frame.
+! $__Set_PC takes a frame pointer (local base) argument plus a return
+!          address and sets the return address of this frame to the
+!          return address supplied.
+
+$__Get_PC:
+       ld      [%l0],%o0
+       tst     %o0
+       beq     3f
+       nop
+       cmp     %o0,%l1
+       bne     1f
+       nop
+       add     %i7, 8, %o0
+3:
+       retl
+       nop
+1:
+       ta      3
+       add     %l1,%g0,%o1
+2:     add     %o1,7,%o2
+       andn    %o2,7,%o2
+       ld      [%o2+4],%o1
+       cmp     %o0,%o1
+       bne     2b
+       nop
+       ld      [%o2+0x3c],%o0
+       inc     8,%o0
+       retl
+       nop
+
+$__Set_PC:
+       ld      [%l0],%o0
+       tst     %o0
+       beq     3f
+       nop
+       cmp     %o0,%l1
+       bne     1f
+       nop
+       ld      [%l0+4],%i7
+       dec     8,%i7
+3:
+       retl
+       nop
+1:
+       ta      3
+       add     %l1,%g0,%o1
+2:     add     %o1,7,%o2
+       andn    %o2,7,%o2
+       ld      [%o2+4],%o1
+       cmp     %o0,%o1
+       bne     2b
+       nop
+       ld      [%l0+4],%o0
+       dec     8,%o0
+       st      %o0,[%o2+0x3c]
+       retl
+       nop
diff --git a/mach/sparc_solaris/libem/.distr b/mach/sparc_solaris/libem/.distr
new file mode 100644 (file)
index 0000000..52c8084
--- /dev/null
@@ -0,0 +1,4 @@
+LIST
+libem_s.a
+READ_ME
+Makefile
diff --git a/mach/sparc_solaris/libem/Makefile b/mach/sparc_solaris/libem/Makefile
new file mode 100644 (file)
index 0000000..d2818e5
--- /dev/null
@@ -0,0 +1,5 @@
+distr:
+       rm -f libem_s.a
+       ln ../../sparc/libem/libem_s.a libem_s.a
+       rm -f LIST
+       ln ../../sparc/libem/LIST LIST
diff --git a/mach/sparc_solaris/libem/READ_ME b/mach/sparc_solaris/libem/READ_ME
new file mode 100644 (file)
index 0000000..8f97783
--- /dev/null
@@ -0,0 +1,2 @@
+As long as none of the libem source files use .seg, we can use the
+source files of the sparc libem.
diff --git a/mach/sparc_solaris/libend/.distr b/mach/sparc_solaris/libend/.distr
new file mode 100644 (file)
index 0000000..b48ec84
--- /dev/null
@@ -0,0 +1,2 @@
+LIST
+end_s.a
diff --git a/mach/sparc_solaris/libend/LIST b/mach/sparc_solaris/libend/LIST
new file mode 100644 (file)
index 0000000..2efbd3e
--- /dev/null
@@ -0,0 +1,5 @@
+end_s.a
+edata.s
+em_end.s
+end.s
+etext.s
diff --git a/mach/sparc_solaris/libend/edata.s b/mach/sparc_solaris/libend/edata.s
new file mode 100644 (file)
index 0000000..deb27af
--- /dev/null
@@ -0,0 +1,3 @@
+.global $edata
+.section ".data"
+$edata:
diff --git a/mach/sparc_solaris/libend/em_end.s b/mach/sparc_solaris/libend/em_end.s
new file mode 100644 (file)
index 0000000..6526ce1
--- /dev/null
@@ -0,0 +1,3 @@
+.global $_end
+.section ".bss"
+$_end:
diff --git a/mach/sparc_solaris/libend/end.s b/mach/sparc_solaris/libend/end.s
new file mode 100644 (file)
index 0000000..9b4935c
--- /dev/null
@@ -0,0 +1,3 @@
+.global $end
+.section ".bss"
+$end:
diff --git a/mach/sparc_solaris/libend/etext.s b/mach/sparc_solaris/libend/etext.s
new file mode 100644 (file)
index 0000000..b2abebd
--- /dev/null
@@ -0,0 +1,3 @@
+.global $etext
+.section ".text"
+$etext:
diff --git a/mach/sparc_solaris/mach_params b/mach/sparc_solaris/mach_params
new file mode 100644 (file)
index 0000000..0f28ef2
--- /dev/null
@@ -0,0 +1,5 @@
+MACH=sparc_solaris
+SUF=o
+ASAR=ar
+RANLIB=:
+MACHFL=-O -DNFS