From 980faf36f002d950b8b40cbc2ee9113999e6200f Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 6 Oct 1993 16:42:05 +0000 Subject: [PATCH] Added sparc_solaris stuff --- mach/sparc_solaris/.distr | 8 ++++ mach/sparc_solaris/Action | 24 +++++++++++ mach/sparc_solaris/ce/.distr | 1 + mach/sparc_solaris/ce/proto.make | 37 +++++++++++++++++ mach/sparc_solaris/ce_cg/.distr | 1 + mach/sparc_solaris/ce_cg/proto.make | 42 +++++++++++++++++++ mach/sparc_solaris/libdb/.distr | 1 + mach/sparc_solaris/libdb/machdep.s | 64 +++++++++++++++++++++++++++++ mach/sparc_solaris/libem/.distr | 4 ++ mach/sparc_solaris/libem/Makefile | 5 +++ mach/sparc_solaris/libem/READ_ME | 2 + mach/sparc_solaris/libend/.distr | 2 + mach/sparc_solaris/libend/LIST | 5 +++ mach/sparc_solaris/libend/edata.s | 3 ++ mach/sparc_solaris/libend/em_end.s | 3 ++ mach/sparc_solaris/libend/end.s | 3 ++ mach/sparc_solaris/libend/etext.s | 3 ++ mach/sparc_solaris/mach_params | 5 +++ 18 files changed, 213 insertions(+) create mode 100644 mach/sparc_solaris/.distr create mode 100644 mach/sparc_solaris/Action create mode 100644 mach/sparc_solaris/ce/.distr create mode 100644 mach/sparc_solaris/ce/proto.make create mode 100644 mach/sparc_solaris/ce_cg/.distr create mode 100644 mach/sparc_solaris/ce_cg/proto.make create mode 100644 mach/sparc_solaris/libdb/.distr create mode 100644 mach/sparc_solaris/libdb/machdep.s create mode 100644 mach/sparc_solaris/libem/.distr create mode 100644 mach/sparc_solaris/libem/Makefile create mode 100644 mach/sparc_solaris/libem/READ_ME create mode 100644 mach/sparc_solaris/libend/.distr create mode 100644 mach/sparc_solaris/libend/LIST create mode 100644 mach/sparc_solaris/libend/edata.s create mode 100644 mach/sparc_solaris/libend/em_end.s create mode 100644 mach/sparc_solaris/libend/end.s create mode 100644 mach/sparc_solaris/libend/etext.s create mode 100644 mach/sparc_solaris/mach_params diff --git a/mach/sparc_solaris/.distr b/mach/sparc_solaris/.distr new file mode 100644 index 000000000..99e11b974 --- /dev/null +++ b/mach/sparc_solaris/.distr @@ -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 index 000000000..f1d534312 --- /dev/null +++ b/mach/sparc_solaris/Action @@ -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 index 000000000..cafc23097 --- /dev/null +++ b/mach/sparc_solaris/ce/.distr @@ -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 index 000000000..aeb71f55d --- /dev/null +++ b/mach/sparc_solaris/ce/proto.make @@ -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 index 000000000..cafc23097 --- /dev/null +++ b/mach/sparc_solaris/ce_cg/.distr @@ -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 index 000000000..d51a077c5 --- /dev/null +++ b/mach/sparc_solaris/ce_cg/proto.make @@ -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 index 000000000..af5eda499 --- /dev/null +++ b/mach/sparc_solaris/libdb/.distr @@ -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 index 000000000..a1241f645 --- /dev/null +++ b/mach/sparc_solaris/libdb/machdep.s @@ -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 index 000000000..52c8084b9 --- /dev/null +++ b/mach/sparc_solaris/libem/.distr @@ -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 index 000000000..d2818e5e0 --- /dev/null +++ b/mach/sparc_solaris/libem/Makefile @@ -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 index 000000000..8f9778314 --- /dev/null +++ b/mach/sparc_solaris/libem/READ_ME @@ -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 index 000000000..b48ec8483 --- /dev/null +++ b/mach/sparc_solaris/libend/.distr @@ -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 index 000000000..2efbd3eb2 --- /dev/null +++ b/mach/sparc_solaris/libend/LIST @@ -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 index 000000000..deb27afb1 --- /dev/null +++ b/mach/sparc_solaris/libend/edata.s @@ -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 index 000000000..6526ce14d --- /dev/null +++ b/mach/sparc_solaris/libend/em_end.s @@ -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 index 000000000..9b4935ce5 --- /dev/null +++ b/mach/sparc_solaris/libend/end.s @@ -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 index 000000000..b2abebd44 --- /dev/null +++ b/mach/sparc_solaris/libend/etext.s @@ -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 index 000000000..0f28ef215 --- /dev/null +++ b/mach/sparc_solaris/mach_params @@ -0,0 +1,5 @@ +MACH=sparc_solaris +SUF=o +ASAR=ar +RANLIB=: +MACHFL=-O -DNFS