(gen_realpart, gen_imagpart): New functions.
authorRichard Stallman <rms@gnu.org>
Mon, 5 Oct 1992 06:34:26 +0000 (06:34 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 5 Oct 1992 06:34:26 +0000 (06:34 +0000)
From-SVN: r2323

gcc/emit-rtl.c

index 3bd88b6..d301bfc 100644 (file)
@@ -656,6 +656,34 @@ gen_lowpart_common (mode, x)
   return 0;
 }
 \f
+/* Return the real part (which has mode MODE) of a complex value X.
+   This always comes at the low address in memory.  */
+
+rtx
+gen_realpart (mode, x)
+     enum machine_mode mode;
+     register rtx x;
+{
+  if (WORDS_BIG_ENDIAN)
+    return gen_highpart (mode, x);
+  else
+    return gen_lowpart (mode, x);
+}
+
+/* Return the imaginary part (which has mode MODE) of a complex value X.
+   This always comes at the high address in memory.  */
+
+rtx
+gen_imagpart (mode, x)
+     enum machine_mode mode;
+     register rtx x;
+{
+  if (WORDS_BIG_ENDIAN)
+    return gen_lowpart (mode, x);
+  else
+    return gen_highpart (mode, x);
+}
+\f
 /* Assuming that X is an rtx (e.g., MEM, REG or SUBREG) for a value,
    return an rtx (MEM, SUBREG, or CONST_INT) that refers to the
    least-significant part of X.