public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, i386]: Use GET_MODE_SIZE to determine size of XFmode operand
@ 2010-06-24 19:34 Uros Bizjak
  0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2010-06-24 19:34 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 502 bytes --]

Hello!

For the record, the size of XFmode operand changes according to
TARGET_128BIT_LONG_DOUBLE flag, so we can't just use (const_int -16)
here.

2010-06-24  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386 (XFmode push splitter): Use GET_MODE_SIZE to
	determine size of XFmode operand.
	(XFmode extended SFmode push splitter): Ditto.
	(XFmode extended SFmode push splitter): Ditto.

Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu
{,-m32}, committed to mainline SVN.

Uros.

[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1202 bytes --]

Index: i386.md
===================================================================
--- i386.md	(revision 161308)
+++ i386.md	(working copy)
@@ -2683,7 +2683,7 @@
   "reload_completed"
   [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2)))
    (set (mem:XF (reg:P SP_REG)) (match_dup 1))]
-  "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);")
+  "operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));")
 
 (define_split
   [(set (match_operand:XF 0 "push_operand" "")
@@ -4125,7 +4125,7 @@
   ""
   [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2)))
    (set (mem:XF (reg:P SP_REG)) (float_extend:XF (match_dup 1)))]
-  "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);")
+  "operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));")
 
 (define_split
   [(set (match_operand:XF 0 "push_operand" "")
@@ -4133,7 +4133,7 @@
   ""
   [(set (reg:P SP_REG) (plus:P (reg:P SP_REG) (match_dup 2)))
    (set (mem:DF (reg:P SP_REG)) (float_extend:XF (match_dup 1)))]
-  "operands[2] = GEN_INT (TARGET_128BIT_LONG_DOUBLE ? -16 : -12);")
+  "operands[2] = GEN_INT (-GET_MODE_SIZE (XFmode));")
 
 (define_expand "extendsfdf2"
   [(set (match_operand:DF 0 "nonimmediate_operand" "")

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-06-24 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24 19:34 [PATCH, i386]: Use GET_MODE_SIZE to determine size of XFmode operand Uros Bizjak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).