diff options
author | Michael Meissner <meissner@gcc.gnu.org> | 1992-11-21 12:53:59 +0000 |
---|---|---|
committer | Michael Meissner <meissner@gcc.gnu.org> | 1992-11-21 12:53:59 +0000 |
commit | d8d5b1e1a96c06997a7dc2f602bfc1c9547050f0 (patch) | |
tree | 687d59a69d2b4f469115514153e4f1d67c5ab195 /gcc | |
parent | 28bbe06bc2a3d3a1edf1aca7e8097c2bee2655c2 (diff) | |
download | gcc-d8d5b1e1a96c06997a7dc2f602bfc1c9547050f0.zip gcc-d8d5b1e1a96c06997a7dc2f602bfc1c9547050f0.tar.gz gcc-d8d5b1e1a96c06997a7dc2f602bfc1c9547050f0.tar.bz2 |
Do not allow insns to be scheduled before prologue insns if profiling.
From-SVN: r2766
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/mips/mips.c | 6 | ||||
-rw-r--r-- | gcc/config/mips/mips.h | 8 | ||||
-rw-r--r-- | gcc/config/mips/mips.md | 12 |
3 files changed, 25 insertions, 1 deletions
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 5c73d53..8d18d6b 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -4207,6 +4207,12 @@ mips_expand_prologue () if (frame_pointer_needed) emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx)); } + + /* If we are profiling, make sure no instructions are scheduled before + the call to mcount. */ + + if (profile_flag || profile_block_flag) + emit_insn (gen_blockage ()); } diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index ef81806..49c54e2 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -482,7 +482,7 @@ while (0) /* Print subsidiary information on the compiler version in use. */ -#define MIPS_VERSION "[AL 1.1, MM 28]" +#define MIPS_VERSION "[AL 1.1, MM 29]" #ifndef MACHINE_TYPE #define MACHINE_TYPE "BSD Mips" @@ -1929,6 +1929,12 @@ typedef struct mips_args { fprintf (FILE, "\t.set\tat\n"); \ } +/* Define this macro if the code for function profiling should come + before the function prologue. Normally, the profiling code comes + after. */ + +/* #define PROFILE_BEFORE_PROLOGUE */ + /* EXIT_IGNORE_STACK should be nonzero if, when returning from a function, the stack pointer does not matter. The value is tested only in functions that have frame pointers. diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index d4a26f2..1e40306 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -4003,6 +4003,18 @@ move\\t%0,%z4\\n\\ } }") +;; Block any insns from being moved before this point, since the +;; profiling call to mcount can use various registers that aren't +;; saved or used to pass arguments. + +(define_insn "blockage" + [(unspec_volatile [(const_int 0)] 0)] + "" + "" + [(set_attr "type" "unknown") + (set_attr "mode" "none") + (set_attr "length" "0")]) + ;; At present, don't expand the epilogue, reorg.c will clobber the ;; return register in compiling gen_lowpart (emit-rtl.c). ;; |