This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: remove more if (0) code


This patch takes care of the last of the instances of if (0 && ...) I
found in  various backends (alpha, i386, v850).

Okay for mainline?

2008-04-01  Ben Elliston  <bje@au.ibm.com>

        * config/v850/v850.md (casesi): Remove if (0) code.
        * config/i386/uwin.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
        * config/alpha/alpha.c (alpha_initialize_trampoline): Likewise.

Index: config/v850/v850.md
===================================================================
--- config/v850/v850.md (revision 133782)
+++ config/v850/v850.md (working copy)
@@ -1250,14 +1250,6 @@ (define_expand "casesi"
   /* Branch to the default label if out of range of the table.  */
   emit_jump_insn (gen_bgtu (operands[4]));
 
-  /* Disabled because the switch pattern is not being recognized
-     properly at the moment.  eg. compiling vfscanf.c in newlib.  */
-  if (0 && ! TARGET_BIG_SWITCH && TARGET_V850E)
-    {
-      emit_jump_insn (gen_switch (reg, operands[3]));
-      DONE;
-    }
-
   /* Shift index for the table array access.  */
   emit_insn (gen_ashlsi3 (reg, reg, GEN_INT (TARGET_BIG_SWITCH ? 2 : 1)));
   /* Load the table address into a pseudo.  */
Index: config/i386/uwin.h
===================================================================
--- config/i386/uwin.h  (revision 133782)
+++ config/i386/uwin.h  (working copy)
@@ -77,10 +77,6 @@ along with GCC; see the file COPYING3.  
   do                                                                   \
     {                                                                  \
       i386_pe_maybe_record_exported_symbol (DECL, NAME, 0);            \
-      /* UWIN binutils bug workaround.  */                             \
-      if (0 && write_symbols != SDB_DEBUG)                             \
-       i386_pe_declare_function_type (FILE, NAME, TREE_PUBLIC (DECL)); \
-      ASM_OUTPUT_LABEL (FILE, NAME);                                   \
     }                                                                  \
   while (0)
 
Index: config/alpha/alpha.c
===================================================================
--- config/alpha/alpha.c        (revision 133782)
+++ config/alpha/alpha.c        (working copy)
@@ -5464,28 +5464,6 @@ alpha_initialize_trampoline (rtx tramp, 
   addr = memory_address (mode, plus_constant (tramp, cxtofs));
   emit_move_insn (gen_rtx_MEM (mode, addr), cxt);
 
-  /* This has been disabled since the hint only has a 32k range, and in
-     no existing OS is the stack within 32k of the text segment.  */
-  if (0 && jmpofs >= 0)
-    {
-      /* Compute hint value.  */
-      temp = force_operand (plus_constant (tramp, jmpofs+4), NULL_RTX);
-      temp = expand_binop (DImode, sub_optab, fnaddr, temp, temp, 1,
-                          OPTAB_WIDEN);
-      temp = expand_shift (RSHIFT_EXPR, Pmode, temp,
-                          build_int_cst (NULL_TREE, 2), NULL_RTX, 1);
-      temp = expand_and (SImode, gen_lowpart (SImode, temp),
-                        GEN_INT (0x3fff), 0);
-
-      /* Merge in the hint.  */
-      addr = memory_address (SImode, plus_constant (tramp, jmpofs));
-      temp1 = force_reg (SImode, gen_rtx_MEM (SImode, addr));
-      temp1 = expand_and (SImode, temp1, GEN_INT (0xffffc000), NULL_RTX);
-      temp1 = expand_binop (SImode, ior_optab, temp1, temp, temp1, 1,
-                           OPTAB_WIDEN);
-      emit_move_insn (gen_rtx_MEM (SImode, addr), temp1);
-    }
-
 #ifdef ENABLE_EXECUTE_STACK
   emit_library_call (init_one_libfunc ("__enable_execute_stack"),
                     0, VOIDmode, 1, tramp, Pmode);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]