📄 unicosmk.h
字号:
#undef CASE_VECTOR_MODE#define CASE_VECTOR_MODE DImode#undef CASE_VECTOR_PC_RELATIVE/* Define this as 1 if `char' should by default be signed; else as 0. *//* #define DEFAULT_SIGNED_CHAR 1 *//* The Cray assembler is really weird with respect to sections. It has only named sections and you can't reopen a section once it has been closed. This means that we have to generate unique names whenever we want to reenter the text or the data section. The following is a rather bad hack as TEXT_SECTION_ASM_OP and DATA_SECTION_ASM_OP are supposed to be constants. */#undef TEXT_SECTION_ASM_OP#define TEXT_SECTION_ASM_OP unicosmk_text_section ()#undef DATA_SECTION_ASM_OP#define DATA_SECTION_ASM_OP unicosmk_data_section ()/* There are no read-only sections on Unicos/Mk. */#undef READONLY_DATA_SECTION_ASM_OP#define READONLY_DATA_SECTION data_section/* Define extra sections for common data and SSIBs (static subroutine information blocks). The actual section header is output by the callers of these functions. */#undef EXTRA_SECTIONS#undef EXTRA_SECTION_FUNCTIONS#define EXTRA_SECTIONS in_common, in_ssib#define EXTRA_SECTION_FUNCTIONS \COMMON_SECTION \SSIB_SECTION extern void common_section PARAMS ((void));#define COMMON_SECTION \void \common_section () \{ \ in_section = in_common; \}extern void ssib_section PARAMS ((void));#define SSIB_SECTION \void \ssib_section () \{ \ in_section = in_ssib; \}/* This outputs text to go at the start of an assembler file. */#undef ASM_FILE_START#define ASM_FILE_START(FILE) unicosmk_asm_file_start (FILE)/* This outputs text to go at the end of an assembler file. */#undef ASM_FILE_END#define ASM_FILE_END(FILE) unicosmk_asm_file_end (FILE)/* We take care of that in ASM_FILE_START. */#undef ASM_OUTPUT_SOURCE_FILENAME/* This is how to output a label for a jump table. Arguments are the same as for ASM_OUTPUT_INTERNAL_LABEL, except the insn for the jump table is passed. */#undef ASM_OUTPUT_CASE_LABEL#define ASM_OUTPUT_CASE_LABEL(FILE,PREFIX,NUM,TABLEINSN) \ ASM_OUTPUT_INTERNAL_LABEL (FILE, PREFIX, NUM)/* CAM has some restrictions with respect to string literals. It won't accept lines with more that 256 characters which means that we have to split long strings. Moreover, it only accepts escape sequences of the form \nnn in the range 0 to 127. We generate .byte directives for escapes characters greater than 127. And finally, ` must be escaped. */#undef ASM_OUTPUT_ASCII#define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \ do { \ FILE *_hide_asm_out_file = (MYFILE); \ const unsigned char *_hide_p = (const unsigned char *) (MYSTRING); \ int _hide_thissize = (MYLENGTH); \ int _size_so_far = 0; \ { \ FILE *asm_out_file = _hide_asm_out_file; \ const unsigned char *p = _hide_p; \ int thissize = _hide_thissize; \ int in_ascii = 0; \ int i; \ \ for (i = 0; i < thissize; i++) \ { \ register int c = p[i]; \ \ if (c > 127) \ { \ if (in_ascii) \ { \ fprintf (asm_out_file, "\"\n"); \ in_ascii = 0; \ } \ \ fprintf (asm_out_file, "\t.byte\t%d\n", c); \ } \ else \ { \ if (! in_ascii) \ { \ fprintf (asm_out_file, "\t.ascii\t\""); \ in_ascii = 1; \ _size_so_far = 0; \ } \ else if (_size_so_far >= 64) \ { \ fprintf (asm_out_file, "\"\n\t.ascii\t\""); \ _size_so_far = 0; \ } \ \ if (c == '\"' || c == '\\' || c == '`') \ putc ('\\', asm_out_file); \ if (c >= ' ') \ putc (c, asm_out_file); \ else \ fprintf (asm_out_file, "\\%.3o", c); \ ++ _size_so_far; \ } \ } \ if (in_ascii) \ fprintf (asm_out_file, "\"\n"); \ } \ } while(0)/* This is how to output an element of a case-vector that is absolute. */#undef ASM_OUTPUT_ADDR_VEC_ELT#define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ fprintf (FILE, "\t.quad $L%d\n", (VALUE))/* This is how to output an element of a case-vector that is relative. (Unicos/Mk does not use such vectors yet). */#undef ASM_OUTPUT_ADDR_DIFF_ELT#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) abort ()/* We can't output case vectors in the same section as the function code because CAM doesn't allow data definitions in code sections. Thus, we simply record the case vectors and put them in a separate section after the function. */#define ASM_OUTPUT_ADDR_VEC(LAB,VEC) \ unicosmk_defer_case_vector ((LAB),(VEC))#define ASM_OUTPUT_ADDR_DIFF_VEC(LAB,VEC) abort ()/* This is how to output an assembler line that says to advance the location counter to a multiple of 2**LOG bytes. Annoyingly, CAM always uses zeroes to fill the unused space which does not work in code sections. We have to be careful not to use the .align directive in code sections. */#undef ASM_OUTPUT_ALIGN#define ASM_OUTPUT_ALIGN(STREAM,LOG) unicosmk_output_align (STREAM, LOG)/* This is how to advance the location counter by SIZE bytes. */#undef ASM_OUTPUT_SKIP#define ASM_OUTPUT_SKIP(STREAM,SIZE) \ fprintf ((STREAM), "\t.byte\t0:%d\n", (SIZE));/* This says how to output an assembler line to define a global common symbol. We need the alignment information because it has to be supplied in the section header. */ #undef ASM_OUTPUT_COMMON#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ unicosmk_output_common ((FILE), (NAME), (SIZE), (ALIGN))/* This says how to output an assembler line to define a local symbol. */#undef ASM_OUTPUT_LOCAL#define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN) \ do { data_section (); \ fprintf (FILE, "\t.align\t%d\n", floor_log2 ((ALIGN) / BITS_PER_UNIT));\ ASM_OUTPUT_LABEL ((FILE), (NAME)); \ fprintf (FILE, "\t.byte 0:%d\n", SIZE); \ } while (0)/* CAM does not allow us to declare a symbol as external first and then define it in the same file later. Thus, we keep a list of all external references, remove all symbols defined locally from it and output it at the end of the asm file. */ #define ASM_OUTPUT_EXTERNAL(FILE,DECL,NAME) \ unicosmk_add_extern ((NAME))#define ASM_OUTPUT_EXTERNAL_LIBCALL(STREAM,SYMREF) \ unicosmk_add_extern (XSTR ((SYMREF), 0))/* This is how to declare an object. We don't have to output anything if it is a global variable because those go into unique `common' sections and the section name is globally visible. For local variables, we simply output the label. In any case, we have to record that no extern declaration should be generated for the symbol. */#define ASM_DECLARE_OBJECT_NAME(STREAM,NAME,DECL) \ do { tree name_tree; \ name_tree = get_identifier ((NAME)); \ TREE_ASM_WRITTEN (name_tree) = 1; \ if (!TREE_PUBLIC (DECL)) \ { \ assemble_name (STREAM, NAME); \ fputs (":\n", STREAM); \ } \ } while(0)/*#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME, RELOC) \ unicosmk_output_section_name ((STREAM), (DECL), (NAME), (RELOC))*//* Switch into a generic section. */#define TARGET_ASM_NAMED_SECTION unicosmk_asm_named_section#undef ASM_OUTPUT_MAX_SKIP_ALIGN#define ASM_OUTPUT_MAX_SKIP_ALIGN(STREAM,POWER,MAXSKIP)#undef NM_FLAGS#undef OBJECT_FORMAT_COFF/* We cannot generate debugging information on Unicos/Mk. */#undef SDB_DEBUGGING_INFO#undef MIPS_DEBUGGING_INFO#undef DBX_DEBUGGING_INFO#undef DWARF_DEBUGGING_INFO#undef DWARF2_DEBUGGING_INFO#undef DWARF2_UNWIND_INFO#undef INCOMING_RETURN_ADDR_RTX/* We use the functions provided by the system library for integer division. */#undef UDIVDI3_LIBCALL#undef DIVDI3_LIBCALL#define UDIVDI3_LIBCALL "$uldiv"#define DIVDI3_LIBCALL "$sldiv"/* This is necessary to prevent gcc from generating calls to __divsi3. */#define INIT_TARGET_OPTABS \ do { \ sdiv_optab->handlers[(int) SImode].libfunc = NULL_RTX; \ udiv_optab->handlers[(int) SImode].libfunc = NULL_RTX; \ } while (0)#undef ASM_OUTPUT_SOURCE_LINE/* We don't need a start file. */#undef STARTFILE_SPEC#define STARTFILE_SPEC ""/* These are the libraries we have to link with. ??? The Craylibs directory should be autoconfed. */#undef LIB_SPEC#define LIB_SPEC "-L/opt/ctl/craylibs/craylibs -lu -lm -lc -lsma"#undef BUILD_VA_LIST_TYPE#undef EXPAND_BUILTIN_VA_START#undef EXPAND_BUILTIN_VA_ARG#define EH_FRAME_IN_DATA_SECTION 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -