(code_to_optab): New variable.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 3 Aug 1993 21:33:37 +0000 (17:33 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 3 Aug 1993 21:33:37 +0000 (17:33 -0400)
(init_optab): Initialize it.

From-SVN: r5062

gcc/optabs.c

index 1dd9b823908090118d8cbe33b9c00e189084a7d7..71e29a7ea0d4b8a64a0af1ba7ef8ac6769821214 100644 (file)
@@ -91,6 +91,9 @@ enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
 enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
 enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
 
+/* Contains the optab used for each rtx code.  */
+optab code_to_optab[NUM_RTX_CODE + 1];
+
 /* SYMBOL_REF rtx's for the library functions that are called
    implicitly and not via optabs.  */
 
@@ -3404,6 +3407,10 @@ init_optab (code)
       op->handlers[i].insn_code = CODE_FOR_nothing;
       op->handlers[i].libfunc = 0;
     }
+
+  if (code != UNKNOWN)
+    code_to_optab[(int) code] = op;
+
   return op;
 }