[PATCH] x86/Solaris: correct support for Sun form of CMOV<size>.S

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Tue Jan 21 16:10:29 GMT 2025


Hi Jan,

> PR gas/32579
>
> The deprecated .s (swapped operand encoding) functionality got in the
> way of properly recognizing this specific form. Move the Solaris-
> specific code ahead of that.

thanks for the quick patch.  I've successfully bootstrapped gcc trunk
with it on i386-pc-solaris2.11.  There's one regression in the gcc
testsuite, though:

FAIL: gcc.target/i386/cmov12.c scan-assembler-times cmovg 3

where gcc.log reports

gcc.target/i386/cmov12.c: cmovg found 0 times

No wonder given

--- cmov12.s.bu243	2025-01-21 16:55:27.038829605 +0100
+++ cmov12.s.bu24390	2025-01-21 16:55:44.565051230 +0100
@@ -41,9 +41,9 @@
 	leal	1(%rdx), %ebp
 	movl	(%r11), %esi
 	cmpl	%eax, %esi
-	cmovg	%ebp, %edx
-	cmovg	%r11, %rcx
-	cmovg	%esi, %eax
+	cmovl.g	%ebp, %edx
+	cmovq.g	%r11, %rcx
+	cmovl.g	%esi, %eax

The same failure occurs with /bin/as.  The testcase simply has to be
adjusted for both syntaxes.

Thanks.
	Rainer

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


More information about the Binutils mailing list