From owner-freebsd-arm@freebsd.org Wed Jul 10 20:29:22 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3130C15E2E8A for ; Wed, 10 Jul 2019 20:29:22 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A16770C99 for ; Wed, 10 Jul 2019 20:29:21 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1562790558; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=Cv19Dfi9JHbljpewpeJNDL4CdF7da17BZ35LtFlFqM+leOk88llhTx9tEj3FLRrNXdjnvWmzBtRlj QlkII0R67g6K0rUjD8vPoOzVO9xOSkZRGme6rzSN6ZCA/bWI1L/g91OK21kgZfkQRDezHRShkowY/Q WLwe06gfy57soeRyTBtUPXwZl/106yqDz815iafnU5u3WPe27MLZ5prwsxmdwQQ36otigR6hd+i0SL mtGkoP4ucrA0DFXAQRwVss6XNxmEuEuCEEMU0RJf5CKwgTyGcsYcT5swPazW/qz6w5LQTrvns/5nUO 1eXdgG00gX9hXHKKctryBD9vOY5j77g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=+vUmuaSoB3F3abjChblfZszxSsbUtmT1d3WDEKZE3OI=; b=mPNS1evXzLX7aAUiX54AOdDkaVO2zsBty5UBLtmb0w3bsYau0p0NJ4RQ3Rr5RLvsG4sthYANaUO2E xoLiMgOI9Jgaqx5YY1JBodzvmAfsgumlt6DfUJe19FR1+sAOhueYfc9uFFI3bLGyo5u3ZmAJRqd+Nm MeUP26fV0/jCCYeV+EI6tH4ALPGSOYS9lzSjbwU7am3fRBGK+8FfcSYYc2JlsIHUy6eXlomBOGyEt9 L+ELnuIJATe3u6a1kPp2AYSrQwn49VDffMUq3kt5t+8OheEw2fboLhahoYX+LFjeBUCjswUbORHej2 md9UHnw0g4GQJrRnoGXSNZ5IYjEP7aw== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=+vUmuaSoB3F3abjChblfZszxSsbUtmT1d3WDEKZE3OI=; b=hU+LoHoaQ1HebYfPg5oKJplHPcJwAKQEaNIRVSIaZwxOPWn0fUdoyJ9k9vWHvjGXVfSm5LTHeg16X MNvVmf26mjF+YDGwaDVzC3OvMwiVfjO7PZdC44k7+7Dk947cFGlgfN3DNDlsI1ir3v16XKybMAAqcs v5UYjOVcH6GbTuAPOsEXtW9iIznnVAui2D7IoM9WL8kqv0fi20UBGPYZXC0EWG31VxCpiDPoz1yHAc zeXWZY0ZV/CH96+nePh++/m1jrxkfpXeLIqR7DLKZYn6eWKx/VTwbIHNGo2lKP4I4PM5uNDPLpQFNO DcOumfkl8k0P6K1xiUw5Qi8t4c637qg== X-MHO-RoutePath: aGlwcGll X-MHO-User: 624fd866-a351-11e9-bf28-17c4af33bcc3 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id 624fd866-a351-11e9-bf28-17c4af33bcc3; Wed, 10 Jul 2019 20:29:16 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x6AKTEMC013831; Wed, 10 Jul 2019 14:29:14 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1788e13e706b9fdaf610e4ddd671a5ed715f9dfe.camel@freebsd.org> Subject: Re: FreeBSD arm EABI5 documentation? From: Ian Lepore To: adr Cc: freebsd-arm@freebsd.org Date: Wed, 10 Jul 2019 14:29:14 -0600 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 6A16770C99 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; ASN(0.00)[asn:16509, ipnet:52.58.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jul 2019 20:29:22 -0000 On Wed, 2019-07-10 at 20:00 +0000, adr wrote: > > [...] > > The good news is that freebsd is in sync with pretty much the entire > > rest of the world in this regard. EABI (aka gnueabihf) is the standard > > used by all major OSes and toolchains these days for armv7. And clang > > is very gcc-compatible; if you have code that compiles with modern gcc, > > it should compile with no changes using clang; even command-line > > options and flags are compatible. > > In NetBSD (and Linux by the way) the C stack aligment of 32bit arm code > doesn't have to be 8 bytes. The last version I tested of gcc was 8.3. > I'm talking about assembler, of course, using gcc to link the runtime > c code without going crazy. I have not used OpenBSD for years, so I don't > know how things are there today. > That's... odd. The arm spec requires the stack to be 8-byte aligned at any public interface. It's hard to imagine how anything could work properly if it were not, given that the toolchains will assume that 64- bit values are aligned at 64-bit boundaries and will thus generate instructions that require that alignment (require it even if strict alignment checking for most instructions is disabled in the control register). If you could enter a function with the stack only 4-byte aligned, how would the compiler know it's safe to use something like an LDREXD instruction on a local variable allocated on the stack? -- Ian