From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26552 invoked by alias); 18 May 2012 07:25:41 -0000 Received: (qmail 26527 invoked by uid 22791); 18 May 2012 07:25:38 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 May 2012 07:25:21 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 658363770006 for ; Fri, 18 May 2012 08:25:20 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G1uYiKvYrdu1; Fri, 18 May 2012 08:25:17 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001344] Allow nc_test_slave for lwIP to compile for targets with 128KiB RAM. X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: NEW X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Fri, 18 May 2012 07:25:00 -0000 Message-Id: <20120518072517.B7A962F78001@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-05/txt/msg00061.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001344 --- Comment #28 from Ilija Kocho 2012-05-18 08:25:03 B= ST --- (In reply to comment #27) > (In reply to comment #26) > >=20 > > CYGBLD_ATTRIB_UNUSED, contrary to what it's name implies, will keep the > > variable. Ref: Bug 1001520 >=20 > Oh yes, I'd already forgotten that conversation. The GCC documentation is= still > unclear on that point. In that case, we needed a memory access to a parti= cular > location. That happened courtesy of derefencing a volatile pointer set to= an > absolute address.=20 >=20 > I think this case might be a little different though as the volatile vari= able > has entirely local scope. No manufactured addresses are involved that cou= ld (in > principle) be affected by other agents. >=20 I think that "volatile" is strong enough so compiler wouldn't dare to drop = it even for an automatic variable. Here is the dump for our case. The code is optimized indeed, but the computation of critical expression is maintained.= =20 do_some_random_computation(int p) { // Just something that might be "hard" volatile double x CYGBLD_ATTRIB_UNUSED; x =3D ((p * 10) * 3.14159) / 180.0; // radians 560: 4620 mov r0, r4 562: f010 fea3 bl 112ac <__aeabi_i2d> 566: a30c add r3, pc, #48 ; (adr r3, 598 ) 568: e9d3 2300 ldrd r2, r3, [r3] 56c: f010 ff04 bl 11378 <__aeabi_dmul> 570: a30b add r3, pc, #44 ; (adr r3, 5a0 ) 572: e9d3 2300 ldrd r2, r3, [r3] 576: f011 f829 bl 115cc <__aeabi_ddiv> 57a: 340a adds r4, #10 net_load(cyg_addrword_t who) { int i; while (true) { cyg_semaphore_wait(&load_thread_sem[who]); for (i =3D 0; i < load_thread_level; i++) { 57c: 42ac cmp r4, r5 static void do_some_random_computation(int p) { // Just something that might be "hard" volatile double x CYGBLD_ATTRIB_UNUSED; x =3D ((p * 10) * 3.14159) / 180.0; // radians 57e: e9cd 0100 strd r0, r1, [sp] net_load(cyg_addrword_t who) { int i; while (true) { cyg_semaphore_wait(&load_thread_sem[who]); for (i =3D 0; i < load_thread_level; i++) { 582: d1ed bne.n 560 do_some_random_computation(i); } cyg_thread_delay(1); // Wait until the next 'tick' 584: 2001 movs r0, #1 586: 2100 movs r1, #0 588: f003 f820 bl 35cc cyg_semaphore_post(&load_thread_sem[who]); 58c: 4630 mov r0, r6 58e: f003 f86b bl 3668 } 592: e7db b.n 54c 594: f3af 8000 nop.w 598: f01b866e .word 0xf01b866e 59c: 400921f9 .word 0x400921f9 5a0: 00000000 .word 0x00000000 5a4: 40668000 .word 0x40668000 5a8: 70002cac .word 0x70002cac 5ac: 700033c8 .word 0x700033c8 > I wonder if you can use both USED and UNUSED at the same time. Given their > intended functions, you should be able to, despite the English meanings > implying they are in some way opposites to each other. That would deal wi= th the > uncertainty. Then we get ...warning: =E2=80=98used=E2=80=99 attribute ignored... as per = Comment #26. Ilija --=20 Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=3Demail ------- You are receiving this mail because: ------- You are on the CC list for the bug.