Added sparc_solaris stuff
This commit is contained in:
		
							parent
							
								
									a430cb7d8e
								
							
						
					
					
						commit
						980faf36f0
					
				
					 18 changed files with 213 additions and 0 deletions
				
			
		
							
								
								
									
										8
									
								
								mach/sparc_solaris/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								mach/sparc_solaris/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | Action | ||||||
|  | ce | ||||||
|  | ce_cg | ||||||
|  | libdb | ||||||
|  | libem | ||||||
|  | libend | ||||||
|  | libsys | ||||||
|  | mach_params | ||||||
							
								
								
									
										24
									
								
								mach/sparc_solaris/Action
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								mach/sparc_solaris/Action
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
							
								
								
									
										1
									
								
								mach/sparc_solaris/ce/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								mach/sparc_solaris/ce/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | proto.make | ||||||
							
								
								
									
										37
									
								
								mach/sparc_solaris/ce/proto.make
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								mach/sparc_solaris/ce/proto.make
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
							
								
								
									
										1
									
								
								mach/sparc_solaris/ce_cg/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								mach/sparc_solaris/ce_cg/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | proto.make | ||||||
							
								
								
									
										42
									
								
								mach/sparc_solaris/ce_cg/proto.make
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								mach/sparc_solaris/ce_cg/proto.make
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
							
								
								
									
										1
									
								
								mach/sparc_solaris/libdb/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								mach/sparc_solaris/libdb/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1 @@ | ||||||
|  | machdep.s | ||||||
							
								
								
									
										64
									
								
								mach/sparc_solaris/libdb/machdep.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								mach/sparc_solaris/libdb/machdep.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
							
								
								
									
										4
									
								
								mach/sparc_solaris/libem/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								mach/sparc_solaris/libem/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,4 @@ | ||||||
|  | LIST | ||||||
|  | libem_s.a | ||||||
|  | READ_ME | ||||||
|  | Makefile | ||||||
							
								
								
									
										5
									
								
								mach/sparc_solaris/libem/Makefile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								mach/sparc_solaris/libem/Makefile
									
										
									
									
									
										Normal file
									
								
							|  | @ -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 | ||||||
							
								
								
									
										2
									
								
								mach/sparc_solaris/libem/READ_ME
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								mach/sparc_solaris/libem/READ_ME
									
										
									
									
									
										Normal file
									
								
							|  | @ -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. | ||||||
							
								
								
									
										2
									
								
								mach/sparc_solaris/libend/.distr
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								mach/sparc_solaris/libend/.distr
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | ||||||
|  | LIST | ||||||
|  | end_s.a | ||||||
							
								
								
									
										5
									
								
								mach/sparc_solaris/libend/LIST
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								mach/sparc_solaris/libend/LIST
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | end_s.a | ||||||
|  | edata.s | ||||||
|  | em_end.s | ||||||
|  | end.s | ||||||
|  | etext.s | ||||||
							
								
								
									
										3
									
								
								mach/sparc_solaris/libend/edata.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/sparc_solaris/libend/edata.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | .global $edata | ||||||
|  | .section ".data" | ||||||
|  | $edata: | ||||||
							
								
								
									
										3
									
								
								mach/sparc_solaris/libend/em_end.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/sparc_solaris/libend/em_end.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | .global $_end | ||||||
|  | .section ".bss" | ||||||
|  | $_end: | ||||||
							
								
								
									
										3
									
								
								mach/sparc_solaris/libend/end.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/sparc_solaris/libend/end.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | .global $end | ||||||
|  | .section ".bss" | ||||||
|  | $end: | ||||||
							
								
								
									
										3
									
								
								mach/sparc_solaris/libend/etext.s
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								mach/sparc_solaris/libend/etext.s
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,3 @@ | ||||||
|  | .global $etext | ||||||
|  | .section ".text" | ||||||
|  | $etext: | ||||||
							
								
								
									
										5
									
								
								mach/sparc_solaris/mach_params
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								mach/sparc_solaris/mach_params
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,5 @@ | ||||||
|  | MACH=sparc_solaris | ||||||
|  | SUF=o | ||||||
|  | ASAR=ar | ||||||
|  | RANLIB=: | ||||||
|  | MACHFL=-O -DNFS | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue