public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
@ 2018-12-20  8:12 Lokesh Janghel
  2018-12-20  8:31 ` Mateusz
  2018-12-20 12:16 ` Jakub Jelinek
  0 siblings, 2 replies; 9+ messages in thread
From: Lokesh Janghel @ 2018-12-20  8:12 UTC (permalink / raw)
  To: mateuszb; +Cc: gcc-patches

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

Hi Mateuszb,

I tested with your proposition patch and it is working right.
I also added the patch with test case.
Please let me know your thoughts/suggestions.


Thanks
Lokesh

[-- Attachment #2: 88521.patch --]
[-- Type: application/octet-stream, Size: 1335 bytes --]

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b3c8676..e54c489 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
 	      && !COMPLEX_MODE_P (mode))
 	    regno = FIRST_SSE_REG;
 	  break;
+	case 8:
+	case 4:
+	  if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+	    break;
+	  if (mode == SFmode || mode == DFmode)
+	    regno = FIRST_SSE_REG;
+	  break;
 	default:
 	  break;
         }
diff --git a/gcc/testsuite/gcc.target/i386/pr88521.c b/gcc/testsuite/gcc.target/i386/pr88521.c
new file mode 100644
index 0000000..f42703a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr88521.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
+/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
+/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */
+typedef struct
+{
+  float x;
+} Float;
+
+Float  __attribute__((ms_abi)) fn1()
+{
+  Float v;
+  v.x = 3.145F;
+  return v;
+}
+
+float  __attribute__((ms_abi))  fn2 ()
+{
+  float v;
+  v = 3.145F;
+  return v;
+}
+
+double  __attribute__((ms_abi))  fn3 ()
+{
+  double v;
+  v = 3.145;
+  return v;
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-20  8:12 [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target Lokesh Janghel
@ 2018-12-20  8:31 ` Mateusz
  2018-12-20 12:16 ` Jakub Jelinek
  1 sibling, 0 replies; 9+ messages in thread
From: Mateusz @ 2018-12-20  8:31 UTC (permalink / raw)
  To: Lokesh Janghel; +Cc: gcc-patches

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

W dniu 20.12.2018 o 09:12, Lokesh Janghel pisze:
> Hi Mateuszb,
> 
> I tested with your proposition patch and it is working right.
> I also added the patch with test case.
> Please let me know your thoughts/suggestions.
> 
> 
> Thanks
> Lokesh
 
Patch looks good to me, thanks!

On 64-bit target we should be OK.

We could take a look on 32-bit target.
I've attached patch that do the same for 32- and 64-bit targets.
Sample result:
$ cat t.cpp
float fun1(void)
{
    return 4.14f;
}

typedef struct {float x;} Float;

Float fun2(void)
{
    Float v;
    v.x = 4.14f;
    return v;
}

double fun3(void)
{
    return 3.13;
}

typedef struct {double x;} Double;

Double fun4(void)
{
    Double v;
    v.x = 3.13;
    return v;
}
Mateusz@Mateusz-i7 /c/temp
$ g++ -c -Wall -O2 -o t.o t.cpp

Mateusz@Mateusz-i7 /c/temp
$ objdump -dr t.o

t.o:     file format pe-x86-64


Disassembly of section .text:

0000000000000000 <_Z4fun1v>:
   0:   f3 0f 10 05 00 00 00    movss  0x0(%rip),%xmm0        # 8 <_Z4fun1v+0x8>
   7:   00
                        4: R_X86_64_PC32        .rdata
   8:   c3                      retq
   9:   0f 1f 80 00 00 00 00    nopl   0x0(%rax)

0000000000000010 <_Z4fun2v>:
  10:   8b 05 00 00 00 00       mov    0x0(%rip),%eax        # 16 <_Z4fun2v+0x6>
                        12: R_X86_64_PC32       .rdata
  16:   c3                      retq
  17:   66 0f 1f 84 00 00 00    nopw   0x0(%rax,%rax,1)
  1e:   00 00

0000000000000020 <_Z4fun3v>:
  20:   f2 0f 10 05 08 00 00    movsd  0x8(%rip),%xmm0        # 30 <_Z4fun4v>
  27:   00
                        24: R_X86_64_PC32       .rdata
  28:   c3                      retq
  29:   0f 1f 80 00 00 00 00    nopl   0x0(%rax)

0000000000000030 <_Z4fun4v>:
  30:   48 8b 05 08 00 00 00    mov    0x8(%rip),%rax        # 3f <_Z4fun4v+0xf>
                        33: R_X86_64_PC32       .rdata
  37:   c3                      retq
  38:   90                      nop
  39:   90                      nop
  3a:   90                      nop
  3b:   90                      nop
  3c:   90                      nop
  3d:   90                      nop
  3e:   90                      nop
  3f:   90                      nop

Mateusz@Mateusz-i7 /c/temp
$ m32- 900

Mateusz@Mateusz-i7 /c/temp
$ g++ -c -Wall -O2 -o t32.o t.cpp

Mateusz@Mateusz-i7 /c/temp
$ objdump -dr t32.o

t32.o:     file format pe-i386


Disassembly of section .text:

00000000 <__Z4fun1v>:
   0:   d9 05 00 00 00 00       flds   0x0
                        2: dir32        .rdata
   6:   c3                      ret
   7:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
   e:   66 90                   xchg   %ax,%ax

00000010 <__Z4fun2v>:
  10:   a1 00 00 00 00          mov    0x0,%eax
                        11: dir32       .rdata
  15:   c3                      ret
  16:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  1d:   8d 76 00                lea    0x0(%esi),%esi

00000020 <__Z4fun3v>:
  20:   dd 05 08 00 00 00       fldl   0x8
                        22: dir32       .rdata
  26:   c3                      ret
  27:   8d b4 26 00 00 00 00    lea    0x0(%esi,%eiz,1),%esi
  2e:   66 90                   xchg   %ax,%ax

00000030 <__Z4fun4v>:
  30:   b8 0a d7 a3 70          mov    $0x70a3d70a,%eax
  35:   ba 3d 0a 09 40          mov    $0x40090a3d,%edx
  3a:   c3                      ret
  3b:   90                      nop
  3c:   90                      nop
  3d:   90                      nop
  3e:   90                      nop
  3f:   90                      nop

[-- Attachment #2: gcc-9-32.diff --]
[-- Type: text/plain, Size: 3412 bytes --]

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 267291)
+++ gcc/config/i386/i386.c	(working copy)
@@ -8990,6 +8990,66 @@
 }
 
 static rtx
+function_value_ms_32 (machine_mode orig_mode, machine_mode mode,
+		      const_tree fntype, const_tree fn, const_tree valtype)
+{
+  unsigned int regno;
+
+  /* 8-byte vector modes in %mm0. See ix86_return_in_memory for where
+     we normally prevent this case when mmx is not available.  However
+     some ABIs may require the result to be returned like DImode.  */
+  if (VECTOR_MODE_P (mode) && GET_MODE_SIZE (mode) == 8)
+    regno = FIRST_MMX_REG;
+
+  /* 16-byte vector modes in %xmm0.  See ix86_return_in_memory for where
+     we prevent this case when sse is not available.  However some ABIs
+     may require the result to be returned like integer TImode.  */
+  else if (mode == TImode
+	   || (VECTOR_MODE_P (mode) && GET_MODE_SIZE (mode) == 16))
+    regno = FIRST_SSE_REG;
+
+  /* 32-byte vector modes in %ymm0.   */
+  else if (VECTOR_MODE_P (mode) && GET_MODE_SIZE (mode) == 32)
+    regno = FIRST_SSE_REG;
+
+  /* 64-byte vector modes in %zmm0.   */
+  else if (VECTOR_MODE_P (mode) && GET_MODE_SIZE (mode) == 64)
+    regno = FIRST_SSE_REG;
+
+  /* Floating point return values in %st(0)
+     (unless -mno-fp-ret-in-387 or aggregate type of up to 8 bytes).  */
+  else if (X87_FLOAT_MODE_P (mode) && TARGET_FLOAT_RETURNS_IN_80387
+	   && (GET_MODE_SIZE (mode) > 8
+	       || valtype == NULL_TREE || !AGGREGATE_TYPE_P (valtype)))
+    regno = FIRST_FLOAT_REG;
+  else
+    /* Most things go in %eax.  */
+    regno = AX_REG;
+
+  /* Override FP return register with %xmm0 for local functions when
+     SSE math is enabled or for functions with sseregparm attribute.  */
+  if ((fn || fntype) && (mode == SFmode || mode == DFmode))
+    {
+      int sse_level = ix86_function_sseregparm (fntype, fn, false);
+      if (sse_level == -1)
+	{
+	  error ("calling %qD with SSE calling convention without "
+		 "SSE/SSE2 enabled", fn);
+	  sorry ("this is a GCC bug that can be worked around by adding "
+		 "attribute used to function called");
+	}
+      else if ((sse_level >= 1 && mode == SFmode)
+	       || (sse_level == 2 && mode == DFmode))
+	regno = FIRST_SSE_REG;
+    }
+
+  /* OImode shouldn't be used directly.  */
+  gcc_assert (mode != OImode);
+
+  return gen_rtx_REG (orig_mode, regno);
+}
+
+static rtx
 function_value_64 (machine_mode orig_mode, machine_mode mode,
 		   const_tree valtype)
 {
@@ -9063,6 +9123,13 @@
 	      && !COMPLEX_MODE_P (mode))
 	    regno = FIRST_SSE_REG;
 	  break;
+	case 8:
+	case 4:
+	  if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+	    break;
+	  if (mode == SFmode || mode == DFmode)
+	    regno = FIRST_SSE_REG;
+	  break;
 	default:
 	  break;
         }
@@ -9081,8 +9148,13 @@
     fn = fntype_or_decl;
   fntype = fn ? TREE_TYPE (fn) : fntype_or_decl;
 
-  if (TARGET_64BIT && ix86_function_type_abi (fntype) == MS_ABI)
-    return function_value_ms_64 (orig_mode, mode, valtype);
+  if (ix86_function_type_abi (fntype) == MS_ABI)
+    {
+      if (TARGET_64BIT)
+	return function_value_ms_64 (orig_mode, mode, valtype);
+      else
+	return function_value_ms_32 (orig_mode, mode, fntype, fn, valtype);
+    }
   else if (TARGET_64BIT)
     return function_value_64 (orig_mode, mode, valtype);
   else

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-20  8:12 [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target Lokesh Janghel
  2018-12-20  8:31 ` Mateusz
@ 2018-12-20 12:16 ` Jakub Jelinek
  2018-12-21  9:14   ` Uros Bizjak
  1 sibling, 1 reply; 9+ messages in thread
From: Jakub Jelinek @ 2018-12-20 12:16 UTC (permalink / raw)
  To: Uros Bizjak, Lokesh Janghel; +Cc: mateuszb, gcc-patches

On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
> Hi Mateuszb,
> 
> I tested with your proposition patch and it is working right.
> I also added the patch with test case.
> Please let me know your thoughts/suggestions.

ChangeLog entry is missing, please write it (and mention there
Mateusz's name/mail as he wrote the i386.c part).

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b3c8676..e54c489 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
 	      && !COMPLEX_MODE_P (mode))
 	    regno = FIRST_SSE_REG;
 	  break;
+	case 8:
+	case 4:
+	  if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+	    break;
+	  if (mode == SFmode || mode == DFmode)
+	    regno = FIRST_SSE_REG;
+	  break;
 	default:
 	  break;
         }
diff --git a/gcc/testsuite/gcc.target/i386/pr88521.c b/gcc/testsuite/gcc.target/i386/pr88521.c
new file mode 100644
index 0000000..f42703a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr88521.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */

You try here to handle both -masm=att and -masm=intel

+/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
+/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */

but not here.  For that it would need to be "movss\[^\n\r]*(?:, %xmm|xmm, )"
and similarly for movsd (please verify with
make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32/-masm=att,-m32/-masm=intel,-m64/-masm=att,-m64/-masm=intel\} i386.exp=pr88521.c'

I'll defer the final review to Uros.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-20 12:16 ` Jakub Jelinek
@ 2018-12-21  9:14   ` Uros Bizjak
  2018-12-21  9:15     ` Jakub Jelinek
  2018-12-21 10:05     ` JonY
  0 siblings, 2 replies; 9+ messages in thread
From: Uros Bizjak @ 2018-12-21  9:14 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Lokesh Janghel, mateuszb, gcc-patches

On Thu, Dec 20, 2018 at 1:09 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
> > Hi Mateuszb,
> >
> > I tested with your proposition patch and it is working right.
> > I also added the patch with test case.
> > Please let me know your thoughts/suggestions.
>
> ChangeLog entry is missing, please write it (and mention there
> Mateusz's name/mail as he wrote the i386.c part).
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index b3c8676..e54c489 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
>               && !COMPLEX_MODE_P (mode))
>             regno = FIRST_SSE_REG;
>           break;
> +       case 8:
> +       case 4:
> +         if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
> +           break;
> +         if (mode == SFmode || mode == DFmode)
> +           regno = FIRST_SSE_REG;
> +         break;
>         default:
>           break;
>          }
> diff --git a/gcc/testsuite/gcc.target/i386/pr88521.c b/gcc/testsuite/gcc.target/i386/pr88521.c
> new file mode 100644
> index 0000000..f42703a
> --- /dev/null
> +++ b/gcc/testsuite/gcc.target/i386/pr88521.c
> @@ -0,0 +1,30 @@
> +/* { dg-do compile { target lp64 } } */
> +/* { dg-options "-O2" } */
> +/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
>
> You try here to handle both -masm=att and -masm=intel
>
> +/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
> +/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */
>
> but not here.  For that it would need to be "movss\[^\n\r]*(?:, %xmm|xmm, )"
> and similarly for movsd (please verify with
> make check-gcc RUNTESTFLAGS='--target_board=unix\{-m32/-masm=att,-m32/-masm=intel,-m64/-masm=att,-m64/-masm=intel\} i386.exp=pr88521.c'
>
> I'll defer the final review to Uros.

This patch should be reviewed and evenutually approved by cygwin/mingw
maintainer.

Uros.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-21  9:14   ` Uros Bizjak
@ 2018-12-21  9:15     ` Jakub Jelinek
  2018-12-21 10:05     ` JonY
  1 sibling, 0 replies; 9+ messages in thread
From: Jakub Jelinek @ 2018-12-21  9:15 UTC (permalink / raw)
  To: Jonathan Yong; +Cc: Lokesh Janghel, mateuszb, gcc-patches

On Fri, Dec 21, 2018 at 10:08:09AM +0100, Uros Bizjak wrote:
> This patch should be reviewed and evenutually approved by cygwin/mingw
> maintainer.

CCing.

	Jakub

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-21  9:14   ` Uros Bizjak
  2018-12-21  9:15     ` Jakub Jelinek
@ 2018-12-21 10:05     ` JonY
  2018-12-26 16:19       ` Lokesh Janghel
  1 sibling, 1 reply; 9+ messages in thread
From: JonY @ 2018-12-21 10:05 UTC (permalink / raw)
  To: Uros Bizjak, Jakub Jelinek; +Cc: Lokesh Janghel, mateuszb, gcc-patches


[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]

On 12/21/18 9:08 AM, Uros Bizjak wrote:
> On Thu, Dec 20, 2018 at 1:09 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
>>> Hi Mateuszb,
>>>
>>> I tested with your proposition patch and it is working right.
>>> I also added the patch with test case.
>>> Please let me know your thoughts/suggestions.
>>
>> ChangeLog entry is missing, please write it (and mention there
>> Mateusz's name/mail as he wrote the i386.c part).
>>

Patch looks good to me, but please add a ChangeLog.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-21 10:05     ` JonY
@ 2018-12-26 16:19       ` Lokesh Janghel
  2018-12-29  2:34         ` JonY
  0 siblings, 1 reply; 9+ messages in thread
From: Lokesh Janghel @ 2018-12-26 16:19 UTC (permalink / raw)
  To: JonY; +Cc: Uros Bizjak, Jakub Jelinek, mateuszb, gcc-patches

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

Hi,

Here is the patch for the issue.
Please let me know your thoughts.

On Fri, Dec 21, 2018 at 3:16 PM JonY <10walls@gmail.com> wrote:
>
> On 12/21/18 9:08 AM, Uros Bizjak wrote:
> > On Thu, Dec 20, 2018 at 1:09 PM Jakub Jelinek <jakub@redhat.com> wrote:
> >>
> >> On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
> >>> Hi Mateuszb,
> >>>
> >>> I tested with your proposition patch and it is working right.
> >>> I also added the patch with test case.
> >>> Please let me know your thoughts/suggestions.
> >>
> >> ChangeLog entry is missing, please write it (and mention there
> >> Mateusz's name/mail as he wrote the i386.c part).
> >>
>
> Patch looks good to me, but please add a ChangeLog.
>
>


-- 
Thanks & Regards
Lokesh Janghel
+91-9752984749

[-- Attachment #2: 88521.patch --]
[-- Type: application/octet-stream, Size: 2158 bytes --]

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 12e8f05..21067f3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-26  Mateusz B  <mateuszb@poczta.onet.pl>
+
+	PR target/88521
+	* config/i386/i386.c (function_value_ms_64): Return small sturct in
+	AX_REG and float/double in FIRST_SSE_REG for 4 or 8 byte modes.
+
 2018-12-19  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
 	* auto-profile.c (afdo_indirect_call): Skip generating histogram
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b3c8676..e54c489 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -9063,6 +9063,13 @@ function_value_ms_64 (machine_mode orig_mode, machine_mode mode,
 	      && !COMPLEX_MODE_P (mode))
 	    regno = FIRST_SSE_REG;
 	  break;
+	case 8:
+	case 4:
+	  if (valtype != NULL_TREE && AGGREGATE_TYPE_P (valtype))
+	    break;
+	  if (mode == SFmode || mode == DFmode)
+	    regno = FIRST_SSE_REG;
+	  break;
 	default:
 	  break;
         }
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 188b6c5..f4b3400 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-26  Mateusz B  <mateuszb@poczta.onet.pl>
+
+	PR target/88521
+	* gcc.target/i386/pr88521.c: New testcase.
+
 2018-12-18  Jakub Jelinek  <jakub@redhat.com>
 
 	PR rtl-optimization/87759
diff --git a/gcc/testsuite/gcc.target/i386/pr88521.c b/gcc/testsuite/gcc.target/i386/pr88521.c
new file mode 100644
index 0000000..f42703a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr88521.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "movl\[^\n\r]*, %eax|mov\[ \t]*eax," 1 } } */
+/* { dg-final { scan-assembler-times "movss\[^\n\r]*, %xmm" 1 } } */
+/* { dg-final { scan-assembler-times "movsd\[^\n\r]*, %xmm" 1 } } */
+typedef struct
+{
+  float x;
+} Float;
+
+Float  __attribute__((ms_abi)) fn1()
+{
+  Float v;
+  v.x = 3.145F;
+  return v;
+}
+
+float  __attribute__((ms_abi))  fn2 ()
+{
+  float v;
+  v = 3.145F;
+  return v;
+}
+
+double  __attribute__((ms_abi))  fn3 ()
+{
+  double v;
+  v = 3.145;
+  return v;
+}

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-26 16:19       ` Lokesh Janghel
@ 2018-12-29  2:34         ` JonY
  2019-01-07  7:31           ` Martin Liška
  0 siblings, 1 reply; 9+ messages in thread
From: JonY @ 2018-12-29  2:34 UTC (permalink / raw)
  To: Lokesh Janghel; +Cc: Uros Bizjak, Jakub Jelinek, mateuszb, gcc-patches


[-- Attachment #1.1: Type: text/plain, Size: 831 bytes --]

On 12/26/18 1:10 PM, Lokesh Janghel wrote:
> Hi,
> 
> Here is the patch for the issue.
> Please let me know your thoughts.
> 
> On Fri, Dec 21, 2018 at 3:16 PM JonY <10walls@gmail.com> wrote:
>>
>> On 12/21/18 9:08 AM, Uros Bizjak wrote:
>>> On Thu, Dec 20, 2018 at 1:09 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>>>
>>>> On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
>>>>> Hi Mateuszb,
>>>>>
>>>>> I tested with your proposition patch and it is working right.
>>>>> I also added the patch with test case.
>>>>> Please let me know your thoughts/suggestions.
>>>>
>>>> ChangeLog entry is missing, please write it (and mention there
>>>> Mateusz's name/mail as he wrote the i386.c part).
>>>>
>>
>> Patch looks good to me, but please add a ChangeLog.
>>
>>
> 
> 

Changelog OK too.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target
  2018-12-29  2:34         ` JonY
@ 2019-01-07  7:31           ` Martin Liška
  0 siblings, 0 replies; 9+ messages in thread
From: Martin Liška @ 2019-01-07  7:31 UTC (permalink / raw)
  To: JonY, Lokesh Janghel; +Cc: Uros Bizjak, Jakub Jelinek, mateuszb, gcc-patches

On 12/29/18 2:30 AM, JonY wrote:
> On 12/26/18 1:10 PM, Lokesh Janghel wrote:
>> Hi,
>>
>> Here is the patch for the issue.
>> Please let me know your thoughts.
>>
>> On Fri, Dec 21, 2018 at 3:16 PM JonY <10walls@gmail.com> wrote:
>>>
>>> On 12/21/18 9:08 AM, Uros Bizjak wrote:
>>>> On Thu, Dec 20, 2018 at 1:09 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>>>>
>>>>> On Thu, Dec 20, 2018 at 01:42:15PM +0530, Lokesh Janghel wrote:
>>>>>> Hi Mateuszb,
>>>>>>
>>>>>> I tested with your proposition patch and it is working right.
>>>>>> I also added the patch with test case.
>>>>>> Please let me know your thoughts/suggestions.
>>>>>
>>>>> ChangeLog entry is missing, please write it (and mention there
>>>>> Mateusz's name/mail as he wrote the i386.c part).
>>>>>
>>>
>>> Patch looks good to me, but please add a ChangeLog.
>>>
>>>
>>
>>
> 
> Changelog OK too.
> 

Thank for the fix, I installed that as r267622.

Martin

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-07  7:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20  8:12 [Patch] Bug 88521 - gcc 9.0 from r266355 miscompile x265 for mingw-w64 target Lokesh Janghel
2018-12-20  8:31 ` Mateusz
2018-12-20 12:16 ` Jakub Jelinek
2018-12-21  9:14   ` Uros Bizjak
2018-12-21  9:15     ` Jakub Jelinek
2018-12-21 10:05     ` JonY
2018-12-26 16:19       ` Lokesh Janghel
2018-12-29  2:34         ` JonY
2019-01-07  7:31           ` Martin Liška

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).