Bug#286393: marked as done (gcc generates wrong assembler for xchgb on amd64/x86_64.)
Your message dated Fri, 11 Mar 2005 09:58:57 +0100 with message-id <[EMAIL PROTECTED]> and subject line Bug#286393: Status of bug report has caused the attached Bug report to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -- Received: (at submit) by bugs.debian.org; 19 Dec 2004 23:49:46 + >From [EMAIL PROTECTED] Sun Dec 19 15:49:46 2004 Return-path: <[EMAIL PROTECTED]> Received: from asia.telenet-ops.be [195.130.132.59] by spohr.debian.org with esmtp (Exim 3.35 1 (Debian)) id 1CgAo5-0005a5-00; Sun, 19 Dec 2004 15:49:45 -0800 Received: from localhost (localhost.localdomain [127.0.0.1]) by asia.telenet-ops.be (Postfix) with SMTP id 30E782240B5 for <[EMAIL PROTECTED]>; Mon, 20 Dec 2004 00:49:44 +0100 (MET) Received: from kabel.telenet.be (D5775FD9.kabel.telenet.be [213.119.95.217]) by asia.telenet-ops.be (Postfix) with ESMTP id BF74A2240A8 for <[EMAIL PROTECTED]>; Mon, 20 Dec 2004 00:49:42 +0100 (MET) Received: by kabel.telenet.be (Postfix, from userid 501) id 7B31626136; Mon, 20 Dec 2004 00:49:42 +0100 (CET) Date: Mon, 20 Dec 2004 00:49:42 +0100 From: Kurt Roeckx <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: gcc generates wrong assembler for xchgb on amd64/x86_64. Message-ID: <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5vNYLRcllDrimb99" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Sender: [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 (1.212-2003-09-23-exp) on spohr.debian.org X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE autolearn=no version=2.60-bugs.debian.org_2004_03_25 X-Spam-Level: --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Package: gcc-3.3 Version: 3.3.5-4 Hi, The libsdl1.2 package is currently failing to build on amd64. The problem seem to be that gcc generates incorrect assembler, or atleast assember that as from binutils version 2.15-5 has a problem with. The attached file compiled with -O2 -S gives the following assembler: .LFE28: .size SDL_WriteLE16, .-SDL_WriteLE16 .p2align 4,,15 .globl SDL_WriteBE16 .type SDL_WriteBE16, @function SDL_WriteBE16: .LFB30: subq$8, %rsp .LCFI7: movl$1, %ecx movl$2, %edx movw%si, 6(%rsp) #APP xchgb %sil,%ax #NO_APP movw%si, 6(%rsp) leaq6(%rsp), %rsi call*16(%rdi) addq$8, %rsp ret As gives the following error: SDL_endian.S: Assembler messages: SDL_endian.S:136: Error: suffix or operands invalid for `xchg' Which is the line: xchgb %sil,%ax The same generated with -O1 -S gives: .LFE28: .size SDL_WriteLE16, .-SDL_WriteLE16 .globl SDL_WriteBE16 .type SDL_WriteBE16, @function SDL_WriteBE16: .LFB30: subq$8, %rsp .LCFI7: movw%si, 6(%rsp) movl%esi, %eax #APP xchgb %al,%ah #NO_APP movw%ax, 6(%rsp) movl$1, %ecx movl$2, %edx leaq6(%rsp), %rsi call*16(%rdi) addq$8, %rsp ret The same SDL_Swap16() function is used in both SDL_ReadBE16() and SDL_WriteBE16(). The call generated code for SDL_ReadBE16 always has "xchgb %al,%ah". The same thing tried with gcc-3.4 -O2 also fails and generates this instead: .LFE21: .size SDL_WriteLE16, .-SDL_WriteLE16 .p2align 4,,15 .globl SDL_WriteBE16 .type SDL_WriteBE16, @function SDL_WriteBE16: .LFB22: subq$8, %rsp .LCFI7: movq%rdi, %rax movl$1, %ecx movw%si, 6(%rsp) movl$2, %edx #APP xchgb %sil,%si #NO_APP movw%si, 6(%rsp) leaq6(%rsp), %rsi call*16(%rax) addq$8, %rsp ret Kurt --5vNYLRcllDrimb99 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="SDL_endian.i" # 1 "../../../SDL-1.2.7+1.2.8cvs20041007/src/endian/SDL_endian.c" # 1 "" # 1 "" # 1 "../../../SDL-1.2.7+1.2.8cvs20041007/src/endian/SDL_endian.c" # 30 "../../../SDL-1.2.7+1.2.8cvs20041007/src/endian/SDL_endian.c" # 1 "../../../SDL-1.2.7+1.2.8cvs20041007/include/SDL_endian.h" 1 # 45 "../../../SDL-1.2.7+1.2.8cvs20041007/include/SDL_endian.h" # 1 "/usr/include/stdio.h" 1 3 4 # 28 "/usr/include/stdio.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 295 "/usr/include/features.h" 3 4 # 1 "/usr/include/sys/cde
Results for 3.4.4 20050305 (prerelease) (Debian 3.4.3-11) testsuite on m68k-linux
LAST_UPDATED: Sat Mar 5 10:55:02 UTC 2005 Native configuration is m68k-linux (akire) === gpc tests === Running target any FAIL: emil24.pas FAIL: fjf328.pas FAIL: fjf347.pas FAIL: kurzw2.pas === gpc Summary === # of tests3953 # of expected passes 3946 # of unexpected failures 4 # of unsupported tests3 /build/buildd/gcc-3.4-3.4.3/build/gcc/xgpc version 20040516, based on gcc-3.4.4 20050305 (prerelease) (Debian 3.4.3-11) === g++ tests === Running target unix FAIL: g++.dg/abi/bitfield4.C execution test FAIL: g++.dg/eh/omit-frame-pointer.C execution test FAIL: g++.dg/eh/registers1.C execution test WARNING: program timed out. FAIL: g++.dg/parse/stack1.C (test for excess errors) XPASS: g++.dg/rtti/tinfo1.C scan-assembler _ZTIP9CTemplateIhE: XPASS: g++.dg/rtti/tinfo1.C scan-assembler-not .globl[ \\t]+_ZTIP9CTemplateIhE FAIL: g++.old-deja/g++.eh/ia64-1.C execution test WARNING: g++.old-deja/g++.mike/p10769a.C compilation failed to produce executable WARNING: g++.old-deja/g++.other/enum5.C compilation failed to produce executable XPASS: g++.old-deja/g++.other/init5.C execution test WARNING: g++.old-deja/g++.pt/friend44.C compilation failed to produce executable === g++ Summary === # of expected passes9745 # of unexpected failures5 # of unexpected successes 3 # of expected failures 71 # of unsupported tests 83 /build/buildd/gcc-3.4-3.4.3/build/gcc/testsuite/../g++ version 3.4.4 20050305 (prerelease) (Debian 3.4.3-11) === g77 tests === Running target unix === g77 Summary === # of expected passes1812 # of unsupported tests 6 /build/buildd/gcc-3.4-3.4.3/build/gcc/testsuite/../g77 version 3.4.4 20050305 (prerelease) (Debian 3.4.3-11) === gcc tests === Running target unix WARNING: program timed out. FAIL: gcc.c-torture/compile/20001226-1.c -O2 (test for excess errors) WARNING: program timed out. FAIL: gcc.c-torture/compile/20001226-1.c -O3 -fomit-frame-pointer (test for excess errors) WARNING: program timed out. FAIL: gcc.c-torture/compile/20001226-1.c -O3 -g (test for excess errors) WARNING: program timed out. FAIL: gcc.c-torture/compile/20001226-1.c -Os (test for excess errors) FAIL: gcc.c-torture/compile/921118-1.c -O3 -fomit-frame-pointer (test for excess errors) FAIL: gcc.c-torture/compile/921118-1.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/execute/builtins/string-3.c execution, -O1 FAIL: gcc.c-torture/execute/builtins/string-3.c execution, -O2 FAIL: gcc.c-torture/execute/builtins/string-3.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/builtins/string-3.c execution, -O3 -g FAIL: gcc.c-torture/execute/builtins/string-3.c execution, -Os FAIL: gcc.c-torture/execute/20001108-1.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/20001108-1.c execution, -O3 -g FAIL: gcc.c-torture/execute/20001203-2.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/20001203-2.c execution, -O3 -g FAIL: gcc.c-torture/execute/20020418-1.c execution, -O1 FAIL: gcc.c-torture/execute/20020418-1.c execution, -O2 FAIL: gcc.c-torture/execute/20020418-1.c execution, -Os FAIL: gcc.c-torture/execute/20020720-1.c compilation, -O1 UNRESOLVED: gcc.c-torture/execute/20020720-1.c execution, -O1 FAIL: gcc.c-torture/execute/930921-1.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.c-torture/execute/930921-1.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions FAIL: gcc.c-torture/execute/950511-1.c compilation, -O3 -fomit-frame-pointer UNRESOLVED: gcc.c-torture/execute/950511-1.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/950511-1.c compilation, -O3 -g UNRESOLVED: gcc.c-torture/execute/950511-1.c execution, -O3 -g FAIL: gcc.c-torture/execute/961213-1.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions FAIL: gcc.c-torture/execute/loop-2f.c execution, -O0 FAIL: gcc.c-torture/execute/loop-2f.c execution, -O1 FAIL: gcc.c-torture/execute/loop-2f.c execution, -O2 FAIL: gcc.c-torture/execute/loop-2f.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/loop-2f.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.c-torture/execute/loop-2f.c execution, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions FAIL: gcc.c-torture/execute/loop-2f.c execution, -O3 -g FAIL: gcc.c-torture/execute/loop-2f.c execution, -Os FAIL: gcc.c-torture/execute/loop-2g.c execution, -O0 FAIL: gcc.c-torture/execute/loop-2g.c execution, -O1 FAIL: gcc.c-torture/execute/loop-2g.c execution, -O2 FAIL: gcc.c-torture/execute/loop-2g.c execution, -O3 -fomit-frame-pointer FAIL: gcc.c-torture/execute/loop-2g.c execution, -O3 -fomit-frame-pointer -funroll-loops FAIL: gcc.c-torture/execute/loop-2g.c execution, -O3 -fomi