From owner-freebsd-mips@freebsd.org Sun Nov 20 08:44:43 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61D8AC48790 for ; Sun, 20 Nov 2016 08:44:43 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D8FD4C2A; Sun, 20 Nov 2016 08:44:41 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAK8XPeJ037670 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 20 Nov 2016 09:33:26 +0100 (CET) (envelope-from egrosbein@rdtc.ru) X-Envelope-From: egrosbein@rdtc.ru X-Envelope-To: sbruno@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAK8XHwV005720; Sun, 20 Nov 2016 15:33:17 +0700 (KRAT) (envelope-from egrosbein@rdtc.ru) Subject: libsysdecode (Re: MFC test request) To: Sean Bruno , freebsd-mips@freebsd.org, bdrewery@freebsd.org References: <20161027172820.GA44678@bluezbox.com> <5813143B.3080308@grosbein.net> <57c4bb4f-1bba-5620-9a88-46364830c0d0@freebsd.org> From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <58315FCD.4020102@rdtc.ru> Date: Sun, 20 Nov 2016 15:33:17 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <57c4bb4f-1bba-5620-9a88-46364830c0d0@freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, SPF_SOFTFAIL,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) * 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 08:44:43 -0000 CCing bdrewery due to r308603 log, see later. On 28.10.2016 21:44, Sean Bruno wrote: >> It seems, noone (or so) cares of FreeBSD kernel and userland size anymore. >> For example, it is not possible to build kernel without JAIL overhead etc. > > I tend to care, but I haven't paid attention lately. What kernel config > do you use? Hi! Sorry for not answering you timely. Now I have some time to get back to testing FreeBSD/mips, this time FreeBSD 12. I could not finish mips buildworld due to a breakage in libsysdecode: --- all_subdir_lib/libsysdecode --- ioctl.c: In function 'sysdecode_ioctlname': ioctl.c:428: error: 'CCISS_PASSTHRU32' undeclared (first use in this function) ioctl.c:428: error: (Each undeclared identifier is reported only once ioctl.c:428: error: for each function it appears in.) The symbol CCISS_PASSTHRU32 is defined in the sys/dev/ciss/cissio.h header for __amd64 only. And another one: --- all_subdir_lib/libsysdecode --- ioctl.c:1382: error: 'RAID_ACTION32' undeclared (first use in this function) ioctl.c:1386: error: 'MPTIO_READ_CFG_HEADER32' undeclared (first use in this function) ioctl.c:1390: error: 'MPTIO_READ_CFG_PAGE32' undeclared (first use in this function) ioctl.c:1394: error: 'MPTIO_READ_EXT_CFG_HEADER32' undeclared (first use in this function) ioctl.c:1398: error: 'MPTIO_READ_EXT_CFG_PAGE32' undeclared (first use in this function) ioctl.c:1402: error: 'MPTIO_WRITE_CFG_PAGE32' undeclared (first use in this function) These originate from sys/dev/mpt LSI Fusion-MPT SCSI/Fibre Channel driver driver. Not sure if it runs within the MIPS universe. Reading r308603 commit log message, I suspect this part of code should not be built during buildworld stage but it does for mips. Looking for an advice. Eugene Grosbein From owner-freebsd-mips@freebsd.org Sun Nov 20 15:40:54 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BE68C4BC47 for ; Sun, 20 Nov 2016 15:40:54 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 075DD78F; Sun, 20 Nov 2016 15:40:52 +0000 (UTC) (envelope-from egrosbein@rdtc.ru) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAKFegwQ039019 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 20 Nov 2016 16:40:43 +0100 (CET) (envelope-from egrosbein@rdtc.ru) X-Envelope-From: egrosbein@rdtc.ru X-Envelope-To: sbruno@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAKFeXZ9082303; Sun, 20 Nov 2016 22:40:33 +0700 (KRAT) (envelope-from egrosbein@rdtc.ru) Subject: Re: libsysdecode (Re: MFC test request) To: Sean Bruno , freebsd-mips@freebsd.org, bdrewery@freebsd.org References: <20161027172820.GA44678@bluezbox.com> <5813143B.3080308@grosbein.net> <57c4bb4f-1bba-5620-9a88-46364830c0d0@freebsd.org> <58315FCD.4020102@rdtc.ru> From: Eugene Grosbein Message-ID: <5831C3F1.1040201@rdtc.ru> Date: Sun, 20 Nov 2016 22:40:33 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <58315FCD.4020102@rdtc.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, SPF_SOFTFAIL,T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.7 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) * 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 15:40:54 -0000 On 20.11.2016 15:33, Eugene Grosbein wrote: > I could not finish mips buildworld due to a breakage in libsysdecode: > > --- all_subdir_lib/libsysdecode --- > ioctl.c: In function 'sysdecode_ioctlname': > ioctl.c:428: error: 'CCISS_PASSTHRU32' undeclared (first use in this function) > ioctl.c:428: error: (Each undeclared identifier is reported only once > ioctl.c:428: error: for each function it appears in.) > > The symbol CCISS_PASSTHRU32 is defined in the sys/dev/ciss/cissio.h header for __amd64 only. > And another one: > > --- all_subdir_lib/libsysdecode --- > ioctl.c:1382: error: 'RAID_ACTION32' undeclared (first use in this function) > ioctl.c:1386: error: 'MPTIO_READ_CFG_HEADER32' undeclared (first use in this function) > ioctl.c:1390: error: 'MPTIO_READ_CFG_PAGE32' undeclared (first use in this function) > ioctl.c:1394: error: 'MPTIO_READ_EXT_CFG_HEADER32' undeclared (first use in this function) > ioctl.c:1398: error: 'MPTIO_READ_EXT_CFG_PAGE32' undeclared (first use in this function) > ioctl.c:1402: error: 'MPTIO_WRITE_CFG_PAGE32' undeclared (first use in this function) > > These originate from sys/dev/mpt LSI Fusion-MPT SCSI/Fibre Channel driver driver. > Not sure if it runs within the MIPS universe. > > Reading r308603 commit log message, I suspect this part of code should not be built > during buildworld stage but it does for mips. Looking for an advice. Nevermind, that's a knob WITHOUT_CPP induces this problem. I've moved it from buildworld to installworld stage and problem is gone. Sorry for noise. From owner-freebsd-mips@freebsd.org Sun Nov 20 18:14:40 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 959E4C4C7B3 for ; Sun, 20 Nov 2016 18:14:40 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 34A711F0 for ; Sun, 20 Nov 2016 18:14:39 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAKIET6v039509 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 20 Nov 2016 19:14:29 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAKIEOwb018748 for ; Mon, 21 Nov 2016 01:14:25 +0700 (KRAT) (envelope-from eugen@grosbein.net) From: Eugene Grosbein Subject: MIPS code size strangeness X-Enigmail-Draft-Status: N1110 To: "freebsd-mips@freebsd.org" Message-ID: <5831E800.60003@grosbein.net> Date: Mon, 21 Nov 2016 01:14:24 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:14:40 -0000 Hi! I'm currently struggle trying to fit my FreeBSD 12/mips build into 8M flash available. It used to fit with early 11.0-CURRENT and it has over megabyte overhead with 12.0-CURRENT. Large parts are /usr/bin and /usr/lib and I've found something very strange. For example: /usr/lib/libprivateucl.so.1 has 136064 bytes for amd64 and it has 241560 bytes for mips. "nm -C -D --print-size --size-sort libprivateucl.so.1" shows the symbol "ucl_hash_replace" has 330 bytes (0x14a) for amd64 and it has 25000 bytes (sic! 0x61a8) for mips. I understand that amd64 version is built with clang and MIPS code generated with gcc. But why such large difference? In no way such small function ucl_hash_replace() should expand to 25000 machine code bytes. I suspect other parts of code may have this problem too. Eugene Grosbein From owner-freebsd-mips@freebsd.org Sun Nov 20 22:18:11 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1E05C4C84D for ; Sun, 20 Nov 2016 22:18:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x236.google.com (mail-it0-x236.google.com [IPv6:2607:f8b0:4001:c0b::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDC1013AD for ; Sun, 20 Nov 2016 22:18:11 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x236.google.com with SMTP id y23so90198257itc.0 for ; Sun, 20 Nov 2016 14:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Llv2+KDfPuNVTr8IU3NcvhulbwKKTR9+0UIdeVdlvaE=; b=FW4bIkKxAbtQtxf9metD+8KKimtIDUGilBPTBmellE3lqIk+pgt/XFY/hN5OLoAo9O BglE9am8+18SKWOjh18PwYVd0zu/HnGFpXFRknksdZhg+0kRpFbAsWlYre6jxbifUDnG eyfpGp7E9CwfpEnHQ55QwExuxFWEj1gJRzgzhQncBG7pLVOMWHHMHzr72T20fInVJJ3+ hCQldcV08lca/VhSS/cSdInILkiPeLqwkTKDQNVQIusdvEe3ulAXd5kjdvUukMl1Ndpg ojsCn5KM5TGkNewiHJ+JZvQWxhXAiV5GD0bpldcaGgkoXX1oi2aOBUGrPk/0CzfG1QQ0 S9sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Llv2+KDfPuNVTr8IU3NcvhulbwKKTR9+0UIdeVdlvaE=; b=Xsd6HpV8NViOyt/u0SDQOofJfcz9SDkkJFeoE4JKueBvh5Py0gSHn/0Upe0aLFuwQ3 j/p5eKeJxxYNdbtyTkP9vdoa+Yj4KgR8k7x1GDM+pq1Z7ZHFoARfwYe860uTgjurpmWd uuSpxSz1uwobgcyEUrc/1RM6kRZOwmzR+g7ftqfFX4xUeRG+htkdJ8j9go26S5MMHTO8 oPDMeE08VTMNCta5zM2WdCJy+905LBT3/PruVniDmwYf4NhL7D3CtBmtu31yk2lRbFSm pbrFsinRr2w3jYNm6qakCitNCn5gCQ90amVKMGj9EA7f9haGfFoexDw4nxKvXzJgkoD/ rs8Q== X-Gm-Message-State: AKaTC02JWsurYii9CWJb5UKZeW2zp6OBbzEMEq1cThV/mVnaSmyNejbU5dY3iTHYyAXyUsYTls3CQQovGyOT6g== X-Received: by 10.36.138.67 with SMTP id v64mr6928182itd.39.1479680291165; Sun, 20 Nov 2016 14:18:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Sun, 20 Nov 2016 14:18:10 -0800 (PST) In-Reply-To: <5831E800.60003@grosbein.net> References: <5831E800.60003@grosbein.net> From: Adrian Chadd Date: Sun, 20 Nov 2016 14:18:10 -0800 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 22:18:12 -0000 * is this gcc-4.2 ? * can you disassemble that mips function and see? thanks! -a On 20 November 2016 at 10:14, Eugene Grosbein wrote: > Hi! > > I'm currently struggle trying to fit my FreeBSD 12/mips build into 8M flash available. > It used to fit with early 11.0-CURRENT and it has over megabyte overhead with 12.0-CURRENT. > > Large parts are /usr/bin and /usr/lib and I've found something very strange. > For example: /usr/lib/libprivateucl.so.1 has 136064 bytes for amd64 > and it has 241560 bytes for mips. > > "nm -C -D --print-size --size-sort libprivateucl.so.1" shows the symbol "ucl_hash_replace" > has 330 bytes (0x14a) for amd64 and it has 25000 bytes (sic! 0x61a8) for mips. > > I understand that amd64 version is built with clang and MIPS code generated with gcc. > But why such large difference? In no way such small function ucl_hash_replace() > should expand to 25000 machine code bytes. > > I suspect other parts of code may have this problem too. > > Eugene Grosbein > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Sun Nov 20 22:18:19 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DE2EC4C861 for ; Sun, 20 Nov 2016 22:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6899E13D0 for ; Sun, 20 Nov 2016 22:18:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id l8so75870006iti.1 for ; Sun, 20 Nov 2016 14:18:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=51/D4X8nU6/PbVk2741zDYgpuzYr+XTKwikSCmkz/5w=; b=0aMcR2Vter5yhE7y+KnphEsLcfjymco8HlH2j19L8NGQmTs4CbWb0SU1CuWTxEsdOc dLyi7bFwqMPAzxQW/LEsOXPXgUNZi6OyQBi3GkqMOnrsvbjX+NFZxXccLHwo20Go1X6R BSrKh/6grJ4gufdQvgpC427p2/DLYuqUm3POr9o2pE08aG8hLvENtnQvGq36rOBEUdvq NWO2hW6hjEPNVWAwBUwz/BwAxAMy1OKhSZypdLqCZXw1FAbfYWmuG+Q/X/HKCBVt5mJA Y8S9IIPMeOMql+24FK2vmMq/dySJK8jXr2fyCiRE/kfGGTCVIpViKqXQc+dHvfKaC4it RBrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=51/D4X8nU6/PbVk2741zDYgpuzYr+XTKwikSCmkz/5w=; b=jf6URZes3ug9tRv+/+GxA32zdCygLeNeQJ9bcVl/moPmmOEirgU9lDC7s0dHqjQmjC eG8FhiBGM03b4dafPmPGcRq69Ym0Qy5rX/US9vu23y0T10buNSifcWzozDklR36sipZ3 pCGH4n2tW3nhN/7rL16CgdlBtC2pyHJRHu1UKl6cNBSYZ5OAdD+CDC5gy4fdwMNhdc85 LoflRAjPXKpLxyS6sCWxAtTappnwsZKdAQp/FlMcECvMoPMUAZMUgoeelx48mXk6NWlE KUMs5nEd4m0KZrf09mdh7R3Vsuo6ACG8esWdosWQ4jaWWRY7BQV7FUr/JbK24KKZpC0E Acwg== X-Gm-Message-State: AKaTC017dfHlo+wLxUrgW+APj9I7o+uMLFEAn1QaB1OdKo+H0iwz2AslJQvhGoqJdtoGmG5L1W3wu3CZ7IYlOA== X-Received: by 10.36.200.68 with SMTP id w65mr6726358itf.85.1479680298798; Sun, 20 Nov 2016 14:18:18 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.66 with HTTP; Sun, 20 Nov 2016 14:18:18 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <5831E800.60003@grosbein.net> References: <5831E800.60003@grosbein.net> From: Warner Losh Date: Sun, 20 Nov 2016 15:18:18 -0700 X-Google-Sender-Auth: T_pRyl9oMKnX7MZ4rk5mZ8QZDMo Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 22:18:19 -0000 On Sun, Nov 20, 2016 at 11:14 AM, Eugene Grosbein wrote: > Hi! > > I'm currently struggle trying to fit my FreeBSD 12/mips build into 8M flash available. > It used to fit with early 11.0-CURRENT and it has over megabyte overhead with 12.0-CURRENT. > > Large parts are /usr/bin and /usr/lib and I've found something very strange. > For example: /usr/lib/libprivateucl.so.1 has 136064 bytes for amd64 > and it has 241560 bytes for mips. > > "nm -C -D --print-size --size-sort libprivateucl.so.1" shows the symbol "ucl_hash_replace" > has 330 bytes (0x14a) for amd64 and it has 25000 bytes (sic! 0x61a8) for mips. > > I understand that amd64 version is built with clang and MIPS code generated with gcc. > But why such large difference? In no way such small function ucl_hash_replace() > should expand to 25000 machine code bytes. > > I suspect other parts of code may have this problem too. Keep in mind that FreeBSD uses clang for amd64, which is quite good at code generation, while we still have to use an ancient version of gcc for mips, which is known to produce kinda crappy code for mips. To know for sure, you'll need to look at the code. But since early 11-current, we haven't changed compilers. We've added a lot to the base system, so we may need to prune more than you used to need to do. Warner From owner-freebsd-mips@freebsd.org Mon Nov 21 10:27:23 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E260DC4C542 for ; Mon, 21 Nov 2016 10:27:23 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F39A1D2 for ; Mon, 21 Nov 2016 10:27:22 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALARCaD042842 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 11:27:13 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALAR4Yl081948; Mon, 21 Nov 2016 17:27:04 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> Cc: "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <5832CBF8.2050409@grosbein.net> Date: Mon, 21 Nov 2016 17:27:04 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 10:27:24 -0000 On 21.11.2016 05:18, Adrian Chadd wrote: > * is this gcc-4.2 ? Default buildworld with stock gcc, yes. > * can you disassemble that mips function and see? How do I disasseble it? From owner-freebsd-mips@freebsd.org Mon Nov 21 11:18:28 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31F57C4C660 for ; Mon, 21 Nov 2016 11:18:28 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C416182E for ; Mon, 21 Nov 2016 11:18:27 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALBIGT6043003 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 12:18:17 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: imp@bsdimp.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALBICC3026941; Mon, 21 Nov 2016 18:18:13 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Warner Losh References: <5831E800.60003@grosbein.net> Cc: "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <5832D7F4.9090206@grosbein.net> Date: Mon, 21 Nov 2016 18:18:12 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 11:18:28 -0000 On 21.11.2016 05:18, Warner Losh wrote: > On Sun, Nov 20, 2016 at 11:14 AM, Eugene Grosbein wrote: >> Hi! >> >> I'm currently struggle trying to fit my FreeBSD 12/mips build into 8M flash available. >> It used to fit with early 11.0-CURRENT and it has over megabyte overhead with 12.0-CURRENT. >> >> Large parts are /usr/bin and /usr/lib and I've found something very strange. >> For example: /usr/lib/libprivateucl.so.1 has 136064 bytes for amd64 >> and it has 241560 bytes for mips. >> >> "nm -C -D --print-size --size-sort libprivateucl.so.1" shows the symbol "ucl_hash_replace" >> has 330 bytes (0x14a) for amd64 and it has 25000 bytes (sic! 0x61a8) for mips. >> >> I understand that amd64 version is built with clang and MIPS code generated with gcc. >> But why such large difference? In no way such small function ucl_hash_replace() >> should expand to 25000 machine code bytes. >> >> I suspect other parts of code may have this problem too. > > Keep in mind that FreeBSD uses clang for amd64, which is quite good at > code generation, while we still have to use an ancient version of gcc > for mips, which is known to produce kinda crappy code for mips. To > know for sure, you'll need to look at the code. C code is pretty small and simple. How do I disassemble MIPS machine code? Is it possible to build FreeBSD12/mips with something more modern like gcc6, perhaps? From owner-freebsd-mips@freebsd.org Mon Nov 21 13:28:33 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87B9FC4CB81 for ; Mon, 21 Nov 2016 13:28:33 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1364F19BA for ; Mon, 21 Nov 2016 13:28:33 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id f82so144988540wmf.1 for ; Mon, 21 Nov 2016 05:28:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H6Ipl4my+DKkWWV8NczsxpgaRBaoXqI6Hbcsb59fvTQ=; b=iqRdR2Z6Hm8OQNIdqreBx4m6T8+zwUNVi8p62uVbludmdKOOrxxFpfSISvxJtckXD9 5HP3cFTrzTVWOgqo59RWb0ZeX75K3l/Yp8+1Is0IDb1kLXsrFuJjyoxZFeAMyx0dTJ3O R3cJDUFssNWnhW1sGQhd4VFSwSlToleqhdwbcIjWnXKU8tZCth6yAIq2LUYwJYrItbq9 0uJ++5Jl1ItMUtBf1+2/VglMTWB5rjILYqsRbpGqYdya7xj7/wU56Pv1EyMPQR3Iu9iJ Vqa+E08xKZ4Pkc5UcAt5k64uULS04lost8nigejvVge8mtiu/ISFl71M4yUK6jUkw7pF I6lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H6Ipl4my+DKkWWV8NczsxpgaRBaoXqI6Hbcsb59fvTQ=; b=S/iKLL1SE4etg1Q4w7mqvuV4iCPxokkIF7yuCXVOx6Mn8O66GEpqu9XivI2fqUBppk S8jVfTZmdXv66FzGsseGUU5L1Llam+Rh0OtVyU8wGOgJWcLIADNefhmZbxeVrXX84pQq NmWPe2NoyvGxZWXTgWsb3fREiR/TiuIhcBJbdZh3xAJp0C1LUqzjNHDy8BzxKPixC7Y+ FmFn9E2xG58StczvL0HzozKiuCsEk2IvEqs3OCswbvaMWJQ3gxyfW3y2mWsPyxyZDdsZ LBkAJnUrzn0jU7yFXVd3oJGuKAD1KTWRleckSiXZ8f027sCfX8tJXYKGzbnhtYm79JII ACNA== X-Gm-Message-State: AKaTC00WzzO0cX22FfZ3d3tniI04/mhEGO1GNJomPW/oVtAhW0oZKVYrwwoxGOx6nZaIg4RqsyUH+y3ilkTLvg== X-Received: by 10.28.113.218 with SMTP id d87mr14489255wmi.111.1479734911148; Mon, 21 Nov 2016 05:28:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.152.131 with HTTP; Mon, 21 Nov 2016 05:28:30 -0800 (PST) In-Reply-To: <5832D7F4.9090206@grosbein.net> References: <5831E800.60003@grosbein.net> <5832D7F4.9090206@grosbein.net> From: Michael Zhilin Date: Mon, 21 Nov 2016 16:28:30 +0300 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Warner Losh , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 13:28:33 -0000 Hi Eugene, To disassemble code you can use binutils, but I prefer radare2 (devel/radare2). I've checked both (disclaimer: I'm familiar with MIPS instruction set, but not with x86), and it looks like x86 version uses extra optimization available for x86 platform (XMM instructions): ||| 0x000180e3 66480f6ec1 movq xmm0, rcx ||| 0x000180e8 660f62050035. punpckldq xmm0, xmmword [0x0001b5f0] ||| 0x000180f0 660f5c050835. subpd xmm0, xmmword [0x0001b600] ||| 0x000180f8 660f70c84e pshufd xmm1, xmm0, 0x4e ||| 0x000180fd 660f58c8 addpd xmm1, xmm0 ; 'r' ||| 0x00018101 f20f590d1735. mulsd xmm1, qword [0x0001b620] ||| 0x00018109 f20f10051735. movsd xmm0, qword [0x0001b628] ; [0x1b628:8]=0x43e0000000000000 ||| 0x00018111 660f28d1 movapd xmm2, xmm1 ||| 0x00018115 f20f5cd0 subsd xmm2, xmm0 ||| 0x00018119 f2480f2cc2 cvttsd2si rax, xmm2 ||| 0x0001811e 48b900000000. movabs rcx, -0x8000000000000000 ||| 0x00018128 4831c1 xor rcx, rax ||| 0x0001812b f2480f2cf1 cvttsd2si rsi, xmm1 ||| 0x00018130 660f2ec8 ucomisd xmm1, xmm0 ||| 0x00018134 480f43f1 cmovae rsi, rcx But MIPS instruction set is not so rich for math operations as x86, even "find first set" command is not exists. So implementation of hash functions compiled on MIPS can be long. I suppose it's good place for optimizations. Thanks! On Mon, Nov 21, 2016 at 2:18 PM, Eugene Grosbein wrote: > On 21.11.2016 05:18, Warner Losh wrote: > > On Sun, Nov 20, 2016 at 11:14 AM, Eugene Grosbein > wrote: > >> Hi! > >> > >> I'm currently struggle trying to fit my FreeBSD 12/mips build into 8M > flash available. > >> It used to fit with early 11.0-CURRENT and it has over megabyte > overhead with 12.0-CURRENT. > >> > >> Large parts are /usr/bin and /usr/lib and I've found something very > strange. > >> For example: /usr/lib/libprivateucl.so.1 has 136064 bytes for amd64 > >> and it has 241560 bytes for mips. > >> > >> "nm -C -D --print-size --size-sort libprivateucl.so.1" shows the symbol > "ucl_hash_replace" > >> has 330 bytes (0x14a) for amd64 and it has 25000 bytes (sic! 0x61a8) > for mips. > >> > >> I understand that amd64 version is built with clang and MIPS code > generated with gcc. > >> But why such large difference? In no way such small function > ucl_hash_replace() > >> should expand to 25000 machine code bytes. > >> > >> I suspect other parts of code may have this problem too. > > > > Keep in mind that FreeBSD uses clang for amd64, which is quite good at > > code generation, while we still have to use an ancient version of gcc > > for mips, which is known to produce kinda crappy code for mips. To > > know for sure, you'll need to look at the code. > > C code is pretty small and simple. How do I disassemble MIPS machine code? > > Is it possible to build FreeBSD12/mips with something more modern like > gcc6, perhaps? > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Mon Nov 21 14:05:56 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B82BAC4CD32 for ; Mon, 21 Nov 2016 14:05:56 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 55014171E for ; Mon, 21 Nov 2016 14:05:55 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALE5koF043534 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 15:05:46 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALE5dEx073782; Mon, 21 Nov 2016 21:05:39 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> Cc: "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <5832FF33.9010307@grosbein.net> Date: Mon, 21 Nov 2016 21:05:39 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 14:05:56 -0000 On 21.11.2016 05:18, Adrian Chadd wrote: > * is this gcc-4.2 ? > * can you disassemble that mips function and see? Here it is, Ïutput of "objdump -wDzlsSt --special-syms libprivateucl.so.1" (part of it, singe function): http://www.grosbein.net/freebsd/disas.txt From owner-freebsd-mips@freebsd.org Mon Nov 21 14:46:34 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2793C4CAC7 for ; Mon, 21 Nov 2016 14:46:34 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5A87AF55 for ; Mon, 21 Nov 2016 14:46:34 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id a197so151007302wmd.0 for ; Mon, 21 Nov 2016 06:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=48QEVzBV0zaalZaYp8V8/TP3pThgh2b3VtEw/Mvu2ts=; b=nTJVxntC5wEZGpf+yVXiWj2TVO687gsruzkb2q51YnTeF8csPL1WSwtonMnoRc5I1P zUOfJstwo0ThjDDaL3uuW3ZXdu2zPLSwIztvHHD3IowfOvF+EeA8F7A/syF7YVCny9ii 8O/9zxyBrRmZhCGLqTdGQrsQuqLjezr/ExtZTzToA+4V9eTedW8zHus/dfMWqWkyjLTw 6NeaiRKpzMRKfXZ12m5C4lTAmCuHfSnVyust1SIBptf9LIuGMawMfhlrT45V9hP/bxnx xUoB3GNoFIHqaU5WkjCYcbZSgeJ35gn2mhAf4CdE+J9TrAaOYS6NXwFayaEAvg/0p59U iV9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=48QEVzBV0zaalZaYp8V8/TP3pThgh2b3VtEw/Mvu2ts=; b=O8zsU3NYivOvoQKIjjiiT+XVqbF6jIu/fDAZhhc1FFBGyFMxeDSsJVVgVMYdOLNl6r 9Qx+QL6DXWKfkwKrDjTnySlME2yyiAp1qupv6DFo85RnCmMim/HTXtjBz6kkYxspTnYP o9HI6WN5G75EuXr6iAmU6tSnXY7f3zWhlw3MBjrhb4rK8bglHqgezusVF0j+wHivFRKC yPJbLitBr9xuBnyKB5BznW1frxDBxdq/4AcKk9OfRNzhY/tNI9LK8QPP73k2sMZ2dmLT aMMZ+pbnEAM+SQ0czEZIDdEFrwQFUAHW/205ycWbfJGpx3pGmgzhcm7Ug655pzX9jkCc aqKA== X-Gm-Message-State: AKaTC02WeYabxMAj8Tc2PYBi3IPERIWtk1luBkF8sN/xnbrtQO/H6N7/9MgewAGxsVYaK4iz+cb/C/HDJS6owQ== X-Received: by 10.28.158.82 with SMTP id h79mr14058166wme.19.1479739592749; Mon, 21 Nov 2016 06:46:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.152.131 with HTTP; Mon, 21 Nov 2016 06:46:32 -0800 (PST) In-Reply-To: <5832FF33.9010307@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> From: Michael Zhilin Date: Mon, 21 Nov 2016 17:46:32 +0300 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 14:46:34 -0000 Eugene, Do you use freebsd-wifi-build? freebsd-wifi-build doesn't include this library into mfsroot (no lib, no pain). I have firmware image built by freebsd-wifi-build (for Broadcom SoC) and it's less than 8MB. Thanks, Michael. On Mon, Nov 21, 2016 at 5:05 PM, Eugene Grosbein wrote= : > On 21.11.2016 05:18, Adrian Chadd wrote: > > * is this gcc-4.2 ? > > * can you disassemble that mips function and see? > > Here it is, =D0=BEutput of "objdump -wDzlsSt --special-syms libprivateucl= .so.1" > (part of it, singe function): > http://www.grosbein.net/freebsd/disas.txt > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Mon Nov 21 14:55:05 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6F8DDC4CDBC for ; Mon, 21 Nov 2016 14:55:05 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0866C79F for ; Mon, 21 Nov 2016 14:55:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALEsqCo043686 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 15:54:53 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mizhka@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALEskMa017023; Mon, 21 Nov 2016 21:54:46 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Michael Zhilin References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <58330AB6.60306@grosbein.net> Date: Mon, 21 Nov 2016 21:54:46 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 14:55:05 -0000 On 21.11.2016 21:46, Michael Zhilin wrote: > Eugene, > > Do you use freebsd-wifi-build? freebsd-wifi-build doesn't include this library into mfsroot (no lib, no pain). > I have firmware image built by freebsd-wifi-build (for Broadcom SoC) and it's less than 8MB. My build is originally based on freebsd-wifi-build but I need more. For example, I need pkg(8) to install packages into /usr/local mounted using USB flash storage. From owner-freebsd-mips@freebsd.org Mon Nov 21 16:10:46 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5552BC4CA94 for ; Mon, 21 Nov 2016 16:10:46 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-wm0-x232.google.com (mail-wm0-x232.google.com [IPv6:2a00:1450:400c:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE0EE1DE2 for ; Mon, 21 Nov 2016 16:10:45 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-wm0-x232.google.com with SMTP id f82so153599763wmf.1 for ; Mon, 21 Nov 2016 08:10:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=yXUo2TUev4gFTeJZOSLM2nEFfw5BCP8agJ/7M+4VOWI=; b=L5nGgICvsd/XpGkCGKWF2s5krkUbOY8zeFvgOXSDEPBWFIVXgCet9txa9/k/pGt3jW P7mrM/dtsY2KjyoS15wmcOHSK/YAS8FLkRaHYZWvBVP55mcyxLiN/KWpfZXr0KeJR/u1 MxuDo3D8ASDPmwSBlQls5ULwJGmrTUqYZOS41TV0bQPBFDu4Cjtm8RxcHYhq4a4FF8T8 WTVsOD48PNGDQhd65juGMXVeJGh2tqdV/DDHMwTFLWZfuKFkhRlelDD0GN6lbRASZMCj w+1Ton7ay2chx2aSGLxgpmv4GkSm8NT8Q9N+M0FT0imRiXgyI4sKHSRxfevoXaidpr6W qu8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=yXUo2TUev4gFTeJZOSLM2nEFfw5BCP8agJ/7M+4VOWI=; b=HcsysFYnXSc8zI95WjD3TXIMqFzBW4y2LgR1qEhSoQ3IJZK2WWzuyB9c7z9OqkNXOI JxrIGTXjhLqXwaO0N9m4aowqnuwK/eFniA0APLI3AiLGHBCk1FxsfrHRcRjrYWcOze46 SiSqiW8XjlIvOU5Pj/0CLpdWhDgHwk5kocUcOV3QAAwmnxlsLByZFcVehen/LxDct/7B CmDfJPcyACg6qmt+w0/hrmRjcky4J+BMAoOCjIXVcGI0W17oTzPZls+tXkX4AHiAfC8B FSh7aRaoJC3gYdEKmV9yiA4MeLi7uzUIhs4+lah47t3wsggXUagsHG6gCCi7mEXeGWzg dE3Q== X-Gm-Message-State: AKaTC02WtnHoT8kmxKdqbMX8z/mUpmJMul8Zlp+rbn0GD/HVYNB9G7KB0qlNQN+leQiIC7lw90H5CFKIxqUtrw== X-Received: by 10.28.168.70 with SMTP id r67mr15263615wme.19.1479744643422; Mon, 21 Nov 2016 08:10:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.152.131 with HTTP; Mon, 21 Nov 2016 08:10:42 -0800 (PST) Received: by 10.28.152.131 with HTTP; Mon, 21 Nov 2016 08:10:42 -0800 (PST) In-Reply-To: <58330AB6.60306@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> From: Michael Zhilin Date: Mon, 21 Nov 2016 19:10:42 +0300 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: freebsd-mips@freebsd.org, Adrian Chadd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 16:10:46 -0000 Eugene, LZMA compression? Could you please share list of your mfsroot files? I'll check tonight what can be done with MIPS bits... Thanks! 21 =D0=BD=D0=BE=D1=8F=D0=B1. 2016 =D0=B3. 5:55 PM =D0=BF=D0=BE=D0=BB=D1=8C= =D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Eugene Grosbein" =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > On 21.11.2016 21:46, Michael Zhilin wrote: > > Eugene, > > > > Do you use freebsd-wifi-build? freebsd-wifi-build doesn't include this > library into mfsroot (no lib, no pain). > > I have firmware image built by freebsd-wifi-build (for Broadcom SoC) an= d > it's less than 8MB. > > My build is originally based on freebsd-wifi-build but I need more. > For example, I need pkg(8) to install packages into /usr/local mounted > using USB flash storage. > > From owner-freebsd-mips@freebsd.org Mon Nov 21 16:44:52 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87AD6C4DB98 for ; Mon, 21 Nov 2016 16:44:52 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 087E31A9B for ; Mon, 21 Nov 2016 16:44:51 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALGikgE044089 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 17:44:47 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mizhka@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALGicjA013453; Mon, 21 Nov 2016 23:44:38 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Michael Zhilin References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> Cc: freebsd-mips@freebsd.org, Adrian Chadd From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <58332476.3010009@grosbein.net> Date: Mon, 21 Nov 2016 23:44:38 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 16:44:52 -0000 On 21.11.2016 23:10, Michael Zhilin wrote: > Eugene, > > LZMA compression? Of course. About 30MB uncompressed. > Could you please share list of your mfsroot files? I'll check tonight what can be done with MIPS bits... First, our kernel is pretty large for restricted space, mine is 5MB uncompressed. kern_jail.o is totally unneeded but occupies 248456 bytes. swap_pager.o occupies 227556 bytes despite of NO_SWAPPING kernel option, plus vm_pageout.o has 157676 bytes in size. As for userland, I need complete openssl/openssh{d} "packs" and many other generic UNIX tools: 640 openssl 220 ssh 212 awk 208 less 176 ftp 160 telnet 144 netstat 136 systat 112 grep 96 sftp 92 xz 92 top 92 ee 84 tip 80 sort 68 ssh-keygen 68 find 68 bsdtar ... They depend on lots of shared libraries, largest one is libarchive.so.6: 864 libarchive.so.6 768 libprivatessh.so.5 480 libssl.so.8 236 libprivateucl.so.1 184 liblzma.so.5 164 libpmc.so.5 132 libbsm.so.3 120 libsysdecode.so.5 84 libusb.so.3 84 libgnuregex.so.5 80 libformw.so.5 76 libbz2.so.4 72 libfetch.so.6 68 libform.so.5 56 libpam.so.6 52 libsmb.so.4 ... Some binaries located in /sbin are bigger for MIPS than for amd64, too: 896 init # statically linked 188 ifconfig 184 ipfw 168 fsck_ffs 116 dhclient 88 setkey 48 newfs 40 ping ... And /usr/sbin, too: 960 tcpdump 864 hostapd 324 sshd 152 ntpdate ... Eugene Grosbein From owner-freebsd-mips@freebsd.org Mon Nov 21 16:45:14 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7330BC4DBCC for ; Mon, 21 Nov 2016 16:45:14 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E93121ACC for ; Mon, 21 Nov 2016 16:45:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALGj9fe044099 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 17:45:10 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mizhka@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALGj52t013859; Mon, 21 Nov 2016 23:45:05 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Michael Zhilin References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> Cc: freebsd-mips@freebsd.org, Adrian Chadd From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <58332491.3000706@grosbein.net> Date: Mon, 21 Nov 2016 23:45:05 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 16:45:14 -0000 On 21.11.2016 23:10, Michael Zhilin wrote: > Eugene, > > LZMA compression? Of course. About 30MB uncompressed. > Could you please share list of your mfsroot files? I'll check tonight what can be done with MIPS bits... First, our kernel is pretty large for restricted space, mine is 5MB uncompressed. kern_jail.o is totally unneeded but occupies 248456 bytes. swap_pager.o occupies 227556 bytes despite of NO_SWAPPING kernel option, plus vm_pageout.o has 157676 bytes in size. As for userland, I need complete openssl/openssh{d} "packs" and many other generic UNIX tools: 640 openssl 220 ssh 212 awk 208 less 176 ftp 160 telnet 144 netstat 136 systat 112 grep 96 sftp 92 xz 92 top 92 ee 84 tip 80 sort 68 ssh-keygen 68 find 68 bsdtar ... They depend on lots of shared libraries, largest one is libarchive.so.6: 864 libarchive.so.6 768 libprivatessh.so.5 480 libssl.so.8 236 libprivateucl.so.1 184 liblzma.so.5 164 libpmc.so.5 132 libbsm.so.3 120 libsysdecode.so.5 84 libusb.so.3 84 libgnuregex.so.5 80 libformw.so.5 76 libbz2.so.4 72 libfetch.so.6 68 libform.so.5 56 libpam.so.6 52 libsmb.so.4 ... Some binaries located in /sbin are bigger for MIPS than for amd64, too: 896 init # statically linked 188 ifconfig 184 ipfw 168 fsck_ffs 116 dhclient 88 setkey 48 newfs 40 ping ... And /usr/sbin, too: 960 tcpdump 864 hostapd 324 sshd 152 ntpdate ... Files not mentioned are much smaller. Eugene Grosbein From owner-freebsd-mips@freebsd.org Mon Nov 21 16:47:16 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 22C39C4DC5F for ; Mon, 21 Nov 2016 16:47:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFD4D1B2D for ; Mon, 21 Nov 2016 16:47:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-it0-x233.google.com with SMTP id j191so108433902ita.1 for ; Mon, 21 Nov 2016 08:47:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gDvs+PpIoS5r/M5bPIWoCijNobtT7GLsWDnETBDOsks=; b=DneyqUDLliTov0lNbrk+6h+8VujO43nMaV9u2xg9O3726rV4e/Pqc94zV8rmbLXj4w FENMWhZbT8tbUFJ2fj50jz569wPYp67CzywmF/QFVODX64Prb/b5mFwdBXhX1MiytBI6 DmdwYLaEraJoz9564ZlqDHf12Qi69oN1VZiqn7Lo2UEukO5yQzTGqcMGp1O2uuh5+uqc +LxTO/wULByz7Kvi1zeDOEDicoiDByTFd1Om315qB8tblGzDNACMXkQAZTxSbev9BLyl XRbrYHlOupNcfrx8SBARGpTa7Mp2dGe/6sCUKnv4SEqZN31SnBUafkKL3SzqRcuCYqUQ lfyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gDvs+PpIoS5r/M5bPIWoCijNobtT7GLsWDnETBDOsks=; b=C7x//jBsNUgzIeXf5Pyrzt6Nz/7YswhJPNmQVjk7ylTyDC57b7d5bweOGy08EKy1Np Mq2YoggSDRP6M7q8PRy4k0SmK+ltA9TWaUi9PtdA5BNKaDCWHqu89e73QDtl51ocb9fF 4IjzTMzvyjKNsRLWFdyc1fEyroaTP9cp6wFzEZkD6k/kgWjXN9ijeC+ymO/e9qAB/Sz3 Xg+vwtMu3ZEnefmrSCW5dWEw/rA8qSQ7K8viZOkAeYorN5KOSpB/FFFWeeWDFOMPeAw0 mVsPAQPV0cmLcceNoUIxeivXynLnMwUVfhM82LQiH7+8hPhdyiS/1ZpSVF60ppM59Bp9 hAnw== X-Gm-Message-State: AKaTC03CRcD0HYjTfJDGcdyXO/vQZ98pBy2cZOIsVkNQKqK/f4Za1a7cIql30H+3v7mOgUK9s2wbVDO6Z8SrTw== X-Received: by 10.36.58.85 with SMTP id m82mr9994863itm.29.1479746835245; Mon, 21 Nov 2016 08:47:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Mon, 21 Nov 2016 08:47:14 -0800 (PST) In-Reply-To: <58332491.3000706@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> From: Adrian Chadd Date: Mon, 21 Nov 2016 08:47:14 -0800 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Michael Zhilin , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 16:47:16 -0000 Hiya, Well, let's dig into it a bit more. See what the latest gcc (5, or 6) will do when building a freebsd mips userland. It may also be something stupid - eg we can mark some code to stop inlining. MIPS binaries are going to be bigger than CISC binaries - but it shouldn't be /that/ much bigger. If there's cut/paste code that we can uninline, libraryify, etc to save space then we should. -adrian From owner-freebsd-mips@freebsd.org Mon Nov 21 17:05:13 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20165C4D2C4 for ; Mon, 21 Nov 2016 17:05:13 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AEC2CABD for ; Mon, 21 Nov 2016 17:05:12 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALH57Ul044191 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 18:05:08 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uALH545U031312; Tue, 22 Nov 2016 00:05:04 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> Cc: Michael Zhilin , "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <58332940.8030606@grosbein.net> Date: Tue, 22 Nov 2016 00:05:04 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 17:05:13 -0000 On 21.11.2016 23:47, Adrian Chadd wrote: > Hiya, > > Well, let's dig into it a bit more. See what the latest gcc (5, or 6) > will do when building a freebsd mips userland. It may also be > something stupid - eg we can mark some code to stop inlining. Is it possible to obtain gcc6 MIPS cross-compiler for FreeBSD11/amd64 (my build system) and make our buildworld/buildkernel use it instead of stock gcc 4.2? > MIPS binaries are going to be bigger than CISC binaries - but it > shouldn't be /that/ much bigger. If there's cut/paste code that we can > uninline, libraryify, etc to save space then we should. The C-code in question is not big and has not "copy-paste" parts. From owner-freebsd-mips@freebsd.org Mon Nov 21 18:16:23 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24E10C4CCEA for ; Mon, 21 Nov 2016 18:16:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DFEDD1D96 for ; Mon, 21 Nov 2016 18:16:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x229.google.com with SMTP id x94so47177139ioi.3 for ; Mon, 21 Nov 2016 10:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0V7rdUyCar5lC4RUmw+CS/mUBh6nCzR++ZWo+SjypJA=; b=OWWtbgkg0PNQh/lhAbd6wWbHPTShU3JQyBciPu96XDo50qGbmCLKbT/YdTnHW7IVId MvAACk0IbSVMszeW90n6J2HN/KUKs67ckrFIRphB8S9JzpAhXqU3GzHdeyBxPmK8YhcA L5U4w4jJuzk9UxVw59C/wKKtPEQrKOUziea9gEPYlpXXvL85QDUEPoDeTIFbx98zEKEV Zm+RWAMI03uIa+hjFg+iSWMO8JFryeesxmMl12OC03BBL8aUGGt6WHNwoCjV4gQAq7AS oK9VPaOdNoyo5lMS9Z1LpCU80doarR0DNJSV8OY7kApQndfo6gJttD2BbQWob2I1pWb4 dvRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0V7rdUyCar5lC4RUmw+CS/mUBh6nCzR++ZWo+SjypJA=; b=ehjj1BdTSxarh5K5B3CY9/CzA5roXjvb5g0yW0ggYy9c8zWQFk/QA9o5MznAKnWrw+ Uq5bVPCL/0S/FvTuH03xmQFytPQgGlB8wqQmoherjqFA7YOZ1sdI8NDPP36uqUxjNHAx QPP1otsSNZn/cvHhskYnB5TiYSGyI4yvQqUghTGsu0zkPyRyxfL5snjyQB2Jxnjn96zZ 0lg3WkDzpYRYnBA6sYOQY1upegtHzjc7YvfAgcbLy7gzjO22ruNam6sHKIj0gq0cTA+L tIUHD8e36EfoDU8kJsngvx0PXjHRh7Z1jww0aimqfJu0HwGqtw6X323+ZNUoYIzG/0BH Yx/Q== X-Gm-Message-State: AKaTC00CkWnGgocbTgXHWVKgjSGCsJMdw0SFppLsPgt9PxJ+0KnxeA4+ZyWxVS5J/VgQala3vC16X5rErHMCbg== X-Received: by 10.107.36.144 with SMTP id k138mr12369714iok.177.1479752181318; Mon, 21 Nov 2016 10:16:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Mon, 21 Nov 2016 10:16:20 -0800 (PST) In-Reply-To: <58332940.8030606@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> From: Adrian Chadd Date: Mon, 21 Nov 2016 10:16:20 -0800 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Michael Zhilin , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:16:23 -0000 hi, yes - freebsd-wifi-build defaults to using external gcc now. Try that as a build and see. -adrian On 21 November 2016 at 09:05, Eugene Grosbein wrote: > On 21.11.2016 23:47, Adrian Chadd wrote: >> Hiya, >> >> Well, let's dig into it a bit more. See what the latest gcc (5, or 6) >> will do when building a freebsd mips userland. It may also be >> something stupid - eg we can mark some code to stop inlining. > > Is it possible to obtain gcc6 MIPS cross-compiler for FreeBSD11/amd64 (my build system) > and make our buildworld/buildkernel use it instead of stock gcc 4.2? > >> MIPS binaries are going to be bigger than CISC binaries - but it >> shouldn't be /that/ much bigger. If there's cut/paste code that we can >> uninline, libraryify, etc to save space then we should. > > The C-code in question is not big and has not "copy-paste" parts. > From owner-freebsd-mips@freebsd.org Mon Nov 21 18:20:44 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BA4AC4CE6F for ; Mon, 21 Nov 2016 18:20:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6088E6 for ; Mon, 21 Nov 2016 18:20:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uALIKXSN044593 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 21 Nov 2016 19:20:34 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id uALIKUPV097077 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 22 Nov 2016 01:20:30 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> Cc: Michael Zhilin , "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <58333AE9.9090701@grosbein.net> Date: Tue, 22 Nov 2016 01:20:25 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:20:44 -0000 22.11.2016 1:16, Adrian Chadd пишет: > hi, > > yes - freebsd-wifi-build defaults to using external gcc now. Try that > as a build and see. Thanks! I'll try next day. From owner-freebsd-mips@freebsd.org Mon Nov 21 22:43:06 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB60FC4D3A5 for ; Mon, 21 Nov 2016 22:43:06 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DB9616F7 for ; Mon, 21 Nov 2016 22:43:06 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-wm0-x231.google.com with SMTP id g23so7124094wme.1 for ; Mon, 21 Nov 2016 14:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nq4QqHkN45DP8jYUp/nXnFYmxNqibP3i7AKPy9PbD2A=; b=AGPHZMxseHAWfjNhOR55NI0ypYfjXdLmQ4HW+tltkp1Fb7hgp8eZeEoFsltY9XspJu 1R5Dz10Kc5kGhpYuTI8OTCdqEojfzJd8F/u3t52UyyNuVQt4/44OAoIw6RqUl0hFW7NE YDVnCOaNJu98LNHAP5wGdSPOaBcheyRCs/IFuQ/pH+wSiYl573/ENHrw2Zj0G8mobRgC cmnBFe/buVBLu8qMW7j3hILIJBg50BXvR/MH+gXGzjLP0XfbQX+5UaaZG/1ZQe/xC3CF QdV9Q4t9FZ7RCA8KMFFpYrdtdX+7kvmSviXrbvgRO+A8TdYK6oNqDqv8ohCAdAxh7PBi iShA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=nq4QqHkN45DP8jYUp/nXnFYmxNqibP3i7AKPy9PbD2A=; b=cb6XKHokAW0v/qcY2PRP9eMvB7TxVOhM89tVY0ol9L5by4sotq+1X51kXv7c31+CSP KeNBmXKVhSylFGrtdfCT3T66NaRSwEcRzyh9sgyPCIlCCklKl2ogh+mXU9VUKeTphu5B m8K8kC3kDPPAU5g5cHtos2XAMi+BTV7SQi4126Jmjwe7fj2cROs0VrVart2aQ4Saf6JL Y9L/eUXL46OFaksVKGSRGlIroGwo4RPoTKgyelpy1fuCstBajOIEQkfdAaen0axnuZMM nmgFwK65WqU2kGfMPXBbB/EizJ1KryxCddZHj5ugd9NyNWR5g0lpXwv2aRTcb7CI+1Tk rVdQ== X-Gm-Message-State: AKaTC012wC/EcANumeAnU0DlbqMxviq4AMyX7ppQ+jcRTEo3kik1wSk8Rvqi6fED/8Tp55oystwMv/fWqmlylQ== X-Received: by 10.28.29.23 with SMTP id d23mr16530891wmd.91.1479768184559; Mon, 21 Nov 2016 14:43:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.152.131 with HTTP; Mon, 21 Nov 2016 14:43:03 -0800 (PST) In-Reply-To: <58333AE9.9090701@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58333AE9.9090701@grosbein.net> From: Michael Zhilin Date: Tue, 22 Nov 2016 01:43:03 +0300 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 22:43:06 -0000 I've made experiment with ucl: #ifndef kh_inline #ifdef _MSC_VER #define kh_inline __inline #else #ifdef __mips__ #define kh_inline #else #define kh_inline inline #endif /* __mips__ */ #endif /* _MSC_VER */ #endif /* kh_inline */ It allows to make code small, and small improvement: libprivateucl.so size is 200Kb (-30Kb) To be continued... Thanks! On Mon, Nov 21, 2016 at 9:20 PM, Eugene Grosbein wrote= : > 22.11.2016 1:16, Adrian Chadd =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > >> hi, >> >> yes - freebsd-wifi-build defaults to using external gcc now. Try that >> as a build and see. >> > > Thanks! I'll try next day. > > > From owner-freebsd-mips@freebsd.org Tue Nov 22 00:48:12 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6E1CC4D5D5 for ; Tue, 22 Nov 2016 00:48:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x229.google.com (mail-io0-x229.google.com [IPv6:2607:f8b0:4001:c06::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A78541321 for ; Tue, 22 Nov 2016 00:48:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x229.google.com with SMTP id j65so55242915iof.0 for ; Mon, 21 Nov 2016 16:48:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ikDmL16H27DobdXs7F4CUmkCgoV3cKkxM+raavW79HA=; b=Qxd8FiIvp3fGUTaG9B+W+GtDWuQcLps6ss9Ky3LYn83J8+fVQGaIu3PV/IZi0leP27 7E9kdTGV0DnOHWOAalifVlyTTIxqcnZXUS9+LJlDNfufi5ZQfUe9l1Pr6KJjokwx3Cnz VSoeWHyWuEVc4nS7dLKkxgeA34FeC+/WUdLU5W8BhU/86CWrKc+G1MRqZlnO5KzqIAoF K4KJCFk2ngrOC0ebchalliMHSKT8/ekYHEFYNETo7mhlTWA2Xkg7kYvdxKTigvTb4gZm CWTRwBZZj3SXlyRO75MKmEjp6FK7PkWNCya1eP8yMouYeBdyJWhrBIdyjzNrENT5V6Oz MvAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ikDmL16H27DobdXs7F4CUmkCgoV3cKkxM+raavW79HA=; b=APnrvpfGNZ9KJsLbkazbjCimmWBXJrzpxRdFdD94cM2LaWxB5rEH3RckCgoH7gnAjW wvrqcOieZYEWp6LFYMPwijZnaBunyqTZG7JoqcXsoXzFGWoZbqRx4E2P4mWBXjfWOkR7 3XiYEuA0LAQwHM5KlMRcrhWcGYpUmDRpoSufcD53nC9+PCpr5ZE3bSj6MwOIAqdsQDPO SCf3S8w7bRAEBx0xCBIRbXjWRdy9ielOyr0cjg30eFQa/R015vF9Zd9BhuhRyF2TC/dM rxwzs6Cv35vXlvbtUVh0ikGgA2tb19ncEdy0THOI0PVE68pNo1jnesS8RpfdTnFtdAD2 Wmbw== X-Gm-Message-State: AKaTC01ZOHFuh2Sgjm/0tJ83b4hywE7pqCGGZQYxgzJj5IZNCpDz08l94bTws1O8H3LUOpq4FtAA727bOaOKVQ== X-Received: by 10.107.36.144 with SMTP id k138mr13896624iok.177.1479775692248; Mon, 21 Nov 2016 16:48:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Mon, 21 Nov 2016 16:48:11 -0800 (PST) In-Reply-To: References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58333AE9.9090701@grosbein.net> From: Adrian Chadd Date: Mon, 21 Nov 2016 16:48:11 -0800 Message-ID: Subject: Re: MIPS code size strangeness To: Michael Zhilin Cc: Eugene Grosbein , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 00:48:13 -0000 mmm auto-inlining. We can tweak some of the compiler line stuff to get it to reject inlining in some instances. -adrian From owner-freebsd-mips@freebsd.org Tue Nov 22 15:51:43 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC735C4C60B for ; Tue, 22 Nov 2016 15:51:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 65FEB1449 for ; Tue, 22 Nov 2016 15:51:42 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAMFpQPN049919 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Nov 2016 16:51:27 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAMFpGEp030625; Tue, 22 Nov 2016 22:51:16 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> Cc: Michael Zhilin , "freebsd-mips@freebsd.org" From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <58346974.2020907@grosbein.net> Date: Tue, 22 Nov 2016 22:51:16 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 15:51:43 -0000 On 22.11.2016 01:16, Adrian Chadd wrote: > hi, > > yes - freebsd-wifi-build defaults to using external gcc now. Try that > as a build and see. You mean I need to use TARGET_CROSS_TOOLCHAIN, do I? Looking at /usr/src/Makefile.inc1 - CROSS_TOOLCHAIN refers to ${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk but T cannot find a port that whould install such kind of .mk file. From owner-freebsd-mips@freebsd.org Wed Nov 23 22:11:28 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7875C51FF4 for ; Wed, 23 Nov 2016 22:11:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 71C1F1A17 for ; Wed, 23 Nov 2016 22:11:28 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id j65so48780177iof.0 for ; Wed, 23 Nov 2016 14:11:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6gGKy0Tao9XiEgMhjhejsjqdWEo+Kb+cS8O8hX4WkwE=; b=vt4+dJkEJ/laxCjleJacyskyxRGd2QTYAz87bpzaVdlYsBct+bbSHf7V+CUAzhRHNe gBrprljEUR5RIJQimH9w5O6tbc/b3bIHqxI28zjqb06Hszu6kLN3yPNnqIrptRjVAuKO J4els+8M3zjGSSmixEcDSSD0EU/OCD+K5aBFDlVCZjU2zgYYxUPz1AQaEzLqB1okvRBA mMvh/mSdGkw709ycBNO5QQosObAnKuID1diMW4i7a+V/xutuT/gG70DbDfpowiHdoYOU rv6RRWXdJ3zgPCS83jD7bDzEXZe26wS7F93XyQz6d2Kyb8bKsiBjZcAxhG0g0aip1lUb 4E7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6gGKy0Tao9XiEgMhjhejsjqdWEo+Kb+cS8O8hX4WkwE=; b=G/Zgmt5FvFPFzTVY5NQTGyV2zOddanb9nI3Vt10TDUoZNvsGcVOcKbHUDsex4iGy8E f8r2uaPZ5I4zQTD9eUoUqQRTSMFdm8eFbMIlVl8BtSGbyE98FSY/uVBMlqdB16EtmKS3 Lgaj9uRlL02Nbqvpz8zUMPn8+5inbXb0++r/J3LYsk90icA9+3VreE3yXXfB1OMCXJVP UFbMPhPuRXdxxIOWLUQyaQyHJ8ylxp55SmiwuYnLWU3JfgFcz4DsNNvY6OVOBKPgvfLL XxvU+v5gnQ5NW2EBfP65nDQzq6CKcbExxnG/ciZbk9txnmO9L70339xLzaAk9i5cmTNJ 4RIA== X-Gm-Message-State: AKaTC029bmK7k8Zde6LU/Eop6QK1HSHv9UhvuNYyYvWIAiMVO8SlBOeVJ+zK08m0Zxlcb2BpcF8So/BdCyKV0A== X-Received: by 10.107.136.86 with SMTP id k83mr4858225iod.99.1479939087798; Wed, 23 Nov 2016 14:11:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Wed, 23 Nov 2016 14:11:26 -0800 (PST) In-Reply-To: <58346974.2020907@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58346974.2020907@grosbein.net> From: Adrian Chadd Date: Wed, 23 Nov 2016 14:11:26 -0800 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Michael Zhilin , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 22:11:28 -0000 It's the mips-xtoolchain or xtoolchain-mips-gcc or something -a On 22 November 2016 at 07:51, Eugene Grosbein wrote: > On 22.11.2016 01:16, Adrian Chadd wrote: >> hi, >> >> yes - freebsd-wifi-build defaults to using external gcc now. Try that >> as a build and see. > > You mean I need to use TARGET_CROSS_TOOLCHAIN, do I? > > Looking at /usr/src/Makefile.inc1 - CROSS_TOOLCHAIN refers to ${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk > but T cannot find a port that whould install such kind of .mk file. > From owner-freebsd-mips@freebsd.org Thu Nov 24 16:28:46 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 74140C53618 for ; Thu, 24 Nov 2016 16:28:46 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0C8199 for ; Thu, 24 Nov 2016 16:28:45 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAOGSUnu002505 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Nov 2016 17:28:31 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAOGSM82089346; Thu, 24 Nov 2016 23:28:22 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58346974.2020907@grosbein.net> Cc: Michael Zhilin , "freebsd-mips@freebsd.org" From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <58371526.4050908@grosbein.net> Date: Thu, 24 Nov 2016 23:28:22 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 1.9 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 16:28:46 -0000 On 24.11.2016 05:11, Adrian Chadd wrote: > It's the mips-xtoolchain or xtoolchain-mips-gcc or something Thanks! I've changed the port devel/powerpc64-gcc (master port for devel/mips-gcc) slightly to build gcc-6.2.0 instead of gcc-5.3.0 and it builds and installs just fine using command make FREEBSD_EXTENSION=yes install Then, I've installed devel/mips-xtoolchain-gcc and run buildworld using CROSS_TOOLCHAIN=mips-gcc. It fails: --- cancelpoints_sem_new.o --- {standard input}: Assembler messages: {standard input}:1347: Error: opcode not supported on this processor: mips1 (mips1) `ll $5,4($4)' {standard input}:1350: Error: opcode not supported on this processor: mips1 (mips1) `sc $5,4($4)' {standard input}:1360: Error: opcode not supported on this processor: mips1 (mips1) `sync' {standard input}:1456: Error: opcode not supported on this processor: mips1 (mips1) `ll $4,0($17)' {standard input}:1459: Error: opcode not supported on this processor: mips1 (mips1) `sc $4,0($17)' {standard input}:1469: Error: opcode not supported on this processor: mips1 (mips1) `sync' {standard input}:1697: Error: opcode not supported on this processor: mips1 (mips1) `sync' {standard input}:1702: Error: opcode not supported on this processor: mips1 (mips1) `ll $5,4($4)' {standard input}:1705: Error: opcode not supported on this processor: mips1 (mips1) `sc $5,4($4)' *** [cancelpoints_sem_new.o] Error code 1 I try to build code for TP-Link WDR3600. I'm not familiar with MIPS assembler. Is there a way to alter gcc6 code generator to avoid this error? Eugene Grosbein From owner-freebsd-mips@freebsd.org Thu Nov 24 17:41:05 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 954C2C533D9 for ; Thu, 24 Nov 2016 17:41:05 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 453FAEB for ; Thu, 24 Nov 2016 17:41:04 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAOHetDq002713 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 Nov 2016 18:40:55 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian.chadd@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAOHek7U094536; Fri, 25 Nov 2016 00:40:46 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Adrian Chadd References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58346974.2020907@grosbein.net> <58371526.4050908@grosbein.net> Cc: "freebsd-mips@freebsd.org" From: Eugene Grosbein X-Enigmail-Draft-Status: N1110 Message-ID: <5837261E.9040700@grosbein.net> Date: Fri, 25 Nov 2016 00:40:46 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <58371526.4050908@grosbein.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_06_12, LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 1.9 DATE_IN_FUTURE_06_12 Date: is 6 to 12 hours after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 17:41:05 -0000 On 24.11.2016 23:28, Eugene Grosbein wrote: > On 24.11.2016 05:11, Adrian Chadd wrote: >> It's the mips-xtoolchain or xtoolchain-mips-gcc or something > > Thanks! > > I've changed the port devel/powerpc64-gcc (master port for devel/mips-gcc) slightly > to build gcc-6.2.0 instead of gcc-5.3.0 and it builds and installs just fine > using command make FREEBSD_EXTENSION=yes install > > Then, I've installed devel/mips-xtoolchain-gcc and run buildworld using CROSS_TOOLCHAIN=mips-gcc. > It fails: > > --- cancelpoints_sem_new.o --- > {standard input}: Assembler messages: > {standard input}:1347: Error: opcode not supported on this processor: mips1 (mips1) `ll $5,4($4)' > {standard input}:1350: Error: opcode not supported on this processor: mips1 (mips1) `sc $5,4($4)' > {standard input}:1360: Error: opcode not supported on this processor: mips1 (mips1) `sync' > {standard input}:1456: Error: opcode not supported on this processor: mips1 (mips1) `ll $4,0($17)' > {standard input}:1459: Error: opcode not supported on this processor: mips1 (mips1) `sc $4,0($17)' > {standard input}:1469: Error: opcode not supported on this processor: mips1 (mips1) `sync' > {standard input}:1697: Error: opcode not supported on this processor: mips1 (mips1) `sync' > {standard input}:1702: Error: opcode not supported on this processor: mips1 (mips1) `ll $5,4($4)' > {standard input}:1705: Error: opcode not supported on this processor: mips1 (mips1) `sc $5,4($4)' > *** [cancelpoints_sem_new.o] Error code 1 > > I try to build code for TP-Link WDR3600. > I'm not familiar with MIPS assembler. Is there a way to alter gcc6 code generator to avoid this error? I've managed to build FreeBSD12/mips using gcc6 and additional src.conf knobs: CROSS_TOOLCHAIN=mips-gcc WITHOUT_CROSS_COMPILER=yes CROSSENV+=CFLAGS="-march=mips32" This time, ucl_hash_replace() function takes 628 bytes (0x274) instead of 25000: # nm -C -D --print-size --size-sort libprivateucl.so.1 | grep ucl_hash_replace 0003098c 00000274 T ucl_hash_replace However, libprivateucl.so.1 still takes 247224 bytes in case of FreeBSD12/mips comparing with 136064 bytes in case of FreeBSD11/amd64. From owner-freebsd-mips@freebsd.org Thu Nov 24 19:01:29 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1F70C532CB for ; Thu, 24 Nov 2016 19:01:29 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 33148E36 for ; Thu, 24 Nov 2016 19:01:29 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-wm0-x229.google.com with SMTP id a197so123331106wmd.0 for ; Thu, 24 Nov 2016 11:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Kp1+FJhmtBQKgZO7FOkaTXBblSOKYDdkku0VELrZkcw=; b=vm4dM1M+ri+G2EvTEkBYTbcSxGPTtqPO/yPRfGLVAVguPok3R0+bgCex3huaLz3wH9 DKv0rQm4B4on3KsykUPEmSLAO5ztJyz5fezEgI0zOncPmyCf14eUifdZyM/4h2d4OU3y 2zDezKapK2jLU2XeGH3qFCYKwFD8RA9avgX+2OSEinHCDgzhl4JrhZ7PG8YzyBnuJbhf zYwiXyHqfbx7eBSXd15wyHviopGJiX3mg4XOb+PC+7mzFZzTs9bTEkhUTUj6iqVJ0Mch J1CBRr45/fgUs9zR2ANFhtl7HONBnTknp+A5ACtqOBICeEtAMOgy3Il1PB8c9AH4M69p w8WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Kp1+FJhmtBQKgZO7FOkaTXBblSOKYDdkku0VELrZkcw=; b=Yvc2f2kLvTI4zeVJajIvHEDqjbHgsiJo5tl4W02XWQNuGcUhFFn56JsJo2Yyy1bCgI NkfpYyOX0sl6GtbOylAjStuKfG97rwtfMvuO7MI+sOuAZ1z71PQwVFK/SNgXvPyqTmah 1noXAx1t9+jY4vpY2ABCyE/myzYpIeflNX9AJLbD/VcGGiHGiirrV0Cjz6TGc26uS+3g bvRlgguSlwzcxiLcVYj/gMdLbhQEMcXUF887iU/wgbo+U6Fpa3aC8nXdtyzqxbja1oMC zBi8+pT0VoNZheHiIEKsAjJWODVyO76iWI4a/3mxZecWsP51msl1Z0UeoZjZiEH5H6W3 sL1g== X-Gm-Message-State: AKaTC01GL6I9HV+P8M0vAnLL+88sWInkWENqTGEFq/Hf5cAFQxZgKYpzQuFm76GK3riL5qgSHCS/84zx9cEk4A== X-Received: by 10.28.113.218 with SMTP id d87mr3573660wmi.111.1480014086316; Thu, 24 Nov 2016 11:01:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.70.197 with HTTP; Thu, 24 Nov 2016 11:01:25 -0800 (PST) In-Reply-To: <5837261E.9040700@grosbein.net> References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58346974.2020907@grosbein.net> <58371526.4050908@grosbein.net> <5837261E.9040700@grosbein.net> From: Michael Zhilin Date: Thu, 24 Nov 2016 22:01:25 +0300 Message-ID: Subject: Re: MIPS code size strangeness To: Eugene Grosbein Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:01:29 -0000 Mm... size of libprivateucl.so.1 was 241560 and new size is 247224? Strange. Could you please compare old & new versions? On Thu, Nov 24, 2016 at 8:40 PM, Eugene Grosbein wrote: > On 24.11.2016 23:28, Eugene Grosbein wrote: > > On 24.11.2016 05:11, Adrian Chadd wrote: > >> It's the mips-xtoolchain or xtoolchain-mips-gcc or something > > > > Thanks! > > > > I've changed the port devel/powerpc64-gcc (master port for > devel/mips-gcc) slightly > > to build gcc-6.2.0 instead of gcc-5.3.0 and it builds and installs just > fine > > using command make FREEBSD_EXTENSION=yes install > > > > Then, I've installed devel/mips-xtoolchain-gcc and run buildworld using > CROSS_TOOLCHAIN=mips-gcc. > > It fails: > > > > --- cancelpoints_sem_new.o --- > > {standard input}: Assembler messages: > > {standard input}:1347: Error: opcode not supported on this processor: > mips1 (mips1) `ll $5,4($4)' > > {standard input}:1350: Error: opcode not supported on this processor: > mips1 (mips1) `sc $5,4($4)' > > {standard input}:1360: Error: opcode not supported on this processor: > mips1 (mips1) `sync' > > {standard input}:1456: Error: opcode not supported on this processor: > mips1 (mips1) `ll $4,0($17)' > > {standard input}:1459: Error: opcode not supported on this processor: > mips1 (mips1) `sc $4,0($17)' > > {standard input}:1469: Error: opcode not supported on this processor: > mips1 (mips1) `sync' > > {standard input}:1697: Error: opcode not supported on this processor: > mips1 (mips1) `sync' > > {standard input}:1702: Error: opcode not supported on this processor: > mips1 (mips1) `ll $5,4($4)' > > {standard input}:1705: Error: opcode not supported on this processor: > mips1 (mips1) `sc $5,4($4)' > > *** [cancelpoints_sem_new.o] Error code 1 > > > > I try to build code for TP-Link WDR3600. > > I'm not familiar with MIPS assembler. Is there a way to alter gcc6 code > generator to avoid this error? > > I've managed to build FreeBSD12/mips using gcc6 and additional src.conf > knobs: > > CROSS_TOOLCHAIN=mips-gcc > WITHOUT_CROSS_COMPILER=yes > CROSSENV+=CFLAGS="-march=mips32" > > This time, ucl_hash_replace() function takes 628 bytes (0x274) instead of > 25000: > > # nm -C -D --print-size --size-sort libprivateucl.so.1 | grep > ucl_hash_replace > 0003098c 00000274 T ucl_hash_replace > > However, libprivateucl.so.1 still takes 247224 bytes in case of > FreeBSD12/mips > comparing with 136064 bytes in case of FreeBSD11/amd64. > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@freebsd.org Fri Nov 25 10:27:44 2016 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 853FAC54AF8 for ; Fri, 25 Nov 2016 10:27:44 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C08CC52 for ; Fri, 25 Nov 2016 10:27:43 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id uAPARXqX006221 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Nov 2016 11:27:33 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: mizhka@gmail.com Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id uAPARTc8058465; Fri, 25 Nov 2016 17:27:29 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: MIPS code size strangeness To: Michael Zhilin References: <5831E800.60003@grosbein.net> <5832FF33.9010307@grosbein.net> <58330AB6.60306@grosbein.net> <58332491.3000706@grosbein.net> <58332940.8030606@grosbein.net> <58346974.2020907@grosbein.net> <58371526.4050908@grosbein.net> <5837261E.9040700@grosbein.net> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Eugene Grosbein Message-ID: <58381211.7020907@grosbein.net> Date: Fri, 25 Nov 2016 17:27:29 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.3 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_24_48, LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 2.0 DATE_IN_FUTURE_24_48 Date: is 24 to 48 hours after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: ** X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 10:27:44 -0000 On 25.11.2016 02:01, Michael Zhilin wrote: > Mm... size of libprivateucl.so.1 was 241560 and new size is 247224? Strange. Could you please compare old & new versions? The code is the same. Only compiler is different.