--- /dev/null
+Action
+ce
+ce_cg
+libdb
+libem
+libend
+libsys
+mach_params
--- /dev/null
+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
--- /dev/null
+proto.make
--- /dev/null
+# $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
--- /dev/null
+proto.make
--- /dev/null
+# $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
--- /dev/null
+.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
--- /dev/null
+LIST
+libem_s.a
+READ_ME
+Makefile
--- /dev/null
+distr:
+ rm -f libem_s.a
+ ln ../../sparc/libem/libem_s.a libem_s.a
+ rm -f LIST
+ ln ../../sparc/libem/LIST LIST
--- /dev/null
+As long as none of the libem source files use .seg, we can use the
+source files of the sparc libem.
--- /dev/null
+LIST
+end_s.a
--- /dev/null
+end_s.a
+edata.s
+em_end.s
+end.s
+etext.s
--- /dev/null
+.global $edata
+.section ".data"
+$edata:
--- /dev/null
+.global $_end
+.section ".bss"
+$_end:
--- /dev/null
+.global $end
+.section ".bss"
+$end:
--- /dev/null
+.global $etext
+.section ".text"
+$etext:
--- /dev/null
+MACH=sparc_solaris
+SUF=o
+ASAR=ar
+RANLIB=:
+MACHFL=-O -DNFS