aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-02-27 16:52:03 -0800
committerJim Wilson <wilson@gcc.gnu.org>1994-02-27 16:52:03 -0800
commit81284a6ad220981f2d6a0e13ce3dade55c10cab8 (patch)
tree3cc15517958b9a32fe3348ba11113f326eb313a8 /gcc
parent340aa7f68ed9e212bb054a04d02a9177f9b98673 (diff)
downloadgcc-81284a6ad220981f2d6a0e13ce3dade55c10cab8.zip
gcc-81284a6ad220981f2d6a0e13ce3dade55c10cab8.tar.gz
gcc-81284a6ad220981f2d6a0e13ce3dade55c10cab8.tar.bz2
(subreg_realpart_p): New function.
From-SVN: r6667
Diffstat (limited to 'gcc')
-rw-r--r--gcc/emit-rtl.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 382960c..b1d285f 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -822,6 +822,21 @@ gen_imagpart (mode, x)
else
return gen_highpart (mode, x);
}
+
+/* Return 1 iff X, assumed to be a SUBREG,
+ refers to the real part of the complex value in its containing reg.
+ Complex values are always stored with the real part in the first word,
+ regardless of WORDS_BIG_ENDIAN. */
+
+int
+subreg_realpart_p (x)
+ rtx x;
+{
+ if (GET_CODE (x) != SUBREG)
+ abort ();
+
+ return SUBREG_WORD (x) == 0;
+}
/* 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