From owner-freebsd-arm@freebsd.org Thu Jul 11 17:50:08 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 55BA315D9CE8 for ; Thu, 11 Jul 2019 17:50:08 +0000 (UTC) (envelope-from adr@SDF.ORG) Received: from mx.sdf.org (mx.sdf.org [205.166.94.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx.sdf.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE2A989F52 for ; Thu, 11 Jul 2019 17:50:06 +0000 (UTC) (envelope-from adr@SDF.ORG) Received: from sdf.lonestar.org (IDENT:adr@sdf.lonestar.org [205.166.94.16]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id x6BHo3mg020631 (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits) verified NO); Thu, 11 Jul 2019 17:50:04 GMT Date: Thu, 11 Jul 2019 17:50:02 +0000 (UTC) From: adr X-X-Sender: adr@sdf.lonestar.org To: Mark Millard cc: Robert Crowston via freebsd-arm Subject: Re: FreeBSD arm EABI5 documentation? In-Reply-To: <1CB61FE0-5665-424F-8B94-ABFC06906112@yahoo.com> Message-ID: References: <1788e13e706b9fdaf610e4ddd671a5ed715f9dfe.camel@freebsd.org> <1CB61FE0-5665-424F-8B94-ABFC06906112@yahoo.com> User-Agent: Alpine 2.21 (NEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Rspamd-Queue-Id: EE2A989F52 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-0.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.94)[-0.943,0]; FROM_HAS_DN(0.00)[]; IP_SCORE(-0.45)[ip: (-1.43), ipnet: 205.166.94.0/24(-0.71), asn: 14361(-0.05), country: US(-0.06)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[SDF.ORG]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-0.77)[-0.772,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: mx.SDF.ORG]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[20.94.166.205.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.13)[-0.129,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:14361, ipnet:205.166.94.0/24, country:US]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] 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: Thu, 11 Jul 2019 17:50:08 -0000 >>> Curious about 32-bit arm stack alignment requirements in netbsd >>> (based on a FreeBSD thread making claims that user space allows >>> 4-byte stack alignment), I went looking around some in NetBSD Whooow... I don't know what on earth I'm missing, or what I said that make you contact NetBSD developers talking about "claims". Just write some ugly assembler: ====================================== .arch armv7-a .syntax unified .data str1: .string "1-6: %d, %d, %d, %d, %d, %d\n" .align .text .global main main: push {r0} @ stack is not 8byte align anymore mov r8, 10 loop: ldr r0, =str1 mov r1, 1 mov r2, 2 mov r3, 3 mov r4, 4 mov r5, 5 mov r6, 6 push { r4-r6 } @ alignment will change in the loop bl printf subs r8, r8, 1 bne loop end: b end ===================================================== as -a -o test.o test.s > test.l cc -o test test.o And it works. In fact it works in FreeBSD with clang. But a more complex code, as a said before, calling SDL2 to use graphics works without any problem on NetBSD and Linux, but not on FreeBSD. In fact I like that it doesn't work in FreeBSD, because that made me correct my code. That is all I was saying, and now I'm going to just shut the * up.