public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Cc: qing zhao <qing.zhao@oracle.com>
Subject: [COMMITTED] testsuite: i386: Fix gcc.target/i386/apx-ndd-cmov.c on Solaris/x86
Date: Fri, 02 Feb 2024 09:34:21 +0100	[thread overview]
Message-ID: <yddcytfqn76.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

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

gcc.target/i386/apx-ndd-cmov.c FAILs on 64-bit Solaris/x86 with the
native assembler:

FAIL: gcc.target/i386/apx-ndd-cmov.c scan-assembler-times cmove[^\\n\\r]*, %eax 1
FAIL: gcc.target/i386/apx-ndd-cmov.c scan-assembler-times cmovge[^\\n\\r]*, %eax 1

The gas vs. as difference is

-       cmove   c+4(%rip), %esi, %eax
+       cmovl.e c+4(%rip), %esi, %eax

-       cmovge  %ecx, %edx, %eax
+       cmovl.ge        %ecx, %edx, %eax

This patch accounts for both forms.

Tested on i386-pc-solaris2.11 (as and gas) and i686-pc-linux-gnu.

Committed to trunk.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2024-02-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc/testsuite:
	* gcc.target/i386/apx-ndd-cmov.c (scan-assembler-times): Allow for
	cmovl.e, cmovl.ge.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: solx86-testsuite-apx-ndd-cmov-as.patch --]
[-- Type: text/x-patch, Size: 768 bytes --]

# HG changeset patch
# Parent  b7b9c1365b7c54f5c0e618608af26512175c3333
testsuite: i386: Fix gcc.target/i386/apx-ndd-cmov.c on Solaris/x86

diff --git a/gcc/testsuite/gcc.target/i386/apx-ndd-cmov.c b/gcc/testsuite/gcc.target/i386/apx-ndd-cmov.c
--- a/gcc/testsuite/gcc.target/i386/apx-ndd-cmov.c
+++ b/gcc/testsuite/gcc.target/i386/apx-ndd-cmov.c
@@ -1,7 +1,7 @@
 /* { dg-do compile { target { ! ia32 } } } */
 /* { dg-options "-O2 -m64 -mapxf" } */
-/* { dg-final { scan-assembler-times "cmove\[^\n\r]*, %eax" 1 } } */
-/* { dg-final { scan-assembler-times "cmovge\[^\n\r]*, %eax" 1 } } */
+/* { dg-final { scan-assembler-times "cmov(l\.)?e\[^\n\r]*, %eax" 1 } } */
+/* { dg-final { scan-assembler-times "cmov(l\.)?ge\[^\n\r]*, %eax" 1 } } */
 
 unsigned int c[4];
 

                 reply	other threads:[~2024-02-02  8:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddcytfqn76.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=qing.zhao@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).