comparison gcc/config/mips/sdemtk.h @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
comparison
equal deleted inserted replaced
52:c156f1bd5cd9 55:77e2b8dfacca
1 /* Definitions of target machine for GNU compiler. 1 /* Definitions of target machine for GNU compiler.
2 MIPS SDE version, for use with the SDE C library rather than newlib. 2 MIPS SDE version, for use with the SDE C library rather than newlib.
3 Copyright (C) 2007, 2008 3 Copyright (C) 2007, 2008, 2009
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
8 GCC is free software; you can redistribute it and/or modify 8 GCC is free software; you can redistribute it and/or modify
84 /* For inline code which needs to sync the icache and dcache, 84 /* For inline code which needs to sync the icache and dcache,
85 noting that the SDE library takes arguments (address, size). */ 85 noting that the SDE library takes arguments (address, size). */
86 #undef MIPS_ICACHE_SYNC 86 #undef MIPS_ICACHE_SYNC
87 #define MIPS_ICACHE_SYNC(ADDR, SIZE) \ 87 #define MIPS_ICACHE_SYNC(ADDR, SIZE) \
88 emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \ 88 emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mips_cache_flush_func), \
89 0, VOIDmode, 2, ADDR, Pmode, \ 89 LCT_NORMAL, VOIDmode, 2, ADDR, Pmode, \
90 SIZE, TYPE_MODE (sizetype)) 90 SIZE, TYPE_MODE (sizetype))
91 91
92 /* This version of _mcount does not pop 2 words from the stack. */ 92 /* This version of _mcount does not pop 2 words from the stack. */
93 #undef FUNCTION_PROFILER 93 #undef FUNCTION_PROFILER
94 #define FUNCTION_PROFILER(FILE, LABELNO) \ 94 #define FUNCTION_PROFILER(FILE, LABELNO) \
95 { \ 95 { \
96 fprintf (FILE, "\t.set\tnoat\n"); \ 96 mips_push_asm_switch (&mips_noat); \
97 /* _mcount treats $2 as the static chain register. */ \ 97 /* _mcount treats $2 as the static chain register. */ \
98 if (cfun->static_chain_decl != NULL) \ 98 if (cfun->static_chain_decl != NULL) \
99 fprintf (FILE, "\tmove\t%s,%s\n", reg_names[2], \ 99 fprintf (FILE, "\tmove\t%s,%s\n", reg_names[2], \
100 reg_names[STATIC_CHAIN_REGNUM]); \ 100 reg_names[STATIC_CHAIN_REGNUM]); \
101 /* MIPS16 code passes saved $ra in $v1 instead of $at. */ \ 101 /* MIPS16 code passes saved $ra in $v1 instead of $at. */ \
102 fprintf (FILE, "\tmove\t%s,%s\n", \ 102 fprintf (FILE, "\tmove\t%s,%s\n", \
103 reg_names[GP_REG_FIRST + (TARGET_MIPS16 ? 3 : 1)], \ 103 reg_names[GP_REG_FIRST + (TARGET_MIPS16 ? 3 : 1)], \
104 reg_names[GP_REG_FIRST + 31]); \ 104 reg_names[RETURN_ADDR_REGNUM]); \
105 fprintf (FILE, "\tjal\t_mcount\n"); \ 105 fprintf (FILE, "\tjal\t_mcount\n"); \
106 fprintf (FILE, "\t.set\tat\n"); \ 106 mips_pop_asm_switch (&mips_noat); \
107 /* _mcount treats $2 as the static chain register. */ \ 107 /* _mcount treats $2 as the static chain register. */ \
108 if (cfun->static_chain_decl != NULL) \ 108 if (cfun->static_chain_decl != NULL) \
109 fprintf (FILE, "\tmove\t%s,%s\n", reg_names[STATIC_CHAIN_REGNUM], \ 109 fprintf (FILE, "\tmove\t%s,%s\n", reg_names[STATIC_CHAIN_REGNUM], \
110 reg_names[2]); \ 110 reg_names[2]); \
111 } 111 }
112 112
113 /* ...nor does the call sequence preserve $31. */ 113 /* ...nor does the call sequence preserve $31. */
114 #undef MIPS_SAVE_REG_FOR_PROFILING_P 114 #undef MIPS_SAVE_REG_FOR_PROFILING_P
115 #define MIPS_SAVE_REG_FOR_PROFILING_P(REGNO) ((REGNO) == GP_REG_FIRST + 31) 115 #define MIPS_SAVE_REG_FOR_PROFILING_P(REGNO) ((REGNO) == RETURN_ADDR_REGNUM)