From owner-freebsd-arch@FreeBSD.ORG Wed Jul 10 01:08:31 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B6616395 for ; Wed, 10 Jul 2013 01:08:31 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [IPv6:2607:f8b0:400c:c02::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 759FF19FE for ; Wed, 10 Jul 2013 01:08:31 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id p14so4951568vbm.18 for ; Tue, 09 Jul 2013 18:08:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GlemqQyokDRHNPSJ9NgSylPMcymSDZfREKE2GKeNA9k=; b=mGk6Sux4bXDXHye7i21AqxoujNTWUpgDPcewE+3Oyc4ofXaFfKxb213RFUen32XzMW mHqTnbi7senQy4WtnyAXDHDnzMlQnCqxqNxVHeJ/hIyPLU11wn91KxrwrVHc5agzitQY KPxBMALnZxnICOGQMcxnnAxNC3fXBDcZy8JVw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=GlemqQyokDRHNPSJ9NgSylPMcymSDZfREKE2GKeNA9k=; b=d3pzfaxFaPQvNVHQPUkUB1eIoCBK3wbhmHZCPLMSrra++OydAGY4ckW9JsRQV619vP h0kzhJt7W76w4YTg6zOegkyyrSajZhATArumlvb6aZxoTExZDDnU1H8HB7GK3eGT0fOQ qcBXIYL7IrrQ3ko+HhayEjHXHTEVzlf2KxFEx+XhdTgUSK4RgQhLYDUGnXTOYWmMbMl6 r/OupNhvdSW30lmHKTZzlZ32u9jTZho7c9iTnVXb7hp5zaplE6leqgT9SGZuv94o/chk gdl2kOLr9083KoqvVjUjvmOxRJZL6cjtDYLdXU2Bvqr7y3B6qeIu75m5k7RDI2FTqxq2 ZjhA== MIME-Version: 1.0 X-Received: by 10.52.72.49 with SMTP id a17mr5980402vdv.15.1373418510980; Tue, 09 Jul 2013 18:08:30 -0700 (PDT) Received: by 10.221.37.198 with HTTP; Tue, 9 Jul 2013 18:08:30 -0700 (PDT) In-Reply-To: References: <20130709090744.0e497e7e@bender.Home> <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> <20130709234837.559e3769@bender.Home> Date: Tue, 9 Jul 2013 18:08:30 -0700 Message-ID: Subject: Re: Adding a MACHINE_ARCH note From: Peter Wemm To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnLdU1v6km2kl0hynArUXjFKRgqqKeSFONq9eNL5LoJC2iVsPEgJjp+AyBFNiEGRh/waRIs Cc: Baptiste Daroussin , Andrew Turner , freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2013 01:08:31 -0000 On Tue, Jul 9, 2013 at 5:56 PM, Adrian Chadd wrote: > ... boy I'd like to see this particular x86 hiccup fixed before this > stuff is mainstream. I'm not entirely sure how much support there is behind "x32". I don't know if its much more than an academic curiosity or if there's real demand for it. gcc-4.8 and clang have it, or have patches for it. https://sites.google.com/site/x32abi/ http://www.phoronix.com/scan.php?page=news_item&px=MTExNDE > adrian > > On 9 July 2013 17:54, Peter Wemm wrote: >> On Tue, Jul 9, 2013 at 5:40 PM, Adrian Chadd wrote: >>> Someone pointed out there's dirty people running 32-bit binaries using >>> the 64-bit intel/amd instruction set. >>> >>> Is this also able to represent that? >> >> That would be "X32", so there's 3 x86 ABI variants: >> i386 - 32 bit >> amd64 - 32 bit >> amd64 - 64 bit >> >> Incidentally, pkgng has a issues with this. For some reason it lumps >> both i386 and amd64 into a single pseudo-arch called "x86" with a 32 >> and 64 bit variant. It doesn't leave room for distinguishing the two >> incompatible 32 bit architectures. >> >> "x32" is where the compiler generates code where "long" and "pointer" >> are 32 bit, but the instruction set is otherwise amd64 and has all 16 >> general purpose registers available. "long long" is a 64 bit >> register instead of a pair of 32 bit registers like on i386. >> >>> -adrian >>> >>> On 9 July 2013 15:48, Andrew Turner wrote: >>>> On Tue, 9 Jul 2013 08:19:46 -0600 >>>> Warner Losh wrote: >>>>> I thought that the ELF headers gave us all the data we needed to know >>>>> how things were built... >>>> >>>> It will tell us if it was for e.g. an ARM or MIPS ELF file, but I'm not >>>> sure how we can tell the difference between an arm and an armv6 ELF. >>>> >>>> With armv6 there are a few changes in the userland/kernel >>>> interface, e.g. reading the thread local storage pointer is different >>>> such that an armv6 static binary would not run on an ARMv5 core as it >>>> uses newer instructions. >>>> >>>> Andrew >>>> _______________________________________________ >>>> freebsd-arch@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-arch >>>> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >>> _______________________________________________ >>> freebsd-arch@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-arch >>> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org" >> >> >> >> -- >> Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV >> UTF-8: So you can \342\200\231 .. for when a ' just won't do >> ZFS must be the bacon of file systems. "everything's better with ZFS" -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: So you can \342\200\231 .. for when a ' just won't do ZFS must be the bacon of file systems. "everything's better with ZFS"