From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/15023 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jeffrey Walton Newsgroups: gmane.linux.lib.musl.general Subject: Re: max_align_t mess on i386 Date: Sun, 15 Dec 2019 13:06:29 -0500 Message-ID: References: <20191214151932.GW1666@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="46697"; mail-complaints-to="usenet@blaine.gmane.org" To: musl@lists.openwall.com Original-X-From: musl-return-15039-gllmg-musl=m.gmane.org@lists.openwall.com Sun Dec 15 19:08:54 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1igYK6-000C56-IZ for gllmg-musl@m.gmane.org; Sun, 15 Dec 2019 19:08:54 +0100 Original-Received: (qmail 10089 invoked by uid 550); 15 Dec 2019 18:08:52 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 10071 invoked from network); 15 Dec 2019 18:08:51 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to; bh=ACRiwaFhSFTBExW3LuG9T2LW05wn6sq0Ij+vogfFQGg=; b=LIAdtR2GA6fQj3I+1/K7xD0Vu9RE/MHw8MaND9qfxnAlWatJk9tnIRbTVRKBFT8Uf4 lpAZYVAinX3PKXRkC91Af7Iw4k7qdYGL+W/AXTviqAlL72g0BQvBJsfGO46InKegAYQk egq0Y1uIniguETLGwwLDVu8iDTYPQKrgoNmTxKWrt3Gu0t9+kknL5B14WhVZH9hqkmSR SNlZw3iqx5B7PLtIlLa9eIzv/cWa6J9VSwCWFTRBhRP53DyEPHQpnDN8rsKdb5ZCcVg8 rqCKPl9qU7eKTptM+4WDSxMuU3IJNVqztyQ1P6Bcab8hl6i6WGWeXQwmi/L3xjqaRE04 NauA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:reply-to :from:date:message-id:subject:to; bh=ACRiwaFhSFTBExW3LuG9T2LW05wn6sq0Ij+vogfFQGg=; b=NOrx0yswGE3OuVZ+iJiB8736mBeRcmIBJ+tZJMQj66zVMATmh6y2k+pUAJFREGwAdk iHFMzeEtIhjirhYXDPaXxB0p8YZT3WISxmlLbjOSm9+Ea8hejuKrK9ud/VBQ+dow1FyI qEo4M1cox1u6s1jd1BFfxXcStjtyfhBAQkC+NciuvbYYWC1Bd4Lggv6hQszfPncXHHLX +HDIHgSx02QKABaPxu4Pa4/p1EN330Fu0ju4k/qr3lU+GP/F/cs62NSruVg34hPAESOK 99NeXRcMp0NYKXTWR9TorY4WxM4UqY5SATQneG2lV3X2tGlqGWN62L/pFgI1csdRaMa1 qbvg== X-Gm-Message-State: APjAAAWJUl3Byr7A6w5jZbagrK2Qj90EnogR6KBIs+xRSsYMXXh/jFUR 8Xvz+4YqGif+QXYgA/UGiAyxrcaswXjtiMKAoioPqmJz X-Google-Smtp-Source: APXvYqw06OKU7y3cb+51qcTiyZ3j+A5ThELlU7o1Nsrp3rFLoEgadWNnSl9MkJmTiMHT4qBixPx6iAE1Lzgj3GtyLDY= X-Received: by 2002:a05:6638:a31:: with SMTP id 17mr8552153jao.15.1576433319670; Sun, 15 Dec 2019 10:08:39 -0800 (PST) In-Reply-To: <20191214151932.GW1666@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:15023 Archived-At: On Sat, Dec 14, 2019 at 10:19 AM Rich Felker wrote: > > In reserching how much memory could be saved, and how practical it > would be, for the new malloc to align only to 8-byte boundaries > instead of 16-byte on archs where alignof(max_align_t) is 8 (pretty > much all 32-bit archs), I discovered that GCC quietly changed its > idead of i386 max_align_t to 16-byte alignment in GCC 7, to better > accommodate the new _Float128 access via SSE. Presumably (I haven't > checked) the change is reflected with changes in the psABI document to > make it "official". Be careful with policy changes like this. The malloc (3) man page says: The malloc() and calloc() functions return a pointer to the allocated memory that is suitably aligned for any kind of variable. I expect to be able to use a pointer returned by malloc (and friends) in MMX, SSE and AVX functions. Jeff