From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F23F53858407; Wed, 30 Aug 2023 12:56:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F23F53858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693400173; bh=tE+ospUPHGg42nrVvfa6LjZEetT/lENQTJ3lYjtbWpc=; h=From:To:Subject:Date:From; b=dBkcnGRfwaIrPW43obE0qfiWJIw7vNEXOANR78A5x+yJCRS2voVNFxBp/5AbPp2Rz YjsVh1tRoL6I49tpcwr45aHOaHgO3JA9iVvkY+iiFw7ASLcYxTPTu4bIy8kjE076v6 gIqxSx8IxISscXTPV5BWss0hCt4aAf86+VaE3LF8= From: "fxcoudert at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/111237] New: fp-int-convert-float64x.c fails on x86_64-apple-darwin with "ambiguous instructions require an explicit suffix" Date: Wed, 30 Aug 2023 12:56:12 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fxcoudert at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111237 Bug ID: 111237 Summary: fp-int-convert-float64x.c fails on x86_64-apple-darwin with "ambiguous instructions require an explicit suffix" Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: fxcoudert at gcc dot gnu.org Target Milestone: --- Many of these messages: /var/folders/h8/9hx_fyj91053ksgdzb2w03vw0000gp/T//ccO1vBzR.s:16:2: error: ambiguous instructions require an explicit suffix (could be 'filds', or 'fildl') fild -8(%rbp) ^ /var/folders/h8/9hx_fyj91053ksgdzb2w03vw0000gp/T//ccO1vBzR.s:19:2: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') fisttp -8(%rbp) ^ This is on a cross-compiler from aarch64-apple-darwin22 to x86_64-apple-darwin22, but I think it would be the same on a native compile= r. Short reproducer: $ cat toto.c=20 int main(void) { unsigned char ivin; unsigned char ivout; _Float64x fv1; _Float64x fv2; ivin =3D 0; fv1 =3D 0; fv2 =3D (_Float64x) ivin; ivout =3D (unsigned char) fv1; } $ ./bin/x86_64-apple-darwin22-gcc toto.c -c /var/folders/h8/9hx_fyj91053ksgdzb2w03vw0000gp/T//ccn0Y3rC.s:14:2: error: ambiguous instructions require an explicit suffix (could be 'filds', or 'fildl') fild -66(%rbp) ^ /var/folders/h8/9hx_fyj91053ksgdzb2w03vw0000gp/T//ccn0Y3rC.s:17:2: error: ambiguous instructions require an explicit suffix (could be 'fisttps', or 'fisttpl') fisttp -66(%rbp) ^ $ ./bin/x86_64-apple-darwin22-gcc toto.c -S $ cat toto.s=20 .text .globl _main _main: LFB0: pushq %rbp LCFI0: movq %rsp, %rbp LCFI1: movb $0, -1(%rbp) fldz fstpt -32(%rbp) movzbl -1(%rbp), %eax movw %ax, -66(%rbp) fild -66(%rbp) fstpt -48(%rbp) fldt -32(%rbp) fisttp -66(%rbp) movzwl -66(%rbp), %eax movb %al, -49(%rbp) movl $0, %eax popq %rbp LCFI2: ret LFE0: .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support EH_frame1: .set L$set$0,LECIE1-LSCIE1 .long L$set$0 LSCIE1: .long 0 .byte 0x1 .ascii "zR\0" .byte 0x1 .byte 0x78 .byte 0x10 .byte 0x1 .byte 0x10 .byte 0xc .byte 0x7 .byte 0x8 .byte 0x90 .byte 0x1 .align 3 LECIE1: LSFDE1: .set L$set$1,LEFDE1-LASFDE1 .long L$set$1 LASFDE1: .long LASFDE1-EH_frame1 .quad LFB0-. .set L$set$2,LFE0-LFB0 .quad L$set$2 .byte 0 .byte 0x4 .set L$set$3,LCFI0-LFB0 .long L$set$3 .byte 0xe .byte 0x10 .byte 0x86 .byte 0x2 .byte 0x4 .set L$set$4,LCFI1-LCFI0 .long L$set$4 .byte 0xd .byte 0x6 .byte 0x4 .set L$set$5,LCFI2-LCFI1 .long L$set$5 .byte 0xc .byte 0x7 .byte 0x8 .align 3 LEFDE1: .ident "GCC: (GNU) 14.0.0 20230830 (experimental)" .subsections_via_symbols For the record, the assembler is called as: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolc= hain/usr/bin/clang" -cc1as -triple x86_64-apple-macosx13.0.0 -filetype obj -main-file-name ccImMDJg.s -target-cpu penryn -fdebug-compilation-dir=3D/tmp/irun -dwarf-debug-producer "Apple clang version 14.0.3 (clang-1403.0.22.14.1)" -dwarf-version=3D4 -mrelocation-model pic --mrelax-relocations -mllvm -x86-pad-for-align=3Dfalse -mllvm -disable-aligned-alloc-awareness=3D1 -o t= oto.o /var/folders/h8/9hx_fyj91053ksgdzb2w03vw0000gp/T//ccImMDJg.s=