summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-19 12:58:20 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-19 12:58:20 +0000
commit5ab3e60ad717350ee2c7852fd5561a4068df4662 (patch)
tree768ed4b211dde61d2ef02251b1e6a132db4eee22
parentc9c236e793b0577d3a8e963d3836527b4ac8cf47 (diff)
downloadgcc-5ab3e60ad717350ee2c7852fd5561a4068df4662.tar.gz
PR target/58792
* config/i386/i386.c (ix86_function_value_regno): Add DX_REG, ST1_REG and XMM1_REG for 32bit and 64bit targets. Also add DI_REG and SI_REG for 64bit SYSV ABI targets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203857 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/i386/i386.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7deefce85e6..78bc3bd56d7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2013-10-19 Uros Bizjak <ubizjak@gmail.com>
+ PR target/58792
+ * config/i386/i386.c (ix86_function_value_regno): Add DX_REG,
+ ST1_REG and XMM1_REG for 32bit and 64bit targets. Also add DI_REG
+ and SI_REG for 64bit SYSV ABI targets.
+
+2013-10-19 Uros Bizjak <ubizjak@gmail.com>
+
* mode-switching.c (create_pre_exit): Rename maybe_builtin_apply
to multi_reg_return. Clarify that we are skipping USEs of multiple
return registers. Use bool type where appropriate.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 91e65105a5c..54bd5f21d2c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -7393,9 +7393,15 @@ ix86_function_value_regno_p (const unsigned int regno)
switch (regno)
{
case AX_REG:
+ case DX_REG:
return true;
+ case DI_REG:
+ case SI_REG:
+ return TARGET_64BIT && ix86_abi != MS_ABI;
- case FIRST_FLOAT_REG:
+ /* Complex values are returned in %st(0)/%st(1) pair. */
+ case ST0_REG:
+ case ST1_REG:
/* TODO: The function should depend on current function ABI but
builtins.c would need updating then. Therefore we use the
default ABI. */
@@ -7403,10 +7409,12 @@ ix86_function_value_regno_p (const unsigned int regno)
return false;
return TARGET_FLOAT_RETURNS_IN_80387;
- case FIRST_SSE_REG:
+ /* Complex values are returned in %xmm0/%xmm1 pair. */
+ case XMM0_REG:
+ case XMM1_REG:
return TARGET_SSE;
- case FIRST_MMX_REG:
+ case MM0_REG:
if (TARGET_MACHO || TARGET_64BIT)
return false;
return TARGET_MMX;