From mint-bounce@lists.fishpool.fi Fri Nov 14 10:47:45 2008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :organization:user-agent:mime-version:to:subject:content-type; bh=ZCKQq6qhc3kQ7hDSU+BSSPAsylcs1Tyf4pCdF9YDGrA=; b=SM0vDEP4tmK5Q2xIaQxQxjNtWb2Wnt4yCwXi2BcxNiTsnxXrp5vFQDdL0xIn/SrwkI Mv+lxoflpvCXuk08kri2wctgTdlE2oypKaEdnFtUrmXqxZTk9IWjOzxW9dpespDT49y4 P4IGm9PIursq6O/9rAP5BgW/wEiQO/Us22c3s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:organization:user-agent:mime-version:to :subject:content-type; b=hTQJVA2jmWvFnrSn5Dp8nYj21Sl2G1w4ATVkMppxzB6BBtvcbQpi5o91B6UPB6IIEN qLeE/h8/HQ6yca0a49k/4zwEA/CuJ6Zw8SLBExGdhCxrWXvcE6pyKxSoqeMgZQ6NCPIV TJOLSyz3me2QZnvXHjwisSzfw2ba+XfFJykI4= Message-ID: <491D9C31.2090300@gmail.com> Date: Fri, 14 Nov 2008 16:41:37 +0100 From: Miro Kropacek Organization: Mystic Bytes User-Agent: Thunderbird 2.0.0.17 (X11/20080922) MIME-Version: 1.0 To: mint Subject: [MiNT] xif inline patches Content-Type: multipart/mixed; boundary="------------070208010202070304030401" X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: miro.kropacek@gmail.com Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: This is a multi-part message in MIME format. --------------070208010202070304030401 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit Hi, when I tried to compile whole freemint kernel against gcc 4.3.2 I found some errors with inline asm routines which doesn't appear in gcc 2.95 so here's the fix. Thanks to Vincent for idea how to fix it in a quick and elegant way :) -- MiKRO / Mystic Bytes http://mikro.atari.org --------------070208010202070304030401 Content-Type: text/x-diff; name="asm_inlines.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="asm_inlines.patch" Index: sys/sockets/inet4/tcputil.c =================================================================== RCS file: /mint/freemint/sys/sockets/inet4/tcputil.c,v retrieving revision 1.4 diff -u -r1.4 tcputil.c --- sys/sockets/inet4/tcputil.c 13 Jul 2007 21:32:52 -0000 1.4 +++ sys/sockets/inet4/tcputil.c 14 Nov 2008 15:35:49 -0000 @@ -431,28 +431,28 @@ "clrl d0 \n\t" "movew %2, d1 \n\t" "lsrw #4, d1 \n\t" - "beq l4 \n\t" + "beq 4f \n\t" "subqw #1, d1 \n" /* clears X bit */ - "l1: \n\t" + "1: \n\t" "moveml %4@+, d0/d2-d4 \n\t" /* 16 byte loop */ "addxl d0, %0 \n\t" /* ~5 clock ticks per byte */ "addxl d2, %0 \n\t" "addxl d3, %0 \n\t" "addxl d4, %0 \n\t" - "dbra d1, l1 \n\t" + "dbra d1, 1b \n\t" "clrl d0 \n\t" "addxl d0, %0 \n" - "l4: \n\t" + "4: \n\t" "movew %2, d1 \n\t" "andiw #0xf, d1 \n\t" "lsrw #2, d1 \n\t" - "beq l2 \n\t" + "beq 2f \n\t" "subqw #1, d1 \n" - "l3: \n\t" + "3: \n\t" "addl %4@+, %0 \n\t" /* 4 byte loop */ "addxl d0, %0 \n\t" /* ~10 clock ticks per byte */ - "dbra d1, l3 \n" - "l2: \n\t" + "dbra d1, 3b \n" + "2: \n\t" : "=d"(sum), "=a"(dgram) : "g"(len), "0"(sum), "1"(dgram) : "d0", "d1", "d2", "d3", "d4" @@ -466,17 +466,17 @@ ( "clrl d0 \n\t" "btst #1, %2 \n\t" - "beq l5 \n\t" + "beq 5f \n\t" "addw %4@+, %0 \n\t" /* extra word */ "addxw d0, %0 \n" - "l5: \n\t" + "5: \n\t" "btst #0, %2 \n\t" - "beq l6 \n\t" + "beq 6f \n\t" "moveb %4@+, d1 \n\t" /* extra byte */ "lslw #8, d1 \n\t" "addw d1, %0 \n\t" "addxw d0, %0 \n" - "l6: \n\t" + "6: \n\t" "movel %0, d1 \n\t" /* convert to short */ "swap d1 \n\t" "addw d1, %0 \n\t" Index: sys/sockets/inet4/udp.c =================================================================== RCS file: /mint/freemint/sys/sockets/inet4/udp.c,v retrieving revision 1.7 diff -u -r1.7 udp.c --- sys/sockets/inet4/udp.c 25 Nov 2003 19:06:20 -0000 1.7 +++ sys/sockets/inet4/udp.c 14 Nov 2008 15:35:50 -0000 @@ -515,28 +515,28 @@ "clrl d0 \n\t" "movew %2, d1 \n\t" "lsrw #4, d1 \n\t" - "beq l4 \n\t" + "beq 4f \n\t" "subqw #1, d1 \n" /* clears X bit */ - "l1: \n\t" + "1: \n\t" "moveml %4@+, d0/d2-d4 \n\t" /* 16 byte loop */ "addxl d0, %0 \n\t" /* ~5 clock ticks per byte */ "addxl d2, %0 \n\t" "addxl d3, %0 \n\t" "addxl d4, %0 \n\t" - "dbra d1, l1 \n\t" + "dbra d1, 1b \n\t" "clrl d0 \n\t" "addxl d0, %0 \n" - "l4: \n\t" + "4: \n\t" "movew %2, d1 \n\t" "andiw #0xf, d1 \n\t" "lsrw #2, d1 \n\t" - "beq l2 \n\t" + "beq 2f \n\t" "subqw #1, d1 \n" - "l3: \n\t" + "3: \n\t" "addl %4@+, %0 \n\t" /* 4 byte loop */ "addxl d0, %0 \n\t" /* ~10 clock ticks per byte */ - "dbra d1, l3 \n" - "l2: \n\t" + "dbra d1, 3b \n" + "2: \n\t" : "=d"(sum), "=a"(dgram) : "g"(len), "0"(sum), "1"(dgram) : "d0", "d1", "d2", "d3", "d4" @@ -550,17 +550,17 @@ ( "clrl d0 \n\t" "btst #1, %2 \n\t" - "beq l5 \n\t" + "beq 5f \n\t" "addw %4@+, %0 \n\t" /* extra word */ "addxw d0, %0 \n" - "l5: \n\t" + "5: \n\t" "btst #0, %2 \n\t" - "beq l6 \n\t" + "beq 6f \n\t" "moveb %4@+, d1 \n\t" /* extra byte */ "lslw #8, d1 \n\t" "addw d1, %0 \n\t" "addxw d0, %0 \n" - "l6: \n\t" + "6: \n\t" "movel %0, d1 \n\t" /* convert to short */ "swap d1 \n\t" "addw d1, %0 \n\t" Index: sys/sockets/xif/de600.h =================================================================== RCS file: /mint/freemint/sys/sockets/xif/de600.h,v retrieving revision 1.1 diff -u -r1.1 de600.h --- sys/sockets/xif/de600.h 29 Jun 2000 21:07:22 -0000 1.1 +++ sys/sockets/xif/de600.h 14 Nov 2008 15:35:50 -0000 @@ -249,12 +249,12 @@ "moveb %2@(18), d0 \n" "lsrb #4, d0 \n" "subqw #2, %0 \n" - "l1: \n" + "1: \n" "orb %2@(2), d0 \n" "moveb d0, %1@+ \n" "moveb %2@(18), d0 \n" "lsrb #4, d0 \n" - "dbra %0, l1 \n" + "dbra %0, 1b \n" "orb %2@(18), d0 \n" "moveb d0, %1@ \n" : "=d"(len), "=a"(cp) @@ -272,7 +272,7 @@ { __asm__ volatile ( "subqw #1, %0 \n" - "l2: \n" + "2: \n" "moveb %1@+, d0 \n" "addw d0, d0 \n" "movew d0, d1 \n" @@ -282,7 +282,7 @@ "andw %5, d0 \n" "bset #4, d0 \n" "tstb %2@(d0:w) \n" - "dbra %0, l2 \n" + "dbra %0, 2b \n" : "=d"(len), "=a"(cp) : "a"(de600_base), "0"(len), "1"(cp), "d"(0x1e0) : "d0", "d1"); --------------070208010202070304030401--