⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 make-cc1.com

📁 GCC编译器源代码
💻 COM
📖 第 1 页 / 共 2 页
字号:
$!'f$verify(0)$! Generate insn-attr.h$	call generate insn-attr.h$	call generate insn-flags.h$	call generate insn-codes.h$	call generate insn-config.h$!$call compile independent.opt "rtl,obstack,insn-attrtab"$!$	call generate insn-attrtab.c "rtlanal.obj,"$set verify$ 'CC''CFLAGS' insn-attrtab.c$ 'CC''CFLAGS' bc-emit.c$ 'CC''CFLAGS' bc-optab.c$!'f$verify(0)$	endif$!$compile_cc1:$if (DO_CC1 + DO_CC1OBJ) .ne.0$	then$if (f$search("C-PARSE.Y") .eqs. "") then goto yes_yfiles$if (f$cvtime(f$file_attributes("C-PARSE.IN","RDT")).gts. - 	    f$cvtime(f$file_attributes("C-PARSE.Y","RDT")))  -		then goto yes_yfiles$if f$parse("[.OBJC]").eqs."" then create/Directory [.objc]$if (f$search("[.OBJC]OBJC-PARSE.Y") .eqs. "") then goto yes_yfiles$if (f$cvtime(f$file_attributes("C-PARSE.IN","RDT")).gts. - 	    f$cvtime(f$file_attributes("[.OBJC]OBJC-PARSE.Y","RDT")))  -		then goto yes_yfiles$GOTO no_yfiles$yes_yfiles:$echo "Now processing c-parse.in to generate c-parse.y and [.objc]objc-parse.y."$ EDIT/Tpu/noJournal/noSection/noDisplay/Command=sys$input:!!     Read c-parse.in, write c-parse.y and objc/objc-parse.y, depending on!     paired lines of "ifc" & "end ifc" and "ifobjc" & "end ifobjc" to!     control what goes into each file.  Most lines will be common to!     both (hence not bracketed by either control pair).  Mismatched!     pairs aren't detected--garbage in, garbage out...!   PROCEDURE do_output()      IF NOT objc_only THEN POSITION(END_OF(c)); COPY_TEXT(input_line); ENDIF;      IF NOT c_only THEN POSITION(END_OF(objc)); COPY_TEXT(input_line); ENDIF;      POSITION(input_file);                     !reset   ENDPROCEDURE;   input_file := CREATE_BUFFER("input", "c-parse.in");  !load data		 SET(NO_WRITE, input_file);   c          := CREATE_BUFFER("c_output");     !1st output file   objc       := CREATE_BUFFER("objc_output");  !2nd output file   POSITION(BEGINNING_OF(input_file));   c_only     := 0;   objc_only  := 0;   LOOP      EXITIF MARK(NONE) = END_OF(input_file);   !are we done yet?      input_line := CURRENT_LINE;               !access current_line just once      CASE EDIT(input_line, TRIM_TRAILING, OFF, NOT_IN_PLACE)	 ["ifc"]        : c_only := 1;	 ["end ifc"]    : c_only := 0;	 ["ifobjc"]     : objc_only := 1;	 ["end ifobjc"] : objc_only := 0;!         default -- add non-control line to either or both output files	 [INRANGE]      : do_output();          !between "end" and "if"	 [OUTRANGE]     : do_output();          !before "end" or after "if"      ENDCASE;      MOVE_VERTICAL(1);                         !go to next line   ENDLOOP;   WRITE_FILE(c, "c-parse.y");   WRITE_FILE(objc, "[.objc]objc-parse.y");   QUIT$	endif	$no_yfiles:$!$open cfile$ compilers.list$cloop:read cfile$ compilername/end=cdone$! language specific modules$!$if (DO_ALL + DO_'compilername').eq.0 then goto cloop$if DO_LINK.eq.0 then - call compile 'compilername'-objs.opt "obstack,bc-emit,bc-optab"$!$! CAUTION: If you want to link gcc-cc1* to the sharable image library$! VAXCRTL, see the notes in gcc.texinfo (or INSTALL) first.$!$set verify$ 'LINK''LDFLAGS'/Exe=gcc-'compilername'.exe  version.opt/Opt,-	  'compilername'-objs.opt/Opt,independent.opt/Opt,-	  'LIBS'$!'f$verify(0)$goto cloop$!$!$cdone: close cfile$$!$ if DO_OBJCLIB$ then	set default [.objc]	!push$	save_cflags = CFLAGS$	CFLAGS = CFLAGS - CINCL1 - CINCL2 + CINCL_SUB$	MFLAGS = "/Lang=ObjC" + CFLAGS$	library/Obj [-]objclib.olb/Create$	if f$trnlnm("IFILE$").nes."" then  close/noLog ifile$$	open/Read ifile$ [-]objc-objs.opt$ocl1:	read/End=ocl3 ifile$ line$	i = 0$ocl2:	o = f$element(i,",",line)$	if o.eqs."," then goto ocl1$	n = o - ".o"$	if f$search(n + ".m").nes.""$	then	f = n + ".m"$		flags = MFLAGS$	else	f = n + ".c"$		flags = CFLAGS$	endif$	set verify$ 'CC' 'flags' 'f'$!'f$verify(0)'$	library/Obj [-]objclib.olb 'n'.obj/Insert$	delete/noConfirm/noLog 'n'.obj;*$	i = i + 1$	goto ocl2$ocl3:	close ifile$$	CFLAGS = save_cflags$	set default [-]	!pop$ endif !DO_OBJCLIB$!$!	Done$!$! 'f$verify(v)$exit$!$!  Various DCL subroutines follow...$!$!  This routine takes parameter p1 to be a linker options file with a list$!  of object files that are needed.  It extracts the names, and compiles$!  each source module, one by one.  File names that begin with an$!  "INSN-" are assumed to be generated by a GEN*.C program.$!$!  Parameter P2 is a list of files which will appear in the options file$!  that should not be compiled.  This allows us to handle special cases.$!$compile:$subroutine$on error then goto c_err$on control_y then goto c_err$open ifile$ 'p1'$loop: read ifile$ line/end=c_done$!$i=0$loop1:$flnm=f$element(i,",",line)$i=i+1$if flnm.eqs."" then goto loop$if flnm.eqs."," then goto loop$if f$locate(flnm,p2).lt.f$length(p2) then goto loop1$! check for front-end subdirectory: "[.prfx]flnm"$prfx = ""$k = f$locate("]",flnm)$if k.eq.1	![]c-common for [.cp]$then$ if f$search(f$parse(".obj",flnm)).nes."" then  goto loop1$ flnm = f$extract(2,999,flnm)$else if k.lt.f$length(flnm)$ then	prfx = f$extract(2,k-2,flnm)$	flnm = f$extract(k+1,99,flnm)$ endif$endif$ if prfx.nes.""$ then	set default [.'prfx']	!push$	save_cflags = CFLAGS$	CFLAGS = CFLAGS - CINCL1 - CINCL2 + CINCL_SUB$ endif$!$ if f$locate("parse",flnm).nes.f$length(flnm)$ then$   if f$search("''flnm'.c").nes."" then -      if f$cvtime(f$file_attributes("''flnm'.c","RDT")).ges. -	 f$cvtime(f$file_attributes("''flnm'.y","RDT")) then  goto skip_yacc$ set verify$	'PARSER' 'PARSER_FLAGS' 'flnm'.y$	'RENAME' 'flnm'_tab.c 'flnm'.c$	'RENAME' 'flnm'_tab.h 'flnm'.h$!'f$verify(0)$	if flnm.eqs."cp-parse" .or. (prfx.eqs."cp" .and. flnm.eqs."parse")$	then		! fgrep '#define YYEMPTY' cp-parse.c >>cp-parse.h$		if f$trnlnm("JFILE$").nes."" then  close/noLog jfile$$		open/Append jfile$ 'flnm'.h$		'SEARCH'/Exact/Output=jfile$ 'flnm'.c "#define YYEMPTY"$		close jfile$$	endif$skip_yacc:$	 echo " (Ignore any warning about not finding file ""bison.simple"".)"$ endif$!$if f$extract(0,5,flnm).eqs."insn-" then call generate 'flnm'.c$!$set verify$ 'CC''CFLAGS' 'flnm'.c$!'f$verify(0)$ if prfx.nes.""$ then	set default [-]		!pop$	CFLAGS = save_CFLAGS$ endif$$goto loop1$!$!$! In case of error or abort, go here (In order to close file).$!$c_err: !'f$verify(0)$close ifile$$ABORT$!$c_done:$close ifile$$endsubroutine$!$! This subroutine generates the insn-* files.  The first argument is the$! name of the insn-* file to generate.  The second argument contains a$! list of any other object modules which must be linked to the gen*.c$! program.$!$generate:$subroutine$if f$extract(0,5,p1).nes."INSN-"$	then$	write sys$error "Unknown file passed to generate."$	ABORT$	endif$root1=f$parse(f$extract(5,255,p1),,,"NAME")$	set verify$ 'CC''CFLAGS' GEN'root1'.C$ 'LINK''f$string(LDFLAGS - "/Debug")' GEN'root1'.OBJ,rtl.obj,obstack.obj,'p2' -	  'LIBS'$!	'f$verify(0)$!$set verify$	assign/user 'p1' sys$output:$	mcr sys$disk:[]GEN'root1' vax.md$!'f$verify(0)$endsubroutine$!$! This subroutine generates the bc-* files.  The first argument is the$! name of the bc-* file to generate.  The second argument contains a$! list of any other object modules which must be linked to the bi*.c$! program.$!$bc_generate:$subroutine$if f$extract(0,3,p1).nes."BC-"$	then$	write sys$error "Unknown file passed to bc_generate."$	ABORT$	endif$root1=f$parse(f$extract(3,255,p1),,,"NAME")$	set verify$ 'CC''CFLAGS' BI-'root1'.C$ 'LINK''f$string(LDFLAGS - "/Debug")' BI-'root1'.OBJ,'p2' -	  'LIBS'$!	'f$verify(0)$!$set verify$	assign/user bytecode.def sys$input:$	assign/user 'p1' sys$output:$	mcr sys$disk:[]BI-'root1'$!'f$verify(0)$endsubroutine

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -