OSDN Git Service

* config/s390/s390.c (s390_safe_attr_type): New function.
authorhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jan 2003 10:38:01 +0000 (10:38 +0000)
committerhpenner <hpenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Jan 2003 10:38:01 +0000 (10:38 +0000)
        (s390_use_dfa_pipeline_interface): New function, return true for z900.
        (s390_issue_rate): New function.
        (s390_agen_dep_p): New function.
        (addr_generation_dependency_p): Use 's390_safe_attr_type'.
        (s390_adjust_cost): Return 'cost' if new DFA is used.
        (s390_adjust_priority): Delete function.
        * config/s390/s390-protos.h: (s390_agen_dep_p): New prototype.
        * config/s390/s390.md (atype attribute): Attribute 'atype' default
        determined by 'op_type'.
        (type attribute): Added more type attributes.
        * config/s390/2064.md: New DFA description for z900 pipeline.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61321 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/s390/2064.md [new file with mode: 0644]
gcc/config/s390/s390-protos.h
gcc/config/s390/s390.c
gcc/config/s390/s390.md

index f3184bd..224f08d 100644 (file)
@@ -1,8 +1,20 @@
+2003-01-15  Hartmut Penner  <hpenner@de.ibm.com>
+
+       * config/s390/s390.c (s390_safe_attr_type): New function.
+       (s390_use_dfa_pipeline_interface): New function, return true for z900.
+       (s390_issue_rate): New function.
+       (s390_agen_dep_p): New function.
+       (addr_generation_dependency_p): Use 's390_safe_attr_type'.
+       (s390_adjust_cost): Return 'cost' if new DFA is used.
+       (s390_adjust_priority): Delete function.
+       * config/s390/s390-protos.h: (s390_agen_dep_p): New prototype.
+       * config/s390/s390.md (atype attribute): Attribute 'atype' default
+       determined by 'op_type'.
+       (type attribute): Added more type attributes.
+       * config/s390/2064.md: New DFA description for z900 pipeline.
+       
 2003-01-15  Alexandre Oliva  <aoliva@redhat.com>
 
-       * config/i386/i386.c (ix86_expand_vector_move): Validize constant
-       forced to memory.  Fixes PR bootstrap/9036.
-
        * config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Define so as
        to set $gp before the call.
 
diff --git a/gcc/config/s390/2064.md b/gcc/config/s390/2064.md
new file mode 100644 (file)
index 0000000..a4296c0
--- /dev/null
@@ -0,0 +1,131 @@
+;; Scheduling description for z900 (cpu 2064).
+;;   Copyright (C) 2002 Free Software Foundation, Inc.
+;;   Contributed by Hartmut Penner (hpenner@de.ibm.com) and
+;;                  Ulrich Weigand (uweigand@de.ibm.com).
+;;
+;; This file is part of GNU CC.
+;;
+;; GNU CC is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+;;
+;; GNU CC is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU CC; see the file COPYING.  If not, write to
+;; the Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;
+;; References:
+;;   The microarchitecture of the IBM eServer z900 processor. 
+;;   E.M. Schwarz et al.
+;;   IBM Journal of Research and Development Vol. 46 No 4/5, 2002.
+;; 
+;;            z900 (cpu 2064) pipeline
+;;     
+;;                 dec
+;;              --> | <---
+;;  LA bypass  |  agen    |
+;;             |    |     | 
+;;              --- c1    |  Load bypass
+;;                  |     | 
+;;                  c2----
+;;                  |
+;;                  e1 
+;;                  | 
+;;                  wr
+
+(define_automaton "z_ipu")
+(define_cpu_unit "z_e1"   "z_ipu")
+(define_cpu_unit "z_wr"   "z_ipu")
+
+
+(define_insn_reservation "z_la" 1 
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "la"))
+  "z_e1,z_wr")
+
+(define_insn_reservation "z_larl" 1 
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "larl"))
+  "z_e1,z_wr")
+
+(define_insn_reservation "z_load" 1
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "load"))
+  "z_e1,z_wr")
+
+(define_insn_reservation "z_store" 1
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "store"))
+  "z_e1,z_wr")
+
+(define_insn_reservation "z_call" 5
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "jsr"))
+  "z_e1*5,z_wr")
+
+(define_insn_reservation "z_o2" 2
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "o2"))
+  "z_e1*2,z_wr")
+
+(define_insn_reservation "z_o3" 3
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "type" "o3"))
+  "z_e1*3,z_wr")
+
+;
+; Insn still not mentioned are check for
+; the usage of the agen unit 
+;
+
+(define_insn_reservation "z_int" 1
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "atype" "reg"))
+  "z_e1,z_wr")
+
+(define_insn_reservation "z_agen" 1
+  (and (eq_attr "cpu" "z900")
+       (eq_attr "atype" "agen"))
+  "z_e1,z_wr")
+
+
+;;
+;; s390_agen_dep_p returns 1, if a register is set in the 
+;; first insn and used in the dependend insn to form a address.
+;;
+
+;;
+;; If a intruction uses a register to address memory, it needs
+;; to be set 5 cycles in advance.
+;; 
+
+(define_bypass 5 "z_int,z_agen" 
+              "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+;;
+;; A load type instruction uses a bypass to feed the result back       
+;; to the address generation pipeline stage. 
+;;
+
+(define_bypass 2 "z_load"    
+                "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+;;
+;; A load address type instruction uses a bypass to feed the 
+;; result back to the address generation pipeline stage. 
+;;
+
+(define_bypass 1 "z_larl,z_la" 
+                "z_agen,z_la,z_call,z_load,z_store" "s390_agen_dep_p")
+
+
+
+
+
index deecef6..6416809 100644 (file)
@@ -76,6 +76,8 @@ extern void s390_initialize_trampoline PARAMS ((rtx, rtx, rtx));
 extern rtx s390_gen_rtx_const_DI PARAMS ((int, int));
 extern rtx s390_simplify_dwarf_addr PARAMS ((rtx));
 extern void s390_machine_dependent_reorg PARAMS ((rtx));
+extern int s390_agen_dep_p PARAMS ((rtx, rtx));
+
 #endif /* RTX_CODE */
 
 #ifdef TREE_CODE
index 25956ec..c80bcc8 100644 (file)
@@ -51,13 +51,17 @@ Boston, MA 02111-1307, USA.  */
 #include "optabs.h"
 
 static bool s390_assemble_integer PARAMS ((rtx, unsigned int, int));
-static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int));
-static int s390_adjust_priority PARAMS ((rtx, int));
 static void s390_select_rtx_section PARAMS ((enum machine_mode, rtx, 
                                             unsigned HOST_WIDE_INT));
 static void s390_encode_section_info PARAMS ((tree, int));
 static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
                                          HOST_WIDE_INT, tree));
+static enum attr_type s390_safe_attr_type PARAMS ((rtx));
+
+static int s390_adjust_cost PARAMS ((rtx, rtx, rtx, int));
+static int s390_issue_rate PARAMS ((void));
+static int s390_use_dfa_pipeline_interface PARAMS ((void));
+
 
 #undef  TARGET_ASM_ALIGNED_HI_OP
 #define TARGET_ASM_ALIGNED_HI_OP "\t.word\t"
@@ -75,12 +79,6 @@ static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
 #undef TARGET_ASM_SELECT_RTX_SECTION
 #define        TARGET_ASM_SELECT_RTX_SECTION  s390_select_rtx_section
 
-#undef  TARGET_SCHED_ADJUST_COST
-#define TARGET_SCHED_ADJUST_COST s390_adjust_cost
-
-#undef  TARGET_SCHED_ADJUST_PRIORITY
-#define TARGET_SCHED_ADJUST_PRIORITY s390_adjust_priority
-
 #undef TARGET_ENCODE_SECTION_INFO
 #define TARGET_ENCODE_SECTION_INFO s390_encode_section_info
 
@@ -89,6 +87,14 @@ static void s390_output_mi_thunk PARAMS ((FILE *, tree, HOST_WIDE_INT,
 #undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
 #define TARGET_ASM_CAN_OUTPUT_MI_THUNK hook_bool_tree_hwi_hwi_tree_true
 
+#undef  TARGET_SCHED_ADJUST_COST
+#define TARGET_SCHED_ADJUST_COST s390_adjust_cost
+#undef TARGET_SCHED_ISSUE_RATE
+#define TARGET_SCHED_ISSUE_RATE s390_issue_rate
+#undef TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE
+#define TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE s390_use_dfa_pipeline_interface
+
+
 struct gcc_target targetm = TARGET_INITIALIZER;
 
 extern int reload_completed;
@@ -936,6 +942,17 @@ const enum reg_class regclass_map[FIRST_PSEUDO_REGISTER] =
   ADDR_REGS,    NO_REGS,   ADDR_REGS 
 };
 
+/* Return attribute type of insn.  */
+
+static enum attr_type
+s390_safe_attr_type (insn)
+     rtx insn;
+{
+  if (recog_memoized (insn) >= 0)
+    return get_attr_type (insn);
+  else
+    return TYPE_NONE;
+}
 
 /* Return true if OP a (const_int 0) operand.
    OP is the current operation.
@@ -2892,9 +2909,6 @@ s390_assemble_integer (x, size, aligned_p)
   return default_assemble_integer (x, size, aligned_p);
 }
 
-
-#define DEBUG_SCHED 0
-
 /* Returns true if register REGNO is used  for forming 
    a memory address in expression X.  */
 
@@ -2946,6 +2960,9 @@ addr_generation_dependency_p (dep_rtx, insn)
 {
   rtx target, pat;
 
+  if (GET_CODE (dep_rtx) == INSN)
+      dep_rtx = PATTERN (dep_rtx);
+
   if (GET_CODE (dep_rtx) == SET)
     {
       target = SET_DEST (dep_rtx);
@@ -2958,7 +2975,7 @@ addr_generation_dependency_p (dep_rtx, insn)
        {
          int regno = REGNO (target);
 
-         if (get_attr_type (insn) == TYPE_LA)
+         if (s390_safe_attr_type (insn) == TYPE_LA)
            {
              pat = PATTERN (insn);
              if (GET_CODE (pat) == PARALLEL)
@@ -2972,13 +2989,38 @@ addr_generation_dependency_p (dep_rtx, insn)
              else
                abort();
            }
-         else if (get_attr_atype (insn) == ATYPE_MEM)
+         else if (get_attr_atype (insn) == ATYPE_AGEN)
            return reg_used_in_mem_p (regno, PATTERN (insn));
        }
     }
   return 0;
 }
 
+/* Return 1, if dep_insn sets register used in insn in the agen unit.  */
+
+
+int 
+s390_agen_dep_p(dep_insn, insn)
+     rtx dep_insn;
+     rtx insn;
+{ 
+  rtx dep_rtx = PATTERN (dep_insn);
+  int i;
+  
+  if (GET_CODE (dep_rtx) == SET  
+      && addr_generation_dependency_p (dep_rtx, insn))
+    return 1;
+  else if (GET_CODE (dep_rtx) == PARALLEL)
+    {
+      for (i = 0; i < XVECLEN (dep_rtx, 0); i++)
+       {
+         if (addr_generation_dependency_p (XVECEXP (dep_rtx, 0, i), insn))
+           return 1;
+       }
+    }
+  return 0;
+}
+
 
 /* Return the modified cost of the dependency of instruction INSN
    on instruction DEP_INSN through the link LINK.  COST is the 
@@ -3012,88 +3054,47 @@ s390_adjust_cost (insn, link, dep_insn, cost)
   if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0)
     return cost;
 
+  /* DFA based scheduling checks address dependency in md file.  */
+  if (s390_use_dfa_pipeline_interface ())
+     return cost;
+
   dep_rtx = PATTERN (dep_insn);
 
-  if (GET_CODE (dep_rtx) == SET)
-    {
-      if (addr_generation_dependency_p (dep_rtx, insn))
-       {
-         cost += (get_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;  
-         if (DEBUG_SCHED)
-           {
-             fprintf (stderr, "\n\nAddress dependency detected: cost %d\n",
-                      cost);
-             debug_rtx (dep_insn);
-             debug_rtx (insn);
-           }
-       }
-    }
+  if (GET_CODE (dep_rtx) == SET 
+      && addr_generation_dependency_p (dep_rtx, insn))
+    cost += (s390_safe_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;  
   else if (GET_CODE (dep_rtx) == PARALLEL)
     {
       for (i = 0; i < XVECLEN (dep_rtx, 0); i++)
        {
-         if (addr_generation_dependency_p (XVECEXP (dep_rtx, 0, i),
-                                           insn))
-           {
-             cost += (get_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;  
-             if (DEBUG_SCHED)
-               {
-                 fprintf (stderr, "\n\nAddress dependency detected: cost %d\n"
-                          ,cost);
-                 debug_rtx (dep_insn);
-                 debug_rtx (insn);
-               }
-           }
+         if (addr_generation_dependency_p (XVECEXP (dep_rtx, 0, i), insn))
+           cost += (s390_safe_attr_type (dep_insn) == TYPE_LA) ? 1 : 4;  
        }
     }
 
   return cost;
 }
 
+/* The number of instructions that can be issued per cycle.  */
 
-/* A C statement (sans semicolon) to update the integer scheduling priority
-   INSN_PRIORITY (INSN).  Reduce the priority to execute the INSN earlier,
-   increase the priority to execute INSN later.  Do not define this macro if
-   you do not need to adjust the scheduling priorities of insns. 
+static int
+s390_issue_rate ()
+{
+  return 1;
+}
 
-   A LA instruction maybe scheduled later, since the pipeline bypasses the
-   calculated value.  */
+/* If the following function returns TRUE, we will use the the DFA
+   insn scheduler.  */
 
 static int
-s390_adjust_priority (insn, priority)
-     rtx insn ATTRIBUTE_UNUSED;
-     int priority;
+s390_use_dfa_pipeline_interface ()
 {
-  if (! INSN_P (insn))
-    return priority;
+  if (s390_cpu == PROCESSOR_2064_Z900)
+    return 1;
+  return 0;
 
-  if (GET_CODE (PATTERN (insn)) == USE 
-      || GET_CODE (PATTERN (insn)) == CLOBBER)
-    return priority;
-  
-  switch (get_attr_type (insn))
-    {
-    default:
-      break;
-      
-    case TYPE_LA:
-      if (priority >= 0 && priority < 0x01000000)
-       priority <<= 3;
-      break;
-    case TYPE_LM:
-      /* LM in epilogue should never be scheduled. This
-        is due to literal access done in function body.
-        The usage of register 13 is not mentioned explicitly,
-        leading to scheduling 'LM' accross this instructions.  
-      */ 
-      priority = 0x7fffffff;
-      break;
-    }
-  
-  return priority;
 }
 
-
 /* Split all branches that exceed the maximum distance.  
    Returns true if this created a new literal pool entry.  
 
index 7490fab..480d152 100644 (file)
@@ -3,7 +3,7 @@
 ;;  Contributed by Hartmut Penner (hpenner@de.ibm.com) and
 ;;                 Ulrich Weigand (uweigand@de.ibm.com).
 ;; This file is part of GNU CC.
-
 ;; GNU CC is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 2, or (at your option)
 ;; Define an insn type attribute.  This is used in function unit delay
 ;; computations.
 
-(define_attr "type" "none,integer,load,lr,la,lm,stm,cs,vs,store,imul,lmul,fmul,idiv,ldiv,fdiv,branch,jsr,other,o2,o3"
-  (const_string "integer"))
+(define_attr "type" "none,integer,load,lr,la,larl,lm,stm,
+                    cs,vs,store,imul,idiv,
+                    branch,jsr,fsimpd,fsimps,
+                    floadd,floads,fstored, fstores,
+                    fmuld,fmuls,fdivd,fdivs,
+                    ftoi,itof,fsqrtd,fsqrts,
+                     other,o2,o3"
+  (const_string "integer")) 
 
-;; Insn are devide in two classes:
-;;   mem: Insn accessing memory
-;;   reg: Insn operands all in registers
+;; Operand type. Used to default length attribute values
 
-(define_attr "atype" "reg,mem"
-  (const_string "reg"))
+(define_attr "op_type"
+  "NN,E,RR,RRE,RX,RS,RSI,RI,SI,S,SS,SSE,RXE,RSE,RIL,RIE"
+  (const_string "RX"))
+
+;; Insn are devide in two classes:
+;;   agen: Insn using agen
+;;   reg: Insn not using agen
+
+(define_attr "atype" "agen,reg"
+(cond [ (eq_attr "op_type" "E")    (const_string "reg")
+         (eq_attr "op_type" "RR")  (const_string "reg")
+         (eq_attr "op_type" "RX")  (const_string "agen")
+         (eq_attr "op_type" "RI")  (const_string "reg")
+         (eq_attr "op_type" "RRE") (const_string "reg")
+         (eq_attr "op_type" "RS")  (const_string "agen")
+         (eq_attr "op_type" "RSI") (const_string "agen")
+         (eq_attr "op_type" "S")   (const_string "agen")
+         (eq_attr "op_type" "SI")  (const_string "agen")
+         (eq_attr "op_type" "SS")  (const_string "agen")
+         (eq_attr "op_type" "SSE") (const_string "agen")
+         (eq_attr "op_type" "RXE") (const_string "agen")
+         (eq_attr "op_type" "RSE") (const_string "agen")
+         (eq_attr "op_type" "RIL") (const_string "agen")]
+  (const_string "reg")))
 
 ;; Generic pipeline function unit.  
 
   (eq_attr "type" "integer") 1 1)
 
 (define_function_unit "integer" 1 0
+  (eq_attr "type" "fsimpd") 1 1)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fsimps") 1 1)
+
+(define_function_unit "integer" 1 0
   (eq_attr "type" "load") 1 1)
 
 (define_function_unit "integer" 1 0
+  (eq_attr "type" "floadd") 1 1)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "floads") 1 1)
+
+(define_function_unit "integer" 1 0
   (eq_attr "type" "la") 1 1)
 
 (define_function_unit "integer" 1 0
+  (eq_attr "type" "larl") 1 1)
+
+(define_function_unit "integer" 1 0
   (eq_attr "type" "lr") 1 1)
 
 (define_function_unit "integer" 1 0
+  (eq_attr "type" "branch") 1 1)
+
+(define_function_unit "integer" 1 0
   (eq_attr "type" "store") 1 1)
 
 (define_function_unit "integer" 1 0
+  (eq_attr "type" "fstored") 1 1)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fstores") 1 1)
+
+(define_function_unit "integer" 1 0
   (eq_attr "type" "lm") 2 2)
 
 (define_function_unit "integer" 1 0
   (eq_attr "type" "imul") 7 7)
 
 (define_function_unit "integer" 1 0
-  (eq_attr "type" "fmul") 6 6)
+  (eq_attr "type" "fmuld") 6 6)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fmuls") 6 6)
 
 (define_function_unit "integer" 1 0
   (eq_attr "type" "idiv") 33 33)
 
 (define_function_unit "integer" 1 0
-  (eq_attr "type" "fdiv") 33 33)
+  (eq_attr "type" "fdivd") 33 33)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fdivs") 33 33)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fsqrtd") 30 30)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "fsqrts") 30 30)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "ftoi") 2 2)
+
+(define_function_unit "integer" 1 0
+  (eq_attr "type" "itof") 2 2)
 
 (define_function_unit "integer" 1 0
   (eq_attr "type" "o2") 2 2)
 (define_function_unit "integer" 1 0
   (eq_attr "type" "other") 5 5)
 
-;; Operand type. Used to default length attribute values
+;; Pipeline description for z900
 
-(define_attr "op_type"
-  "NN,E,RR,RRE,RX,RS,RSI,RI,SI,S,SS,SSE,RXE,RSE,RIL,RIE"
-  (const_string "RX"))
+(include "2064.md")
 
 ;; Length in bytes.
 
          (eq_attr "op_type" "RRE") (const_int 4)
          (eq_attr "op_type" "RS")  (const_int 4)
          (eq_attr "op_type" "RSI") (const_int 4)
-         (eq_attr "op_type" "RX")  (const_int 4)
          (eq_attr "op_type" "S")   (const_int 4)
          (eq_attr "op_type" "SI")  (const_int 4)
          (eq_attr "op_type" "SS")  (const_int 6)
   operands[2] = GEN_INT (block << shift);
   return \"tm\\t%0,%b2\";
 }"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 ; Test-under-Mask instructions
 
                             plus_constant (XEXP (operands[0], 0), part));
   return \"tm\\t%0,%b1\";
 }"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 (define_insn "*tmsi_mem"
   [(set (reg 33)
                             plus_constant (XEXP (operands[0], 0), part));
   return \"tm\\t%0,%b1\";
 }"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 (define_insn "*tmhi_mem"
   [(set (reg 33)
                             plus_constant (XEXP (operands[0], 0), part));
   return \"tm\\t%0,%b1\";
 }"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 (define_insn "*tmqi_mem"
   [(set (reg 33)
                  (match_operand:SI 2 "immediate_operand" "n")))]
   "s390_match_ccmode (insn, s390_tm_ccmode (operands[1], operands[2], 0))"
   "tm\\t%0,%b1"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 (define_insn "*tmdi_reg"
   [(set (reg 33)
                  (match_operand:DI 1 "const0_operand" "")))]
   "s390_match_ccmode(insn, CCSmode) && !TARGET_64BIT"
   "srda\\t%0,0"
-  [(set_attr "op_type" "RS")])
+  [(set_attr "op_type" "RS")
+   (set_attr "atype"   "reg")])
+
 
 (define_insn "*tstsi"
   [(set (reg 33)
   "@
    ltr\\t%2,%0
    icm\\t%2,15,%0"
-  [(set_attr "op_type" "RR,RS")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RR,RS")])
 
 (define_insn "*tstsi_cconly"
   [(set (reg 33)
   "@
    ltr\\t%0,%0
    icm\\t%2,15,%0"
-  [(set_attr "op_type" "RR,RS")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RR,RS")])
 
 (define_insn "*tstsi_cconly2"
   [(set (reg 33)
   "@
    icm\\t%2,3,%0
    tml\\t%0,65535"
-  [(set_attr "op_type" "RS,RI")
-   (set_attr "atype"   "mem,reg")])
+  [(set_attr "op_type" "RS,RI")])
 
 (define_insn "*tsthiCCT_cconly"
   [(set (reg 33)
   "@
    icm\\t%2,3,%0
    tml\\t%0,65535"
-  [(set_attr "op_type" "RS,RI")
-   (set_attr "atype"   "mem,reg")])
+  [(set_attr "op_type" "RS,RI")])
 
 (define_insn "*tsthi"
   [(set (reg 33)
         (match_dup 0))]
   "s390_match_ccmode(insn, CCSmode)"
   "icm\\t%2,3,%0"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*tsthi_cconly"
   [(set (reg 33)
    (clobber (match_scratch:HI 2 "=d"))]
   "s390_match_ccmode(insn, CCSmode)"
   "icm\\t%2,3,%0"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*tstqiCCT"
   [(set (reg 33)
   "@
    icm\\t%2,1,%0
    tml\\t%0,255"
-  [(set_attr "op_type" "RS,RI")
-   (set_attr "atype"   "mem,reg")])
+  [(set_attr "op_type" "RS,RI")])
 
 (define_insn "*tstqiCCT_cconly"
   [(set (reg 33)
   "@
    cli\\t%0,0
    tml\\t%0,255"
-  [(set_attr "op_type" "SI,RI")
-   (set_attr "atype"   "mem,reg")])
+  [(set_attr "op_type" "SI,RI")])
 
 (define_insn "*tstqi"
   [(set (reg 33)
         (match_dup 0))]
   "s390_match_ccmode(insn, CCSmode)"
   "icm\\t%2,1,%0"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*tstqi_cconly"
   [(set (reg 33)
    (clobber (match_scratch:QI 2 "=d"))]
   "s390_match_ccmode(insn, CCSmode)"
   "icm\\t%2,1,%0"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
-
+  [(set_attr "op_type" "RS")])
 
 ; Compare (signed) instructions
 
   "@
    cgfr\\t%0,%1
    cgf\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RRE,RXE")])
 
 (define_insn "*cmpdi_ccs"
   [(set (reg 33)
    cgr\\t%0,%1
    cghi\\t%0,%c1
    cg\\t%0,%1"
-  [(set_attr "op_type" "RRE,RI,RXE")
-   (set_attr "atype"    "reg,reg,mem")])
+  [(set_attr "op_type" "RRE,RI,RXE")])
    
 (define_insn "*cmpsi_ccs_sign"
   [(set (reg 33)
                  (match_operand:SI 0 "register_operand" "d")))]
   "s390_match_ccmode(insn, CCSRmode)"
   "ch\\t%0,%1"
-  [(set_attr "op_type" "RX")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RX")])
 
 (define_insn "*cmpsi_ccs"
   [(set (reg 33)
    cr\\t%0,%1
    chi\\t%0,%c1
    c\\t%0,%1"
-  [(set_attr "op_type" "RR,RI,RX")
-   (set_attr "atype"   "reg,reg,mem")])
+  [(set_attr "op_type" "RR,RI,RX")])
    
 
 ; Compare (unsigned) instructions
   "@
    clgfr\\t%0,%1
    clgf\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RRE,RXE")])
 
 (define_insn "*cmpdi_ccu"
   [(set (reg 33)
   "@
    clgr\\t%0,%1
    clg\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RRE,RXE")])
 
 (define_insn "*cmpsi_ccu"
   [(set (reg 33)
   "@
    clr\\t%0,%1
    cl\\t%0,%1"
-  [(set_attr "op_type" "RR,RX")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RR,RX")])
 
 (define_insn "*cmphi_ccu"
   [(set (reg 33)
                  (match_operand:HI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clm\\t%0,3,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*cmpqi_ccu"
   [(set (reg 33)
                  (match_operand:QI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clm\\t%0,1,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*cli"
   [(set (reg 33)
                  (match_operand:QI 1 "immediate_operand" "n")))]
   "s390_match_ccmode (insn, CCUmode)"
   "cli\\t%0,%b1"
-  [(set_attr "op_type" "SI")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SI")])
 
 (define_insn "*cmpdi_ccu_mem"
   [(set (reg 33)
                  (match_operand:DI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type" "SS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SS")])
 
 (define_insn "*cmpsi_ccu_mem"
   [(set (reg 33)
                  (match_operand:SI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clc\\t%O0(4,%R0),%1"
-   [(set_attr "op_type" "SS")
-    (set_attr "atype"   "mem")])
+   [(set_attr "op_type" "SS")])
 
 (define_insn "*cmphi_ccu_mem"
   [(set (reg 33)
                  (match_operand:HI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type" "SS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SS")])
 
 (define_insn "*cmpqi_ccu_mem"
   [(set (reg 33)
                  (match_operand:QI 1 "s_imm_operand" "Q")))]
   "s390_match_ccmode(insn, CCUmode)"
   "clc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type" "SS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "SS")])
 
 
 ; DF instructions
                  (match_operand:DF 1 "const0_operand" "")))]
   "s390_match_ccmode(insn, CCSmode) && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "ltdbr\\t%0,%0"
-   [(set_attr "op_type" "RRE")])
+   [(set_attr "op_type" "RRE")
+    (set_attr "type"  "fsimpd")])
 
 (define_insn "*cmpdf_ccs_0_ibm"
   [(set (reg 33)
                  (match_operand:DF 1 "const0_operand" "")))]
   "s390_match_ccmode(insn, CCSmode) && TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "ltdr\\t%0,%0"
-   [(set_attr "op_type" "RR")])
+   [(set_attr "op_type" "RR")
+    (set_attr "type"  "fsimpd")])
 
 (define_insn "*cmpdf_ccs"
   [(set (reg 33)
    cdbr\\t%0,%1
    cdb\\t%0,%1"
    [(set_attr "op_type" "RRE,RXE")
-    (set_attr "atype"   "reg,mem")])  
+    (set_attr "type"  "fsimpd")])
 
 (define_insn "*cmpdf_ccs_ibm"
   [(set (reg 33)
    cdr\\t%0,%1
    cd\\t%0,%1"
    [(set_attr "op_type" "RR,RX")
-    (set_attr "atype"   "reg,mem")])  
+    (set_attr "type"  "fsimpd")])
 
 
 ; SF instructions
                  (match_operand:SF 1 "const0_operand" "")))]
   "s390_match_ccmode(insn, CCSmode) && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "ltebr\\t%0,%0"
-   [(set_attr "op_type" "RRE")])
+   [(set_attr "op_type" "RRE")
+    (set_attr "type"  "fsimps")])
 
 (define_insn "*cmpsf_ccs_0_ibm"
   [(set (reg 33)
                  (match_operand:SF 1 "const0_operand" "")))]
   "s390_match_ccmode(insn, CCSmode) && TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "lter\\t%0,%0"
-   [(set_attr "op_type" "RR")])
+   [(set_attr "op_type" "RR")
+    (set_attr "type"  "fsimps")])
 
 (define_insn "*cmpsf_ccs"
   [(set (reg 33)
   "@
    cebr\\t%0,%1
    ceb\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+   [(set_attr "op_type" "RRE,RXE")
+    (set_attr "type"  "fsimps")])
 
 (define_insn "*cmpsf_ccs"
   [(set (reg 33)
   "@
    cer\\t%0,%1
    ce\\t%0,%1"
-  [(set_attr "op_type" "RR,RX")
-   (set_attr "atype"   "reg,mem")])
+   [(set_attr "op_type" "RR,RX")
+    (set_attr "type"  "fsimps")])
 
 
 ;;
    #
    #
    mvc\\t%O0(16,%R0),%1"
-  [(set_attr "op_type" "RSE,RSE,NN,NN,SS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RSE,RSE,NN,NN,SS")])
 
 (define_split
   [(set (match_operand:TI 0 "nonimmediate_operand" "")
    && CONST_OK_FOR_LETTER_P (INTVAL (operands[1]), 'K')
    && !FP_REG_P (operands[0])"
   "lghi\\t%0,%h1"
-  [(set_attr "op_type" "RI")
-   (set_attr "atype"   "reg")])
+  [(set_attr "op_type" "RI")])
 
 (define_insn "*movdi_lli"
   [(set (match_operand:DI 0 "register_operand" "=d")
       default: abort ();
     }
 }"
-  [(set_attr "op_type" "RI")
-   (set_attr "atype"   "reg")])
+  [(set_attr "op_type" "RI")])
 
 (define_insn "*movdi_larl"
   [(set (match_operand:DI 0 "register_operand" "=d")
    && !FP_REG_P (operands[0])"
   "larl\\t%0,%1"
    [(set_attr "op_type" "RIL")
-    (set_attr "atype"   "reg")
-    (set_attr "type"    "la")])
+    (set_attr "type"    "larl")])
 
 (define_insn "*movdi_64"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,d,m,!*f,!*f,!m,Q")
    std\\t%1,%0
    mvc\\t%O0(8,%R0),%1"
   [(set_attr "op_type" "RRE,RXE,RXE,RR,RX,RX,SS")
-   (set_attr "atype"   "reg,mem,mem,reg,mem,mem,mem")])
+   (set_attr "type" "lr,load,store,floadd,floadd,fstored,cs")])
 
 (define_insn "*movdi_31"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=d,Q,d,m,!*f,!*f,!m,Q")
    std\\t%1,%0
    mvc\\t%O0(8,%R0),%1"
   [(set_attr "op_type" "RS,RS,NN,NN,RR,RX,RX,SS")
-   (set_attr "atype"   "mem,mem,*,*,reg,mem,mem,mem")])
+   (set_attr "type" "lm,stm,*,*,floadd,floadd,fstored,cs")])
 
 (define_split
   [(set (match_operand:DI 0 "nonimmediate_operand" "")
    ste\\t%1,%0
    mvc\\t%O0(4,%R0),%1"
   [(set_attr "op_type" "RR,RX,RX,RR,RX,RX,SS")
-   (set_attr "atype"   "reg,mem,mem,reg,mem,mem,mem")])
+   (set_attr "type" "lr,load,store,floads,floads,fstores,cs")])
 
 (define_peephole2
   [(set (match_operand:SI 0 "register_operand" "")
    lh\\t%0,%1
    sth\\t%1,%0
    mvc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type" "RR,RI,RX,RX,SS")
-   (set_attr "atype"   "reg,reg,mem,mem,mem")])
+  [(set_attr "op_type" "RR,RI,RX,RX,SS")])
 
 (define_peephole2
   [(set (match_operand:HI 0 "register_operand" "")
    mvi\\t%0,%b1
    mvc\\t%O0(1,%R0),%1"
   [(set_attr "op_type" "RR,RI,RXE,RX,SI,SS")
-   (set_attr "atype"   "reg,reg,mem,mem,mem,mem")])
-
+   (set_attr "type" "lr,*,*,store,store,cs")])
 
 (define_insn "movqi"
   [(set (match_operand:QI 0 "nonimmediate_operand" "=d,d,d,m,Q,Q")
    stc\\t%1,%0
    mvi\\t%0,%b1
    mvc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type" "RR,RI,RX,RX,SI,SS")
-   (set_attr "atype"   "reg,reg,mem,mem,mem,mem")])
+  [(set_attr "op_type" "RR,RI,RX,RX,SI,SS")])
 
 (define_peephole2
   [(set (match_operand:QI 0 "nonimmediate_operand" "")
                          (match_operand:QI 1 "memory_operand" "m"))]
   ""
   "ic\\t%0,%1"
-  [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "RX")])
 
 ;
 ; movstricthi instruction pattern(s).
    (clobber (reg:CC 33))]
   ""
   "icm\\t%0,3,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 
 ;
    lr\\t%0,%1
    l\\t%0,%1"
   [(set_attr "op_type" "RR,RS")
-   (set_attr "atype"   "reg,mem")])
+   (set_attr "type" "lr,load")])
 
 
 ;
    stg\\t%1,%0
    mvc\\t%O0(8,%R0),%1"
   [(set_attr "op_type" "RR,RX,RX,RRE,RXE,RXE,SS")
-   (set_attr "atype"   "reg,mem,mem,reg,mem,mem,mem")])
+   (set_attr "type" "floadd,floadd,fstored,lr,load,store,cs")])
 
 (define_insn "*movdf_31"
   [(set (match_operand:DF 0 "nonimmediate_operand" "=f,f,m,d,Q,d,m,Q")
    #
    mvc\\t%O0(8,%R0),%1"
   [(set_attr "op_type" "RR,RX,RX,RS,RS,NN,NN,SS")
-   (set_attr "atype"   "reg,mem,mem,mem,mem,*,*,mem")])
+   (set_attr "type" "floadd,floadd,fstored,lm,stm,*,*,cs")])
 
 (define_split
   [(set (match_operand:DF 0 "nonimmediate_operand" "")
    st\\t%1,%0
    mvc\\t%O0(4,%R0),%1"
   [(set_attr "op_type" "RR,RX,RX,RR,RX,RX,SS")
-   (set_attr "atype"   "reg,mem,mem,reg,mem,mem,mem")])
+   (set_attr "type" "floads,floads,fstores,lr,load,store,cs")])
 
 ;
 ; load_multiple pattern(s).
     return \"lmg\\t%1,%0,%2\";
 }"
    [(set_attr "op_type" "RXE")
-    (set_attr "atype"   "mem")
     (set_attr "type"    "lm")])
 
 (define_insn "*load_multiple_si"
     return \"lm\\t%1,%0,%2\";
 }"
    [(set_attr "op_type" "RXE")
-    (set_attr "atype"   "mem")
     (set_attr "type"    "lm")])
 
 ;
     return \"stmg\\t%2,%0,%1\";
 }"
    [(set_attr "op_type" "RXE")
-    (set_attr "atype"   "mem")
     (set_attr "type"    "stm")])
 
 
     return \"stm\\t%2,%0,%1\";
 }"
    [(set_attr "op_type" "RXE")
-    (set_attr "atype"   "mem")
     (set_attr "type"    "stm")])
 
 ;;
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 (define_insn "movstr_short_31"
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 ; Move a block of arbitrary length.
   "mvcle\\t%0,%1,0\;jo\\t.-4"
   [(set_attr "op_type" "NN")
    (set_attr "type"    "vs")
-   (set_attr "atype"   "mem")
    (set_attr "length"  "8")])
 
 (define_insn "movstr_long_31"
   "mvcle\\t%0,%1,0\;jo\\t.-4"
   [(set_attr "op_type" "NN")
    (set_attr "type"    "vs")
-   (set_attr "atype"   "mem")
    (set_attr "length"  "8")])
 
 ;
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 (define_insn "clrstr_short_31"
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 ; Clear a block of arbitrary length.
   "TARGET_64BIT"
   "mvcle\\t%0,%1,0\;jo\\t.-4"
   [(set_attr "op_type" "NN")
-   (set_attr "atype"   "mem")
    (set_attr "type"    "vs")
    (set_attr "length"  "8")])
 
   "!TARGET_64BIT"
   "mvcle\\t%0,%1,0\;jo\\t.-4"
   [(set_attr "op_type" "NN")
-   (set_attr "atype"   "mem")
    (set_attr "type"    "vs")
    (set_attr "length"  "8")])
 
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 (define_insn "cmpstr_short_31"
 }"
   [(set_attr "op_type" "SS,NN")
    (set_attr "type"    "cs,cs")
-   (set_attr "atype"   "mem,mem")
+   (set_attr "atype"   "*,agen")
    (set_attr "length"  "*,14")])
 
 ; Compare a block of arbitrary length.
   "TARGET_64BIT"
   "clcl\\t%0,%1"
   [(set_attr "op_type" "RR")
-   (set_attr "atype"   "mem")
    (set_attr "type"    "vs")])
 
 (define_insn "cmpstr_long_31"
   "!TARGET_64BIT"
   "clcl\\t%0,%1"
   [(set_attr "op_type" "RR")
-   (set_attr "atype"   "mem")
    (set_attr "type"    "vs")])
 
 ; Convert condition code to integer in range (-1, 0, 1)
 }"
   [(set_attr "op_type" "NN")
    (set_attr "length"  "16")
-   (set_attr "atype"   "reg")
    (set_attr "type"    "other")])
 
 (define_insn "cmpint_di"
 }"
   [(set_attr "op_type" "NN")
    (set_attr "length"  "22")
-   (set_attr "atype"   "reg")
    (set_attr "type"    "other")])
 
 
    (clobber (reg:CC 33))]
   ""
   "icm\\t%0,8,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*sethighhisi"
   [(set (match_operand:SI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "icm\\t%0,12,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn "*sethighqidi_64"
   [(set (match_operand:DI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   "TARGET_64BIT"
   "icmh\\t%0,8,%1"
-  [(set_attr "op_type" "RSE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RSE")])
 
 (define_insn "*sethighqidi_31"
   [(set (match_operand:DI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   "!TARGET_64BIT"
   "icm\\t%0,8,%1"
-  [(set_attr "op_type" "RS")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RS")])
 
 (define_insn_and_split "*extractqi"
   [(set (match_operand:SI 0 "register_operand" "=d")
   operands[1] = change_address (operands[1], QImode, 0);
 }"
   [(set_attr "type"    "o2")
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 (define_insn_and_split "*extracthi"
   [(set (match_operand:SI 0 "register_operand" "=d")
   operands[1] = change_address (operands[1], HImode, 0);
 }"
   [(set_attr "type"    "o2")
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 ;
 ; extendsidi2 instruction pattern(s).
   "@
    lgfr\\t%0,%1
    lgf\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RRE,RXE")])
 
 ;
 ; extendhidi2 instruction pattern(s).
         (sign_extend:DI (match_operand:HI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "lgh\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 ;
 ; extendqidi2 instruction pattern(s).
         (sign_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
   ""
   "lh\\t%0,%1"
-  [(set_attr "op_type" "RX")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RX")])
 
 ;
 ; extendqisi2 instruction pattern(s).
   "@
    llgfr\\t%0,%1
    llgf\\t%0,%1"
-  [(set_attr "op_type" "RRE,RXE")
-   (set_attr "atype"   "reg,mem")])
+  [(set_attr "op_type" "RRE,RXE")])
 
 ;
 ; zero_extendhidi2 instruction pattern(s).
         (zero_extend:DI (match_operand:HI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "llgh\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 ;
 ; zero_extendqidi2 instruction pattern(s)
         (zero_extend:DI (match_operand:QI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "llgc\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 ;
 ; zero_extendhisi2 instruction pattern(s).
         (zero_extend:SI (match_operand:HI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "llgh\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 (define_insn_and_split "*zero_extendhisi2_31"
   [(set (match_operand:SI 0 "register_operand" "=&d")
      (clobber (reg:CC 33))])]
   "operands[2] = gen_lowpart (HImode, operands[0]);"
   [(set_attr "type" "o2")
-   (set_attr "atype" "mem")])
+   (set_attr "atype" "agen")])
  
 ;
 ; zero_extendqisi2 instruction pattern(s).
         (zero_extend:SI (match_operand:QI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "llgc\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 (define_insn_and_split "*zero_extendqisi2_31"
   [(set (match_operand:SI 0 "register_operand" "=&d")
    (set (strict_low_part (match_dup 2)) (match_dup 1))]
   "operands[2] = gen_lowpart (QImode, operands[0]);"
   [(set_attr "type" "o2")
-   (set_attr "atype" "mem")])
+   (set_attr "atype" "agen")])
  
 ;
 ; zero_extendqihi2 instruction pattern(s).
         (zero_extend:HI (match_operand:QI 1 "memory_operand" "m")))]
   "TARGET_64BIT"
   "llgc\\t%0,%1"
-  [(set_attr "op_type" "RXE")
-   (set_attr "atype"   "mem")])
+  [(set_attr "op_type" "RXE")])
 
 (define_insn_and_split "*zero_extendqihi2_31"
   [(set (match_operand:HI 0 "register_operand" "=&d")
    (set (strict_low_part (match_dup 2)) (match_dup 1))]
   "operands[2] = gen_lowpart (QImode, operands[0]);"
   [(set_attr "type" "o2")
-   (set_attr "atype" "mem")])
+   (set_attr "atype" "agen")])
 
 
 ;
   "TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cgdbr\\t%0,%h2,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"    "other")])
+   (set_attr "type"    "ftoi")])
 
 ;
 ; fixuns_truncdfsi2 and fix_truncdfsi2 instruction pattern(s).
    return \"l\\t%0,%N4\";
 }"
   [(set_attr "op_type" "NN")
-   (set_attr "type"    "other")
+   (set_attr "type"    "ftoi")
+   (set_attr "atype"   "agen")
    (set_attr "length"  "20")])
 
 ;
   "TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cgebr\\t%0,%h2,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"    "other")])
+   (set_attr "type"    "ftoi")])
 
 ;
 ; fixuns_truncsfsi2 and fix_truncsfsi2 instruction pattern(s).
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cfebr\\t%0,%h2,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"    "other")])
+   (set_attr "type"    "ftoi")])
 
 ;
 ; floatdidf2 instruction pattern(s).
   "TARGET_64BIT && TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cegbr\\t%0,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"    "other" )])
+   (set_attr "type"    "itof" )])
 
 ;
 ; floatsidf2 instruction pattern(s).
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cdfbr\\t%0,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"   "other" )])
+   (set_attr "type"   "itof" )])
 
 (define_insn "floatsidf2_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f")
 }"
   [(set_attr "op_type" "NN")
    (set_attr "type"    "other" )
+   (set_attr "atype"   "agen")
    (set_attr "length"  "20")])
 
 ;
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "cefbr\\t%0,%1"
   [(set_attr "op_type" "RRE")
-   (set_attr "type"    "other" )])
+   (set_attr "type"    "itof" )])
 
 ;
 ; truncdfsf2 instruction pattern(s).
    lrer\\t%0,%1
    le\\t%0,%1"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"   "floads,floads")])
 
 ;
 ; extendsfdf2 instruction pattern(s).
   "@
    ldebr\\t%0,%1
    ldeb\\t%0,%1"
-  [(set_attr "op_type"  "RRE,RXE")])
+  [(set_attr "op_type"  "RRE,RXE")
+   (set_attr "type"   "floads,floads")])
 
 (define_insn "extendsfdf2_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
   "@
    sdr\\t%0,%0\;ler\\t%0,%1
    sdr\\t%0,%0\;le\\t%0,%1"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")
+  [(set_attr "op_type"  "NN,NN")
+   (set_attr "atype"    "reg,agen")
+   (set_attr "length"   "4,6")
    (set_attr "type"     "o2,o2")]) 
 
 
    && preferred_la_operand_p (operands[1], 1)"
   "#"
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_split
   "@
    agfr\\t%0,%2
    agf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_zero_cc"
   [(set (reg 33) 
   "@
    algfr\\t%0,%2
    algf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_zero_cconly"
   [(set (reg 33) 
   "@
    algfr\\t%0,%2
    algf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_zero"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    algfr\\t%0,%2
    algf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_imm_cc"
   [(set (reg 33) 
    && s390_match_ccmode (insn, CCAmode) 
    && CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K')"
   "aghi\\t%0,%h2"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])  
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "*adddi3_cc"
   [(set (reg 33) 
   "@
    algr\\t%0,%2
    alg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_cconly"
   [(set (reg 33) 
   "@
    algr\\t%0,%2
    alg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_cconly2"
   [(set (reg 33) 
   "@
    algr\\t%0,%2
    alg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*adddi3_64"
   [(set (match_operand:DI 0 "register_operand" "=d,d,d")
    agr\\t%0,%2
    aghi\\t%0,%h2
    ag\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RI,RXE")
-   (set_attr "atype"    "reg,reg,mem")])
+  [(set_attr "op_type"  "RRE,RI,RXE")])
 
 (define_insn_and_split "*adddi3_31"
   [(set (match_operand:DI 0 "register_operand" "=&d")
   "TARGET_64BIT"
   "la\\t%0,%a1"      
   [(set_attr "op_type" "RX")
-   (set_attr "atype"   "mem")
    (set_attr "type"    "la")])
 
 (define_expand "reload_indi"
    && preferred_la_operand_p (operands[1], 1)"
   "#"
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_split
   "s390_match_ccmode (insn, CCAmode)
    && CONST_OK_FOR_LETTER_P (INTVAL (operands[2]), 'K')"
   "ahi\\t%0,%h2"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])  
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "*addsi3_carry1_cc"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_carry1_cconly"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_carry2_cc"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_carry2_cconly"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_cc"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_cconly"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_cconly2"
   [(set (reg 33) 
   "@
    alr\\t%0,%2
    al\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*addsi3_sign"
   [(set (match_operand:SI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "ah\\t%0,%2"
-  [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "RX")])
 
 (define_insn "*addsi3_sub"
   [(set (match_operand:SI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "ah\\t%0,%2"
-  [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "RX")])
 
 (define_insn "addsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d,d")
    ar\\t%0,%2
    ahi\\t%0,%h2
    a\\t%0,%2"
-  [(set_attr "op_type"  "RR,RI,RX")
-   (set_attr "atype"    "reg,reg,mem")])
+  [(set_attr "op_type"  "RR,RI,RX")])
 
 (define_insn "*la_31"
   [(set (match_operand:SI 0 "register_operand" "=d")
   "!TARGET_64BIT && legitimate_la_operand_p (operands[1])"
   "la\\t%0,%a1"
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_insn "*la_31_and"
   "!TARGET_64BIT"
   "la\\t%0,%a1"
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_insn_and_split "*la_31_and_cc"
         (and:SI (match_dup 1) (const_int 2147483647)))]
   ""
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_insn "force_la_31"
   "!TARGET_64BIT"
   "la\\t%0,%a1"
   [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")
    (set_attr "type"     "la")])
 
 (define_expand "reload_insi"
    adbr\\t%0,%2
    adb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimpd,fsimpd")])
 
 (define_insn "*adddf3_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
    adr\\t%0,%2
    ad\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimpd,fsimpd")])
 
 ;
 ; addsf3 instruction pattern(s).
    aebr\\t%0,%2
    aeb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimps,fsimps")])
 
 (define_insn "*addsf3"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
    aer\\t%0,%2
    ae\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimps,fsimps")])
 
 
 ;;
   "@
    sgfr\\t%0,%2
    sgf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_zero_cc"
   [(set (reg 33) 
   "@
    slgfr\\t%0,%2
    slgf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_zero_cconly"
   [(set (reg 33) 
   "@
    slgfr\\t%0,%2
    slgf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])  
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_zero"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    slgfr\\t%0,%2
    slgf\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_cc"
   [(set (reg 33)
   "@
    slgr\\t%0,%2
    slg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_cconly"
   [(set (reg 33)
   "@
    slgr\\t%0,%2
    slg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*subdi3_64"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    sgr\\t%0,%2
    sg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RRE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RRE")])
 
 (define_insn_and_split "*subdi3_31"
   [(set (match_operand:DI 0 "register_operand" "=&d")
   "@
    slr\\t%0,%2
    sl\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*subsi3_borrow_cconly"
   [(set (reg 33)
   "@
    slr\\t%0,%2
    sl\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*subsi3_cc"
   [(set (reg 33)
   "@
    slr\\t%0,%2
    sl\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*subsi3_cconly"
   [(set (reg 33)
   "@
    slr\\t%0,%2
    sl\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*subsi3_sign"
   [(set (match_operand:SI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "sh\\t%0,%2"
-  [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "RX")])
 
 (define_insn "*subsi3_sub"
   [(set (match_operand:SI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "sh\\t%0,%2"
-  [(set_attr "op_type"  "RX")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "RX")])
 
 (define_insn "subsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
   "@
    sr\\t%0,%2
    s\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 
 ;
    sdbr\\t%0,%2
    sdb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimpd,fsimpd")])
 
 (define_insn "*subdf3_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
    sdr\\t%0,%2
    sd\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimpd,fsimpd")])
 
 ;
 ; subsf3 instruction pattern(s).
    sebr\\t%0,%2
    seb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimps,fsimps")])
 
 (define_insn "*subsf3_ibm"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
    ser\\t%0,%2
    se\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fsimps,fsimps")])
 
 
 ;;
    msgfr\\t%0,%2
    msgf\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")
    (set_attr "type"     "imul")])
 
 
    mghi\\t%0,%h2
    msg\\t%0,%2"
   [(set_attr "op_type"  "RRE,RI,RXE")
-   (set_attr "atype"    "reg,reg,mem")
    (set_attr "type"     "imul")])
 
 ;
    mhi\\t%0,%h2
    ms\\t%0,%2"
   [(set_attr "op_type"  "RRE,RI,RX")
-   (set_attr "atype"    "reg,reg,mem")
    (set_attr "type"     "imul")])
 
 ;
     mr\\t%0,%2
     m\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")
    (set_attr "type"     "imul")])
  
 ;
    mdbr\\t%0,%2
    mdb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "fmul")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fmuld")])
 
 (define_insn "*muldf3_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
    mdr\\t%0,%2
    md\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "type"    "fmul")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"    "fmuld")])
 
 ;
 ; mulsf3 instruction pattern(s).
    meebr\\t%0,%2
    meeb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "fmul")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fmuls")])
 
 (define_insn "*mulsf3_ibm"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
    mer\\t%0,%2
    me\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "type"     "fmul")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fmuls")])
 
 
 ;;
    dsgr\\t%0,%2
    dsg\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "idiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "idiv")])
 
 (define_insn "divmodtisi3"
   [(set (match_operand:TI 0 "register_operand" "=d,d")
    dsgfr\\t%0,%2
    dsgf\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "idiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "idiv")])
 
 ;
 ; udivmoddi4 instruction pattern(s).
    dlgr\\t%0,%2
    dlg\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "idiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "idiv")])
 
 ;
 ; divmodsi4 instruction pattern(s).
    dr\\t%0,%2
    d\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "type"     "idiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "idiv")])
 
 ;
 ; udivsi3 and umodsi3 instruction pattern(s).
    ddbr\\t%0,%2
    ddb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "fdiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fdivd")])
 
 (define_insn "*divdf3_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f,f")
    ddr\\t%0,%2
    dd\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "type"     "fdiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fdivd")])
 
 ;
 ; divsf3 instruction pattern(s).
    debr\\t%0,%2
    deb\\t%0,%2"
   [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "type"     "fdiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fdivs")])
 
 (define_insn "*divsf3"
   [(set (match_operand:SF 0 "register_operand" "=f,f")
    der\\t%0,%2
    de\\t%0,%2"
   [(set_attr "op_type"  "RR,RX")
-   (set_attr "type"     "fdiv")
-   (set_attr "atype"    "reg,mem")])
+   (set_attr "type"     "fdivs")])
 
 
 ;;
   "@
    ngr\\t%0,%2
    ng\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*anddi3_cconly"
   [(set (reg 33)
   "@
    ngr\\t%0,%2
    ng\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*anddi3_ni"
   [(set (match_operand:DI 0 "register_operand" "=d")
       default: abort ();
     }
 }"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "anddi3"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    ngr\\t%0,%2
    ng\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*anddi3_ss"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*anddi3_ss_inv"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; andsi3 instruction pattern(s).
   "@
    nr\\t%0,%2
    n\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*andsi3_cconly"
   [(set (reg 33)
   "@
    nr\\t%0,%2
    n\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*andsi3_ni"
   [(set (match_operand:SI 0 "register_operand" "=d")
       default: abort ();
     }
 }"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "andsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
   "@
    nr\\t%0,%2
    n\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*andsi3_ss"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*andsi3_ss_inv"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; andhi3 instruction pattern(s).
   "@
    nr\\t%0,%2
    nill\\t%0,%x2"
-  [(set_attr "op_type"  "RR,RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR,RI")])
 
 (define_insn "andhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "nr\\t%0,%2"
-  [(set_attr "op_type"  "RR")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR")])
 
 (define_insn "*andhi3_ss"
   [(set (match_operand:HI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*andhi3_ss_inv"
   [(set (match_operand:HI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "nc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; andqi3 instruction pattern(s).
   "@
    nr\\t%0,%2
    nill\\t%0,%b2"
-  [(set_attr "op_type"  "RR,RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR,RI")])
 
 (define_insn "andqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "nr\\t%0,%2"
-  [(set_attr "op_type"  "RR")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR")])
 
 (define_insn "*andqi3_ss"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    ni\\t%0,%b1
    nc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 (define_insn "*andqi3_ss_inv"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    ni\\t%0,%b1
    nc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 
 ;;
   "@
    ogr\\t%0,%2
    og\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*iordi3_cconly"
   [(set (reg 33)
   "@
    ogr\\t%0,%2
    og\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*iordi3_oi"
   [(set (match_operand:DI 0 "register_operand" "=d")
       default: abort ();
     }
 }"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "iordi3"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    ogr\\t%0,%2
    og\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*iordi3_ss"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*iordi3_ss_inv"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; iorsi3 instruction pattern(s).
   "@
    or\\t%0,%2
    o\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*iorsi3_cconly"
   [(set (reg 33)
   "@
    or\\t%0,%2
    o\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*iorsi3_oi"
   [(set (match_operand:SI 0 "register_operand" "=d")
       default: abort ();
     }
 }"
-  [(set_attr "op_type"  "RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RI")])
 
 (define_insn "iorsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
   "@
    or\\t%0,%2
    o\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*iorsi3_ss"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*iorsi3_ss_inv"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; iorhi3 instruction pattern(s).
   "@
    or\\t%0,%2
    oill\\t%0,%x2"
-  [(set_attr "op_type"  "RR,RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR,RI")])
 
 (define_insn "iorhi3"
   [(set (match_operand:HI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "or\\t%0,%2"
-  [(set_attr "op_type"  "RR")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR")])
 
 (define_insn "*iorhi3_ss"
   [(set (match_operand:HI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*iorhi3_ss_inv"
   [(set (match_operand:HI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "oc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; iorqi3 instruction pattern(s).
   "@
    or\\t%0,%2
    oill\\t%0,%b2"
-  [(set_attr "op_type"  "RR,RI")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR,RI")])
 
 (define_insn "iorqi3"
   [(set (match_operand:QI 0 "register_operand" "=d")
    (clobber (reg:CC 33))]
   ""
   "or\\t%0,%2"
-  [(set_attr "op_type"  "RR")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR")])
 
 (define_insn "*iorqi3_ss"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    oi\\t%0,%b1
    oc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 (define_insn "*iorqi3_ss_inv"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    oi\\t%0,%b1
    oc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 
 ;;
   "@
    xgr\\t%0,%2
    xg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*xordi3_cconly"
   [(set (reg 33)
   "@
    xgr\\t%0,%2
    xr\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "xordi3"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    xgr\\t%0,%2
    xg\\t%0,%2"
-  [(set_attr "op_type"  "RRE,RXE")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RRE,RXE")])
 
 (define_insn "*xordi3_ss"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*xordi3_ss_inv"
   [(set (match_operand:DI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(8,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; xorsi3 instruction pattern(s).
   "@
    xr\\t%0,%2
    x\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*xorsi3_cconly"
   [(set (reg 33)
   "@
    xr\\t%0,%2
    x\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "xorsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
   "@
    xr\\t%0,%2
    x\\t%0,%2"
-  [(set_attr "op_type"  "RR,RX")
-   (set_attr "atype"    "reg,mem")])
+  [(set_attr "op_type"  "RR,RX")])
 
 (define_insn "*xorsi3_ss"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*xorsi3_ss_inv"
   [(set (match_operand:SI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(4,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; xorhi3 instruction pattern(s).
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 (define_insn "*xorhi3_ss_inv"
   [(set (match_operand:HI 0 "s_operand" "=Q")
    (clobber (reg:CC 33))]
   ""
   "xc\\t%O0(2,%R0),%1"
-  [(set_attr "op_type"  "SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SS")])
 
 ;
 ; xorqi3 instruction pattern(s).
    (clobber (reg:CC 33))]
   ""
   "xr\\t%0,%2"
-  [(set_attr "op_type"  "RR")
-   (set_attr "atype"    "reg")])
+  [(set_attr "op_type"  "RR")])
 
 (define_insn "*xorqi3_ss"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    xi\\t%0,%b1
    xc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 (define_insn "*xorqi3_ss_inv"
   [(set (match_operand:QI 0 "s_operand" "=Q,Q")
   "@
    xi\\t%0,%b1
    xc\\t%O0(1,%R0),%1"
-  [(set_attr "op_type"  "SI,SS")
-   (set_attr "atype"    "mem")])
+  [(set_attr "op_type"  "SI,SS")])
 
 
 ;;
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "lcdbr\\t%0,%1"
-  [(set_attr "op_type"  "RRE")])
+  [(set_attr "op_type"  "RRE")
+   (set_attr "type"     "fsimpd")])
 
 (define_insn "*negdf2_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f")
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "lcdr\\t%0,%1"
-  [(set_attr "op_type"  "RR")])
+  [(set_attr "op_type"  "RR")
+   (set_attr "type"     "fsimpd")])
 
 ;
 ; negsf2 instruction pattern(s).
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "lcebr\\t%0,%1"
-  [(set_attr "op_type"  "RRE")])
+  [(set_attr "op_type"  "RRE")
+   (set_attr "type"     "fsimps")])
 
 (define_insn "*negsf2"
   [(set (match_operand:SF 0 "register_operand" "=f")
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "lcer\\t%0,%1"
-  [(set_attr "op_type"  "RR")])
+  [(set_attr "op_type"  "RR")
+   (set_attr "type"     "fsimps")])
 
 
 ;;
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "lpdbr\\t%0,%1"
-  [(set_attr "op_type"  "RRE")])
+  [(set_attr "op_type"  "RRE")
+   (set_attr "type"     "fsimpd")])
 
 (define_insn "*absdf2_ibm"
   [(set (match_operand:DF 0 "register_operand" "=f")
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "lpdr\\t%0,%1"
-  [(set_attr "op_type"  "RR")])
+  [(set_attr "op_type"  "RR")
+   (set_attr "type"     "fsimpd")])
 
 ;
 ; abssf2 instruction pattern(s).
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IEEE_FLOAT"
   "lpebr\\t%0,%1"
-  [(set_attr "op_type"  "RRE")])
+  [(set_attr "op_type"  "RRE")
+   (set_attr "type"     "fsimps")])
 
 (define_insn "*abssf2_ibm"
   [(set (match_operand:SF 0 "register_operand" "=f")
    (clobber (reg:CC 33))]
   "TARGET_HARD_FLOAT && TARGET_IBM_FLOAT"
   "lper\\t%0,%1"
-  [(set_attr "op_type"  "RR")])
+  [(set_attr "op_type"  "RR")
+   (set_attr "type"     "fsimps")])
 
 ;;
 ;;- Square root instructions.
   "@
    sqdbr\\t%0,%1
    sqdb\\t%0,%1"
-  [(set_attr "op_type"  "RRE,RSE")])
+  [(set_attr "op_type"  "RRE,RSE")
+   (set_attr "type"     "fsqrtd")])
 
 ;
 ; sqrtsf2 instruction pattern(s).
   "@
    sqebr\\t%0,%1
    sqeb\\t%0,%1"
-  [(set_attr "op_type"  "RRE,RSE")])
+  [(set_attr "op_type"  "RRE,RSE")
+   (set_attr "type"     "fsqrts")])
 
 ;;
 ;;- One complement instructions.
   "@
    rllg\\t%0,%1,%c2
    rllg\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
 
 ;
 ; rotlsi3 instruction pattern(s).
   "@
    rll\\t%0,%1,%c2
    rll\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
 
 
 ;;
   "@
    sldl\\t%0,%c2
    sldl\\t%0,0(%2)"     
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 (define_insn "*ashldi3_64"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    sllg\\t%0,%1,%2
    sllg\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
 
 ;
 ; ashrdi3 instruction pattern(s).
   "@
    srda\\t%0,%c2
    srda\\t%0,0(%2)"     
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 (define_insn "*ashrdi3_cconly_31"
   [(set (reg 33)
   "@
    srda\\t%0,%c2
    srda\\t%0,0(%2)"     
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 (define_insn "*ashrdi3_31"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    srda\\t%0,%c2
    srda\\t%0,0(%2)"     
-  [(set_attr "op_type"  "RS")])
-
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 (define_insn "*ashrdi3_cc_64"
   [(set (reg 33)
         (compare (ashiftrt:DI (match_operand:DI 1 "register_operand" "d,d")
   "@
    srag\\t%0,%1,%c2
    srag\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
 
 (define_insn "*ashrdi3_cconly_64"
   [(set (reg 33)
   "@
    srag\\t%0,%1,%c2
    srag\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
 
 (define_insn "*ashrdi3_64"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    srag\\t%0,%1,%c2
    srag\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE")])
+  [(set_attr "op_type"  "RSE")
+   (set_attr "atype"    "reg")])
+
 
 ;
 ; ashlsi3 instruction pattern(s).
   "@
    sll\\t%0,%c2
    sll\\t%0,0(%2)"
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 ;
 ; ashrsi3 instruction pattern(s).
   "@
    sra\\t%0,%c2
    sra\\t%0,0(%2)"
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
+
 
 (define_insn "*ashrsi3_cconly"
   [(set (reg 33)
   "@
    sra\\t%0,%c2
    sra\\t%0,0(%2)"
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 (define_insn "ashrsi3"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
   "@
    sra\\t%0,%c2
    sra\\t%0,0(%2)"
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 
 ;;
   "@
    srdl\\t%0,%c2
    srdl\\t%0,0(%2)"     
-   [(set_attr "op_type"  "RS,RS")])
+   [(set_attr "op_type"  "RS,RS")
+    (set_attr "atype"    "reg")])
 
 (define_insn "*lshrdi3_64"
   [(set (match_operand:DI 0 "register_operand" "=d,d")
   "@
    srlg\\t%0,%1,%c2
    srlg\\t%0,%1,0(%2)"
-  [(set_attr "op_type"  "RSE,RSE")])
+  [(set_attr "op_type"  "RSE,RSE")
+   (set_attr "atype"    "reg")])
 
 ;
 ; lshrsi3 instruction pattern(s).
   "@
    srl\\t%0,%c2
    srl\\t%0,0(%2)"
-  [(set_attr "op_type"  "RS")])
+  [(set_attr "op_type"  "RS")
+   (set_attr "atype"    "reg")])
 
 
 ;;
     abort ();
 }"
   [(set_attr "op_type" "RI")
+   (set_attr "type"    "branch")
    (set (attr "length")
         (cond [(lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                 (const_int 4)
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RR") (const_string "RX")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"    "branch")
+   (set_attr "atype" "agen")])
 
 
 ;;
     abort ();
 }"
   [(set_attr "op_type" "RI")
+   (set_attr "type"    "branch")
    (set (attr "length")
         (cond [(lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                 (const_int 4)
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RR") (const_string "RX")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")])
 
 ;;
 ;;- Trap instructions.
   [(trap_if (const_int 1) (const_int 0))]
   ""
   "j\\t.+2"
-  [(set_attr "op_type" "RX")])
+  [(set_attr "op_type" "RX")
+   (set_attr "type"  "branch")])
 
 (define_expand "conditional_trap"
   [(set (match_dup 2) (match_dup 3))
            (const_int 0))]
   ""
   "j%C0\\t.+2";
-  [(set_attr "op_type" "RX")])
+  [(set_attr "op_type" "RI")
+   (set_attr "type"  "branch")])
 
 ;;
 ;;- Loop instructions.
     abort ();
 }"
   [(set_attr "op_type"  "RI")
+   (set_attr "type"  "branch")
    (set (attr "length")
         (cond [(lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                 (const_int 4)
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RR") (const_string "RX")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")])
 
 (define_split
   [(set (pc)
     abort ();
 }"
   [(set_attr "op_type"  "RI")
+   (set_attr "type"  "branch")
    (set (attr "length")
         (if_then_else (lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                       (const_int 4) (const_int 12)))])
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RRE") (const_string "RXE")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")])
 
 (define_split
   [(set (pc)
     abort ();
 }"
   [(set_attr "op_type" "RI")
+   (set_attr "type"  "branch")
    (set (attr "length")
         (cond [(lt (abs (minus (pc) (match_dup 0))) (const_int 60000))
                 (const_int 4)
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RR") (const_string "RX")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")])
 
 ;
 ; casesi instruction pattern(s).
   [(set (attr "op_type") 
         (if_then_else (match_operand 0 "register_operand" "")
                       (const_string "RR") (const_string "RX")))
-   (set_attr "atype" "mem")])
+   (set_attr "type"  "branch")
+   (set_attr "atype" "agen")])
 
 (define_expand "casesi"
   [(match_operand:SI 0 "general_operand" "")
   "basr\\t%2,%0"
   [(set_attr "op_type" "RR")
    (set_attr "type"    "jsr")
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 (define_insn "basr_31"
   [(call (mem:QI (match_operand:SI 0 "register_operand" "a"))
   "basr\\t%2,%0"
   [(set_attr "op_type" "RR")
    (set_attr "type"    "jsr")
-   (set_attr "atype"    "mem")])
+   (set_attr "atype"    "agen")])
 
 (define_insn "bas_64"
   [(call (mem:QI (match_operand:QI 0 "address_operand" "p"))
   "TARGET_64BIT"
   "bas\\t%2,%a0"
   [(set_attr "op_type" "RX")
-   (set_attr "type"    "jsr")
-   (set_attr "atype"   "mem")])
+   (set_attr "type"    "jsr")])
 
 (define_insn "bas_31"
   [(call (mem:QI (match_operand:QI 0 "address_operand" "p"))
   "!TARGET_64BIT"
   "bas\\t%2,%a0"
   [(set_attr "op_type" "RX")
-   (set_attr "type"    "jsr")
-   (set_attr "atype"   "mem")])
+   (set_attr "type"    "jsr")])
 
 
 ;
   "TARGET_64BIT"
   "basr\\t%3,%1"
   [(set_attr "op_type" "RR")
-   (set_attr "type"    "jsr")])
+   (set_attr "type"    "jsr")
+   (set_attr "atype"   "agen")])
 
 (define_insn "basr_r_31"
   [(set (match_operand 0 "register_operand" "=df")
   "basr\\t%3,%1"
   [(set_attr "op_type" "RR")
    (set_attr "type"    "jsr")
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 (define_insn "bas_r_64"
   [(set (match_operand 0 "register_operand" "=df")
   "TARGET_64BIT"
   "bas\\t%3,%a1"
   [(set_attr "op_type" "RX")
-   (set_attr "type"    "jsr")
-   (set_attr "atype"   "mem")])
+   (set_attr "type"    "jsr")])
 
 (define_insn "bas_r_31"
   [(set (match_operand 0 "register_operand" "=df")
   "!TARGET_64BIT"
   "bas\\t%3,%a1"
    [(set_attr "op_type" "RX")
-    (set_attr "type"    "jsr")
-    (set_attr "atype"   "mem")])
+    (set_attr "type"    "jsr")])
 
 
 ;;
   "TARGET_64BIT"
   "larl\\t%0,%1"
   [(set_attr "op_type" "RIL")
-   (set_attr "type"    "la")])
+   (set_attr "type"    "larl")])
 
 (define_insn "reload_anchor"
   [(set (match_operand:SI 0 "register_operand" "=a")
   "l\\t%0,0(%1)\;la\\t%0,0(%0,%1)"
   [(set_attr "op_type" "NN")
    (set_attr "type"    "la")
+   (set_attr "atype"   "agen")
    (set_attr "length"  "8")])
 
 (define_insn "pool"
   "br\\t%0"
   [(set_attr "op_type" "RR")
    (set_attr "type"    "jsr")          
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 (define_insn "*return_di"
   [(return)
   "br\\t%0"
   [(set_attr "op_type" "RR")
    (set_attr "type"    "jsr")          
-   (set_attr "atype"   "mem")])
+   (set_attr "atype"   "agen")])
 
 (define_insn "literal_pool_31"
   [(unspec_volatile [(const_int 0)] 300)
    return \"\";        
 }"
   [(set_attr "op_type" "NN")
-   (set_attr "type"    "la")])
+   (set_attr "type"    "larl")])
 
 (define_insn "literal_pool_64"
   [(unspec_volatile [(const_int 0)] 300)
    return \"\";        
 }"
   [(set_attr "op_type" "NN")
-   (set_attr "type"    "la")])
+   (set_attr "type"    "larl")])