From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by ewsd; Sat Nov 21 01:24:14 -0500 2020 Received: by mail-ot1-f49.google.com with SMTP id o3so10930490ota.8 for <9front@9front.org>; Fri, 20 Nov 2020 22:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greymanlabs-com.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=/r7GMFqd2tf3D+Ynl0U05+6Z7k7OJIndI9uywPBTaUk=; b=Co1UQF7XCIJwQMjuSFUg1jXYLFT09FNV4FuSNZ1yjmAskUUg1UOMQhZ8HfPPkh+B6L 1AzClCTI1RMj4NLrhAY5/ECO6uE6QahJAvw5oABWy44U4+JCWEG1ceAgQB38hjMWmenx qyGjk7KG75fMN4vlmvPhHcBw7G0S1BA2tP+LlTuOFSlZ35+cKDajVXFAKO/kaEL7aJUz 0ZXYUyuiLqXevyUhKIEdFjVl/jFS8FYdtM0RqWVVVhDRd36xiXY62mFkAByvB2abR9WV aEiLYmhAjcq6l0WxyiUEKRarWvaMTqxGSXMsbPoYOKAlkDz8B2wMOvXgLIAA8Sr0p+6C lWNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=/r7GMFqd2tf3D+Ynl0U05+6Z7k7OJIndI9uywPBTaUk=; b=eAX3Laekb1FoYKvgd9T1HA0El/tT00NySWTWpq4FoTPuHFgYDXUjrF2tf7w2Oahu0p PAA457JZpkZEv7qEVcoGt84jjTfesGIWMsx0Xj3l5DIZU6SalCV+Wh6hdaj+3YYGzC5e PDMoYzEY28Xg77HzFNnaSZDxAdI4qkIHns8MCsM7NsJq1yr3tI+rJPkULkybzWxL23/z 4fdzKiQvIWOOYa7A/73a8C37e1DOw6vYepWY/3wrpjFWKxf++NSOcIQeD5I/LWFLjk9z b4dRvM13FHcA9yIQqZPV46R3liVgqNiaYUYD8XXCWKK42rhWfGpUh6hlz+6XqAdxjdtk htyw== X-Gm-Message-State: AOAM530AqCeol2VGeNOqmBh1CzQpXdJNAP9av1FRXh1bf3cO4CykSdg7 FZizqTU0zq44EqLQrJw9SD6cU4c+kYfaCmse X-Google-Smtp-Source: ABdhPJxxpW7T4T1nVFFDuiVCfTPz4STMN9qcAjXj3XuEMQeGui19uDqgZCmRSOImlL/sQpgqUCBC3w== X-Received: by 2002:a05:6830:129a:: with SMTP id z26mr3571435otp.116.1605939843205; Fri, 20 Nov 2020 22:24:03 -0800 (PST) Return-Path: Received: from ?IPv6:2601:681:897f:e75e:89a2:c4ba:b78b:7bb2? ([2601:681:897f:e75e:89a2:c4ba:b78b:7bb2]) by smtp.gmail.com with ESMTPSA id a5sm2421550oto.1.2020.11.20.22.24.02 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Nov 2020 22:24:02 -0800 (PST) From: McKay Marston Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.20.0.2.21\)) Subject: Re: [9front] Bounty: OCaml 4.11.1 Date: Fri, 20 Nov 2020 23:24:01 -0700 References: To: 9front@9front.org In-Reply-To: Message-Id: X-Mailer: Apple Mail (2.3654.20.0.2.21) List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: asynchronous hosting replication > On Nov 20, 2020, at 10:46 PM, ori@eigenstate.org wrote: >=20 > Quoth McKay Marston : >> I tried porting it myself, but it relies heavily >> on aligned memory blocks that are generated in >> preprocessor macros, and I gave up trying to >> figure out how that could be done in plan9. >=20 > I don't have the time to do the full port myself, > but do you have any specific examples of > the kind of thing that's giving trouble? Well, specifically this: runtime/caml/misc.h: #if defined(__STDC_VERSION__) && __STDC_VERSION__ >=3D 201112L #define CAMLalign(n) _Alignas(n) #elif defined(SUPPORTS_ALIGNED_ATTRIBUTE) #define CAMLalign(n) __attribute__((aligned(n))) #elif _MSC_VER >=3D 1500 #define CAMLalign(n) __declspec(align(n)) #else #error "How do I align values on this platform?=E2=80=9D <- this is = where it bails on plan9 #endif which is used by: runtime/caml/domain_state.h #define DOMAIN_STATE(type, name) CAMLalign(8) type name; #define DOMAIN_STATE(type, name) CAMLalign(8) type _##name; which is used by a bunch of stuff like this: DOMAIN_STATE(intnat, stat_compactions) DOMAIN_STATE(intnat, stat_heap_chunks) And my issue is that the only way that I can see to align memory in = plan9 is with mallocalign, which isn=E2=80=99t easily translated (by me, = at least) into something that works with the =E2=80=9Cset an aligned = attribute at declaration" method used here. If I=E2=80=99m missing something, though, I=E2=80=99d appreciate any = guidance. =E2=80=94 zgasma Mckay Marston