From: Dave A. <ai...@us...> - 2003-02-13 03:25:56
|
Update of /cvsroot/linux-vax/tools/src/gcc/config/vax In directory sc8-pr-cvs1:/tmp/cvs-serv13250 Modified Files: Tag: tools-linuxvax-dynamic-dev linux.h pic.h vax.c vax.h Removed Files: Tag: tools-linuxvax-dynamic-dev pic.c Log Message: DA: cleaned up the dynamic dev pic stuff.. removed a lot of the changes made by Linux/VAX as they were mostly replacings similiar stuff made by the NetBSD stuff... only dodgy one is CALL_USED_REGS.. might switch back to Linux usage .. NetBSD has done r0-r5 for ages according to Matt, not sure why Index: linux.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/linux.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- linux.h 19 Oct 2002 11:33:39 -0000 1.1.2.1 +++ linux.h 13 Feb 2003 03:25:52 -0000 1.1.2.2 @@ -21,6 +21,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + /* temporary*/ #define inhibit_libc @@ -77,7 +78,7 @@ /* we do not support libc5 */ #undef LINK_SPEC -#define LINK_SPEC "-m elf_vax %{shared:-shared} \ +#define LINK_SPEC "-m elf32vax %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ @@ -109,28 +110,6 @@ #undef ASM_COMMENT_START #define ASM_COMMENT_START "#" - -/* This is how to output an element of a case-vector that is relative. - This is only used for PIC code. See comments by the `casesi' insn in - i386.md for an explanation of the expression this outputs. - - * FIXME: problem. i386 implements non-pic casesi with tablejmp, - * and uses casesi for PIC. vax has a better case instruction, - * so it is used. At the mo, since PIC is in bits, use the std non - * GOT casesi relative case vector. Else we get ELT's in a .rodata - * stuffed in the middle of code. - * - */ - -/* - #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.long _GLOBAL_OFFSET_TABLE_+[.-%s%d]\n", LPREFIX, VALUE) -*/ -/* FIXME: PIC code in vax.md */ - -#undef ASM_OUTPUT_ADDR_DIFF_ELT -#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ - fprintf (FILE, "\t.word %s%d-%s%d\n", LPREFIX, VALUE, LPREFIX, REL) /* Indicate that jump tables (case instr) go in the text section. */ #define JUMP_TABLES_IN_TEXT_SECTION (1) Index: pic.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/pic.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- pic.h 24 Oct 2002 12:09:10 -0000 1.1.2.2 +++ pic.h 13 Feb 2003 03:25:52 -0000 1.1.2.3 @@ -20,31 +20,13 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* Stubs for half-pic support if not OSF/1 reference platform. */ - -#ifndef HALF_PIC_P -#define HALF_PIC_P() 0 -#define HALF_PIC_NUMBER_PTRS 0 -#define HALF_PIC_NUMBER_REFS 0 -#define HALF_PIC_ENCODE(DECL) -#define HALF_PIC_DECLARE(NAME) -#define HALF_PIC_INIT() error ("half-pic init called on systems that don't support it.") -#define HALF_PIC_ADDRESS_P(X) 0 -#define HALF_PIC_PTR(X) X -#define HALF_PIC_FINISH(STREAM) -#endif - -/* Macro to conditionally modify fixed_regs/call_used_regs. */ -#define CONDITIONAL_REGISTER_USAGE \ - { \ - if (flag_pic) \ - { \ - fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ - call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \ - } \ - } +#undef TARGET_GAS +#define TARGET_GAS (1) +#undef TARGET_DEFAULT +#define TARGET_DEFAULT 0 +#define TARGET_MEM_FUNCTIONS /* Function CSE screws up PLT .vs. GOT usage. * */ @@ -56,44 +38,13 @@ #define NO_EXTERNAL_INDIRECT_ADDRESS -/* Register to hold the addressing base for position independent - * code access to data items. - * This is r10 on vaxes. There is no ABI, so its r10 'cos I say so. */ -#define PIC_OFFSET_TABLE_REGNUM 10 - -/* This macro generates the assembly code for function entry. - FILE is a stdio stream to output the code to. - SIZE is an int: how many units of temporary storage to allocate. - Refer to the array `regs_ever_live' to determine which registers - to save; `regs_ever_live[I]' is nonzero if register number I - is ever used in the function. This macro is responsible for - knowing which registers should not be saved even if used. */ -/* overrides default definition in vax.h */ - -#undef FUNCTION_PROLOGUE -#define FUNCTION_PROLOGUE(FILE, SIZE) \ - function_prologue (FILE, SIZE) - /* Output assembler code to FILE to increment profiler label # LABELNO for profiling a function entry. */ /* overrides default definition in vax.h */ #undef FUNCTION_PROFILER #define FUNCTION_PROFILER(FILE, LABELNO) \ -{ \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tmovab %sP%d@GOTOFF(r10),r0\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tjsb *mcount@GOT(r10)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovab %sP%d,r0\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tjsb mcount\n"); \ - } \ -} - + asm_fprintf (FILE, "\tmovab .LP%d,%Rr0\n\tjsb __mcount\n", (LABELNO)) /* There are three profiling modes for basic blocks available. The modes are selected at compile time by using the options @@ -125,51 +76,6 @@ */ /* we dont support profile_block_flag == 2, PIC makes this more complex */ -#undef FUNCTION_BLOCK_PROFILER -#define FUNCTION_BLOCK_PROFILER(FILE, LABELNO) \ -{ \ - /* might be an idea to use RTX expressions here like i386 */ \ - if (!flag_pic) { \ - /* contents of function block profiler from vax.h */ \ - /* not very efficient, but clearer FIXME: later */ \ - fprintf(FILE, "\ttstl %sPBX0\n",LPREFIX); \ - fprintf(FILE, "\tjneq %sPI%d\n",LPREFIX, (LABELNO)); \ - fprintf(FILE, "\tpushal %sPBX0\n",LPREFIX); \ - fprintf(FILE, "\tcalls $1,__bb_init_func\n%sPI%d:\n", LPREFIX, (LABELNO)); \ - } else { \ - /* pic version */ \ - fprintf(FILE, "\ttstl %sPBX0@GOTOFF(r10)\n",LPREFIX); \ - fprintf(FILE, "\tjneq %sPI%d@GOT\n",LPREFIX, (LABELNO)); \ - fprintf(FILE, "\tpushal %sPBX0@GOTOFF(r10)\n",LPREFIX); \ - fprintf(FILE, "\tcalls $1,__bb_init_func@PLT\n%sPI%d:\n", LPREFIX, (LABELNO)); \ - } \ -} - -/* Output assembler code to FILE to increment the entry-count for - the BLOCKNO'th basic block in this source file. This is a real pain in the - sphincter on a VAX, since we do not want to change any of the bits in the - processor status word. The way it is done here, it is pushed onto the stack - before any flags have changed, and then the stack is fixed up to account for - the fact that the instruction to restore the flags only reads a word. - It may seem a bit clumsy, but at least it works. -*/ -/* no support for profile_block_flag == 2 */ - -#undef BLOCK_PROFILER -#define BLOCK_PROFILER(FILE, BLOCKNO) \ -{ \ - if (!flag_pic) { \ - /* as before from vax.h */ \ - fprintf (FILE, "\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n\taddl2 $1,%sPBX2+%d\n\tbicpsw $255\n\tbispsw (sp)+\n", \ - LPREFIX, (4 * BLOCKNO)); \ - } else { \ - /* pic version */ \ - fprintf(FILE,"\tmovpsl -(sp)\n\tmovw (sp),2(sp)\n\taddl2 $2,sp\n"); \ - fprintf(FILE,"\taddl2 $1,%sPBX2@GOTOFF+%d(r10)\n", LPREFIX, (4 * BLOCKNO)); \ - fprintf(FILE,"\tbicpsw $255\n\tbispsw (sp)+\n"); \ - } \ -} - /* The following macro shall output assembler code to FILE to indicate a return from function during basic-block profiling. @@ -179,25 +85,6 @@ #define FUNCTION_BLOCK_PROFILER_EXIT(FILE) {} -/* This macro generates the assembly code for function exit, - on machines that need it. If FUNCTION_EPILOGUE is not defined - then individual return instructions are generated for each - return statement. Args are same as for FUNCTION_PROLOGUE. - - The function epilogue should not depend on the current stack pointer! - It should use the frame pointer only. This is mandatory because - of alloca; we also take advantage of it to omit stack adjustments - before returning. - - If the last non-note insn in the function is a BARRIER, then there - is no need to emit a function prologue, because control does not fall - off the end. This happens if the function ends in an "exit" call, or - if a `return' insn is emitted directly into the function. */ - -#undef FUNCTION_EPILOGUE -#define FUNCTION_EPILOGUE(FILE, SIZE) \ - function_epilogue (FILE, SIZE) - #define TARGET_DEBUG_ADDR 0 /* Define this macro if references to a symbol must be treated differently depending on something about the variable or @@ -232,48 +119,14 @@ } \ while (0) -/* The `FINALIZE_PIC' macro serves as a hook to emit these special - codes once the function is being compiled into assembly code, but - not before. (It is not done before, because in the case of - compiling an inline function, it would lead to multiple PIC - prologues being included in functions which used inline functions - and were compiled to assembly language.) */ - -#define FINALIZE_PIC \ -do \ - { \ - extern int current_function_uses_pic_offset_table; \ - \ - current_function_uses_pic_offset_table |= profile_flag | profile_block_flag; \ - } \ -while (0) - -/* these two are overridden by routines in pic.c */ -/*#undef PRINT_OPERAND - *#define PRINT_OPERAND(FILE, X, CODE) \ - * vax_print_operand (FILE, X, CODE) - * - *#undef PRINT_OPERAND_ADDRESS - *#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \ - * vax_print_operand_address (FILE, ADDR) - */ - /* Put relocations in the constant pool in the writable data section. */ #undef SELECT_RTX_SECTION #define SELECT_RTX_SECTION(MODE,RTX) \ { \ if (flag_pic && vax_symbolic_operand ((RTX), (MODE))) \ data_section (); \ - else \ - readonly_data_section (); \ + else \ + readonly_data_section (); \ } -/* externals */ - -extern void function_prologue (); -extern void function_epilogue (); - -/*extern void print_operand (); - *extern void print_operand_address (); - */ Index: vax.c =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.c,v retrieving revision 2.12.2.2 retrieving revision 2.12.2.3 diff -u -r2.12.2.2 -r2.12.2.3 --- vax.c 17 Oct 2002 13:17:21 -0000 2.12.2.2 +++ vax.c 13 Feb 2003 03:25:52 -0000 2.12.2.3 @@ -1259,4 +1259,3 @@ #endif /* VMS */ -#include "pic.c" Index: vax.h =================================================================== RCS file: /cvsroot/linux-vax/tools/src/gcc/config/vax/vax.h,v retrieving revision 2.17.2.6 retrieving revision 2.17.2.7 diff -u -r2.17.2.6 -r2.17.2.7 --- vax.h 24 Oct 2002 12:09:10 -0000 2.17.2.6 +++ vax.h 13 Feb 2003 03:25:52 -0000 2.17.2.7 @@ -182,8 +182,8 @@ and the register where structure-value addresses are passed. Aside from that, you can include as many other registers as you like. */ /* test - comply with vax proc calling standard, */ -#define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} -/*#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1}*/ +/* #define CALL_USED_REGISTERS {1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} */ +#define CALL_USED_REGISTERS {1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1} /* Return number of consecutive hard regs needed starting at reg REGNO to hold something of mode MODE. --- pic.c DELETED --- |