From 57bcb97aac8ba7f801c3ce18ef287ae9a4ac6ae9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 2 Sep 1999 13:01:46 -0700 Subject: [PATCH] stmt.c (expand_asm_operands): Invoke MD_ASM_CLOBBERS if present. * stmt.c (expand_asm_operands): Invoke MD_ASM_CLOBBERS if present. * tm.texi (MD_ASM_CLOBBERS): Document it. From-SVN: r29064 --- gcc/ChangeLog | 25 +++++++++++++++++++++++++ gcc/stmt.c | 8 ++++++++ gcc/tm.texi | 5 +++++ 3 files changed, 38 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6a4fbea092cf..e73dd7dc76fd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,28 @@ +Thu Sep 2 13:00:48 1999 Richard Henderson + + * stmt.c (expand_asm_operands): Invoke MD_ASM_CLOBBERS if present. + * tm.texi (MD_ASM_CLOBBERS): Document it. + +Thu Sep 2 10:22:40 1999 Richard Henderson + + * dwarf2out.c (dwarf2out_line): Constify `lastfile'. + * except.c (expand_rethrow): Remove unused variable. + * expr.c (do_jump_by_parts_greater_rtx): Likewise. + * flow.c (replace_insns): Likewise. + (create_edge_list, verify_edge_list): Likewise. + * gcse.c (cprop_cc0_jump): Protect declaration with HAVE_cc0. + + * genemit.c (gen_expand): Only emit `operands[N]' decl if there + is special code to run. + (main): Don't define operands to emit_operand. + * genrecog.c (main): Don't emit an empty peephole2_insn function. + + * rtl.h (NOTE_BASIC_BLOCK): Use X0BBDEF. + + * alpha/alpha.h (normal_memory_operand): Declare. + (reg_no_subreg_operand): Declare. + * alpha/elf.h (ASM_DECLARE_OBJECT_NAME): Use HOST_WIDE_INT_PRINT_DEC. + Thu Sep 2 10:19:20 1999 Richard Henderson * c-parse.in (compstmt_primary_start): New, broken out of first diff --git a/gcc/stmt.c b/gcc/stmt.c index 97afc4e7c65c..f0548b494edb 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1153,6 +1153,14 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) return; } +#ifdef MD_ASM_CLOBBERS + /* Sometimes we wish to automatically clobber registers across an asm. + Case in point is when the i386 backend moved from cc0 to a hard reg -- + maintaining source-level compatability means automatically clobbering + the flags register. */ + MD_ASM_CLOBBERS (clobbers); +#endif + /* Count the number of meaningful clobbered registers, ignoring what we would ignore later. */ nclobbers = 0; diff --git a/gcc/tm.texi b/gcc/tm.texi index 8375908b10c1..eab7b2e4a0bb 100644 --- a/gcc/tm.texi +++ b/gcc/tm.texi @@ -7713,6 +7713,11 @@ unit may not be bound to undefined symbols in another translation unit without user intervention. For instance, under Microsoft Windows symbols must be explicitly imported from shared libraries (DLLs). +@findex MD_ASM_CLOBBERS +@item MD_ASM_CLOBBERS +A C statement that adds to @var{CLOBBERS} @code{STRING_CST} trees for +any hard regs the port wishes to automatically clobber for all asms. + @findex ISSUE_RATE @item ISSUE_RATE A C expression that returns how many instructions can be issued at the