From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7717 invoked from network); 7 Dec 2021 20:15:24 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 7 Dec 2021 20:15:24 -0000 Received: (qmail 11267 invoked by uid 550); 7 Dec 2021 20:15:22 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 10217 invoked from network); 7 Dec 2021 20:15:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1638908106; bh=Emzm+0Aa2jeYnV7WDjJxFPAkr5OCnbi7eBmY1+HDkMA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=iibqiDCAr3GOzjD73Js6KDiAYYTsb99Pk7jKa2QzL9NvyQnjJTcN6vbzPqkqUJO0s 1HFMbxGuMtUY1d9AL9HKValbAKFOMjNwmG8OuDiQ4n1p14XR5VWogz+wfS460wdCpO r9z3QZHfxN4NbnT5lTOTx3QytGnoK9Blt7QVYhj4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Date: Tue, 7 Dec 2021 21:15:05 +0100 From: Markus Wichmann To: Florian Weimer Cc: musl@lists.openwall.com Message-ID: <20211207201505.GC8506@voyager> References: <20211206234358.2174444-1-stijn@linux-ipv6.be> <87tufljlmv.fsf@oldenburg.str.redhat.com> <20211207005940.GK7074@brightrain.aerifal.cx> <20211207013930.GM7074@brightrain.aerifal.cx> <20211207132509.GO7074@brightrain.aerifal.cx> <20211207183933.GA8506@voyager> <87o85snrj7.fsf@oldenburg.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <87o85snrj7.fsf@oldenburg.str.redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Provags-ID: V03:K1:Cs/rSrAQrTOjNDdzK6O200TsESbHNCDkrCF2EI5c7DYDHWtDPrk kZjX44ssIHKfAOvf0ME0XXqZNH23FCqN24KTZ3wQi5BFpuDvIUiV2jL7j4bIeNj6Sl8gO2M f0V2xvNYu4rb5iPUVLF+0mGFhYa1KHL26PHKlGBw/KHhSmj44iSTNkRWnTCn/9ruKYW4E+X sQlm9WpMEgFzkDrRSglig== X-UI-Out-Filterresults: notjunk:1;V03:K0:pCPbxgDnUbs=:VrgPOf3AJeLSamHtpa6nS9 4NvMklrWXE+ayqtMJWbYCToapB0wMRriAsdyNCxhLTmOEGTUrsRLHx12mn355JZyb1AkId6oo tOjD+WOWhxwKZMV+gOnWRXv3Gp8lT2ce6e/Tc4osSz60XeQuahNwhkI99vOOTFp+6Ci/RPcFD w8NvKCuWgKLBaZMRgoQQrPn13OfdOIJSm5HHLBX60allIXDmoDmtHdH01uF/VfxaJa4Iatjqo 5OPM1KEdvPOaI2muqWKOcnSuGBQ8SbZtwp06uILMrjWxUGfxkqt8sU+qWbqW5Oq7+tJnhn1FZ wZ+20d8lPBMpDX1cWU/JOPxB3Owrv713x/WR0cxMCKU0e4xck+gAfDWxEZBclTOdEpmvp2cef 4PKlkO9HUJ6k7uAvVFLxwek22s22JnB74zdMoDRPAe4UfiaWiuYeKabVVxhvhGkCNVQAjSCq7 hdvWIwV5k15z30nEUoMeFzUThXPF/jDXCxYS9hR0AXmBQz5O0OWz4OqTksJ+yu3y3Kudj0AXF +VokhUeo5K/UjETJwh/5NrwpFipQbCM5lWdrZ9f5KdeqcrtNmJAMVuCMS+G7utOOJnhhjRHfF WaTU+HBhSPCEdV7H7kW/8WfLCRjjr7XYcnSzdednpmG0wyMcbemEdF7m+94yBA46a9e+wEEok RUwC8njjbja+2XU8LeXRCMbJvJx4K+iiqoMEuJlDEwVuhWdCxCUPUnr2K8MAaKNWntq7okElQ 5RO0fSbK6ZKXupSvOLb+XQL78Gsey3PSvFFsq1ZZ7V8Yws/3kp3peGzrbVMkIVq2y/4MSoAkZ vRGUBUKi+3HKNIvFHW83OsjluX34E75ngqQweawH0pbXKF+9/zdrfNRm9h42uYpC+6dgFkI1B rK7bY5H3G98F+rniwcgAXSwQ2C9c2TNLwLaKw0d7xIhXnIbMXG/vBRFTvdI/3zJVutkPxXfOh upcX/O9UjarVQ8Mke0I0Q+8FB07R+LxiTEbaZKhp9zTtq9BMl/agtIi8kC5P2kulV2yCDdqd0 KsH8PV8titmFABo8w2uE3PXEz5OoysRhLstesMKgyn4Q2iuEdslAfZXAg6bT3FUH5mRyCEoHN Vrex4ijYH9Tvhw= Subject: Re: [musl] [PATCH] ppc64: check for AltiVec in setjmp/longjmp On Tue, Dec 07, 2021 at 08:28:28PM +0100, Florian Weimer wrote: > We do have source code for one implementation. > > | -- bcl 20,31,$+4 is special case. not a subroutine call, used to get = next instruction address, should not be placed on link stack. > | iu4_bo_d( 6 to 10) <=3D iu3_instr_pri( 6 to 10); > | iu4_bi_d(11 to 15) <=3D iu3_instr_pri(11 to 15); > | > | iu4_getNIA <=3D iu4_opcode_q(0 to 5) =3D = "010000" and > | iu4_bo_q(6 to 10) =3D "1= 0100" and > | iu4_bi_q(11 to 15) =3D "1= 1111" and > | iu4_bd(EFF_IFAR'left to 61) =3D 1 = and > | iu4_aa_q =3D '0= ' and > | iu4_lk_q =3D '1= ' ; > > > > I suspect =E2=80=9Ciu4_bd(EFF_IFAR'left to 61) =3D 1=E2=80=9D matches 4 = exactly (the > lowest four bits of the offset are not encoded in the instruction > because they are always zero). But I don't know any VHDL. > Me neither but I do recognize a few of those words. The opcode obviously refers to the most significant six bits, encoding the primary opcode, and "bo", "bi", "bd", "aa", and "lk" are what the PPC books call the various fields of this particular instruction (that being "bc", branch conditional). So this matches exactly the "+4" form of the instruction discussed so far. BTW, musl's PPC code contains a few more instances of getting NIA with "bl", in the CRT code and in GETFUNCSYM() at least. So if we're spending this much time finding out the optimal way to get the NIA, we should probably do the same there, for consistency if nothing else. Ciao, Markus