rs6000.c (rs6000_stack_info): Use if == 0 for sizes.
authorDavid Edelsohn <edelsohn@mhpcc.edu>
Sun, 16 Aug 1998 11:07:25 +0000 (11:07 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Sun, 16 Aug 1998 11:07:25 +0000 (07:07 -0400)
        * rs6000.c (rs6000_stack_info): Use if == 0 for sizes.
        (output_epilog): Use if != 0 for offset.
        (rs6000_fatal_bad_address): Prepare for Intl.
        * rs6000.h (rs6000_fatal_bad_address): Declare.
        * rs6000.md (movsfcc, movdfcc): Use else if.
        (elf_high): Use {liu|lis}.
        (elf_low): Use {cal|la}.  Remove %a template from old mnemonics.
        (movsi): Use rs6000_fatal_bad_address.

From-SVN: r21766

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/rs6000.md

index f4f8a32615ab5cdf25546063243aa57977799d02..8f7fbfeb1e6950eef52a52f8cfd7b69e6953437b 100644 (file)
@@ -1,3 +1,14 @@
+Sun Aug 16 13:52:00 1998  David Edelsohn  <edelsohn@mhpcc.edu>
+
+       * rs6000.c (rs6000_stack_info): Use if == 0 for sizes.
+       (output_epilog): Use if != 0 for offset.
+       (rs6000_fatal_bad_address): Prepare for Intl.
+       * rs6000.h (rs6000_fatal_bad_address): Declare.
+       * rs6000.md (movsfcc, movdfcc): Use else if.
+       (elf_high): Use {liu|lis}.
+       (elf_low): Use {cal|la}.  Remove %a template from old mnemonics.
+       (movsi): Use rs6000_fatal_bad_address.
+       
 Sun Aug 16 01:53:21 1998  Richard Henderson  <rth@cygnus.com>
 
        * reload.c (find_equiv_reg): Reject equivalences separated
index b23923bc91b4396a734fca92145b5f86c1efd1b1..cb40c184365113257010294ec4dc18bb0320ed2c 100644 (file)
@@ -3520,10 +3520,10 @@ rs6000_stack_info ()
     info_ptr->fpmem_offset = 0;  
 
   /* Zero offsets if we're not saving those registers */
-  if (!info_ptr->fp_size)
+  if (info_ptr->fp_size == 0)
     info_ptr->fp_save_offset = 0;
 
-  if (!info_ptr->gp_size)
+  if (info_ptr->gp_size == 0)
     info_ptr->gp_save_offset = 0;
 
   if (!info_ptr->lr_save_p)
@@ -4148,8 +4148,9 @@ output_epilog (file, size)
                     + (regs_ever_live[71] != 0) * 0x10
                     + (regs_ever_live[72] != 0) * 0x8, reg_names[12]);
 
-      /* If this is V.4, unwind the stack pointer after all of the loads have been done */
-      if (sp_offset)
+      /* If this is V.4, unwind the stack pointer after all of the loads
+        have been done */
+      if (sp_offset != 0)
        asm_fprintf (file, "\t{cal|la} %s,%d(%s)\n",
                     reg_names[1], sp_offset, reg_names[1]);
       else if (sp_reg != 1)
@@ -5285,3 +5286,10 @@ rs6000_encode_section_info (decl)
 }
 
 #endif /* USING_SVR4_H */
+\f
+void
+rs6000_fatal_bad_address (op)
+  rtx op;
+{
+  fatal_insn ("bad address", op);
+}
index 6aa8256a0739d984fa8762ea57b941b24692b82d..ae38d9972658856de18b1d5ae7279da61ac7b24e 100644 (file)
@@ -3260,6 +3260,7 @@ extern struct rtx_def *rs6000_longcall_ref ();
 extern int function_arg_padding ();
 extern void toc_section ();
 extern void private_data_section ();
+extern void rs6000_fatal_bad_address ();
 
 /* See nonlocal_goto_receiver for when this must be set.  */
 
index d203e49b7509f774e25d15a98efbe1a8231ee38c..eb46a0fe16924a984d846857f534d2f3b4f5281e 100644 (file)
          emit_insn (gen_negdf2 (temp, temp));
          emit_insn (gen_fseldfsf4 (operands[0], temp, operands[0], operands[3]));
        }
-      if (code == NE)
+      else if (code == NE)
        {
          emit_insn (gen_negdf2 (temp, temp));
          emit_insn (gen_fseldfsf4 (operands[0], temp, operands[3], operands[0]));
          emit_insn (gen_negsf2 (temp, temp));
          emit_insn (gen_fselsfsf4 (operands[0], temp, operands[0], operands[3]));
        }
-      if (code == NE)
+      else if (code == NE)
        {
          emit_insn (gen_negsf2 (temp, temp));
          emit_insn (gen_fselsfsf4 (operands[0], temp, operands[3], operands[0]));
          emit_insn (gen_negdf2 (temp, temp));
          emit_insn (gen_fseldfdf4 (operands[0], temp, operands[0], operands[3]));
        }
-      if (code == NE)
+      else if (code == NE)
        {
          emit_insn (gen_negdf2 (temp, temp));
          emit_insn (gen_fseldfdf4 (operands[0], temp, operands[3], operands[0]));
          emit_insn (gen_negsf2 (temp, temp));
          emit_insn (gen_fselsfdf4 (operands[0], temp, operands[0], operands[3]));
        }
-      if (code == NE)
+      else if (code == NE)
        {
          emit_insn (gen_negsf2 (temp, temp));
          emit_insn (gen_fselsfdf4 (operands[0], temp, operands[3], operands[0]));
   [(set (match_operand:SI 0 "register_operand" "=b")
        (high:SI (match_operand 1 "" "")))]
   "TARGET_ELF && !TARGET_64BIT"
-  "{cau|addis} %0,0,%1@ha")
+  "{liu|lis} %0,%1@ha")
 
 (define_insn "elf_low"
   [(set (match_operand:SI 0 "register_operand" "=r")
        (lo_sum:SI (match_operand:SI 1 "register_operand" "b")
                   (match_operand 2 "" "")))]
    "TARGET_ELF && !TARGET_64BIT"
-   "{cal %0,%a2@l(%1)|addi %0,%1,%2@l}")
+   "{cal|la} %0,%2@l(%1)")
 
 ;; Set up a register with a value from the GOT table
 
          DONE;
        }
       else
-       fatal_insn (\"bad address\", operands[1]);
+       rs6000_fatal_bad_address (operands[1]);
     }
 
   if ((!TARGET_WINDOWS_NT || DEFAULT_ABI != ABI_NT)
   switch (which_alternative)
     {
     default:
-      abort();
+      abort ();
     case 0:
       /* We normally copy the low-numbered register first.  However, if
         the first register operand 0 is the same as the second register of
   switch (which_alternative)
     {
     default:
-      abort();
+      abort ();
     case 0:
       /* We normally copy the low-numbered register first.  However, if
         the first register operand 0 is the same as the second register of
   switch (which_alternative)
     {
     default:
-      abort();
+      abort ();
     case 0:
       /* We normally copy the low-numbered register first.  However, if
         the first register operand 0 is the same as the second register of
   switch (which_alternative)
     {
     default:
-      abort();
+      abort ();
     case 0:
       /* We normally copy the low-numbered register first.  However, if
         the first register operand 0 is the same as the second register of