From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by sourceware.org (Postfix) with ESMTPS id B0BEA3858D32 for ; Sun, 7 May 2023 18:47:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0BEA3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=flygoat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=flygoat.com Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8C46D5C0053; Sun, 7 May 2023 14:47:27 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 07 May 2023 14:47:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1683485247; x=1683571647; bh=kKCCFbHRVygfae00rP3vCq+WyDuO8/VFw+j 3mSrs0kQ=; b=h8nNASL4BKmlxu0JBvuNGtiCy/VTmpfFz8NBIgjcV7i09+L3cSB bU4zVM5ieefKP0Ii1OkI5o6kW5OI5L3oo83cE/kDvd9mIhnIOKHoio9GK950TS1g +gxr4fSPpwqaQsmxZe4gGd7tsJUcgcWy8kWPyWx15sxPqio2I8J0s4s32qP4sCBK IbZMjI/+qpKQEGOuw7zwM3zscJFHiGGXcvvu2t+D8fNnS378hWDg25+1IMfGyuvQ 0FQhz89lLga1AXC3vO/QMyBSwPZmXxBtQ8rISm0oiih3yUusCo6GoSIJAtg2RMbH EZV+87iIpN2+RPxdArb6DmQkg0Cugk/2nuA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1683485247; x=1683571647; bh=kKCCFbHRVygfae00rP3vCq+WyDuO8/VFw+j 3mSrs0kQ=; b=ODL8utWBfrZs2XNOca6OXD74665+XWMX1cRUY65WI4OZfk8B24W Zfqv2rUytraeOC32YwzrwNy6WmxIGjuGHB9JhUVWxP5sdcSZDtRglr3Sgx7SNVVx /qhDtpe/NhsBpxXEpEsc7PhS5XWeVE8Jk9Pk+BjvfmKLvvgjx3M96kFu5YjhuKxO 8BNxh/dUcRnPbfc9DyDKlFA0nyD+5vZeI5JlhQG39q8VKArrLX0fSXF/F0gxjWrE zv0dvjY/57z65nLeP0In3z55Vad/zCP7XpvXY4QFQ56RXjOFF084l4mV3wNkOz1W RgkqIjWz4CZoVyNwDCPs9TKTzHpvtwtmE6w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefiedguddvlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjffevgffkfhfvofesthhqmhdthhdtjeenucfhrhhomheplfhi rgiguhhnucgjrghnghcuoehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhmqe enucggtffrrghtthgvrhhnpedutdejffetteefkeejieehfeeuieeguedtveeijeeviefh ffelvdfgudeihfdvtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Feedback-ID: ifd894703:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 May 2023 14:47:25 -0400 (EDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: [PATCH v2] MIPS: add speculation_barrier support From: Jiaxun Yang In-Reply-To: Date: Sun, 7 May 2023 19:47:14 +0100 Cc: YunQiang Su , Richard Sandiford , gcc-patches@gcc.gnu.org, YunQiang Su Content-Transfer-Encoding: quoted-printable Message-Id: References: <20230428123327.686353-1-yunqiang.su@cipunited.com> <20230428131249.713463-1-yunqiang.su@cipunited.com> <3C634BC6-7556-4724-8012-83F8F3C1C1B3@flygoat.com> To: "Maciej W. Rozycki" X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,JMQ_SPF_NEUTRAL,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > 2023=E5=B9=B45=E6=9C=887=E6=97=A5 18:34=EF=BC=8CMaciej W. Rozycki = =E5=86=99=E9=81=93=EF=BC=9A >=20 > On Wed, 3 May 2023, Jiaxun Yang wrote: >=20 >> Since it=E2=80=99s possible to run R2- binary on R2+ processor, = we=E2=80=99d better find a >> semantic that do eliminate speculation on all processors. While = SSNOPs >> on R2+ processors is pretty much undefined, there is no guarantee = that >> SSNOP sequence can eliminate speculation. >=20 > Not exactly undefined on R2+, SSNOP is still required to single-issue, = so=20 > it does act as an execution barrier. Good point otherwise. >=20 > Both EHB and J[AL]R.HB are backwards compatible however (except for an=20= > obscure 4Kc J[AL]R.HB erratum I came across once and which may be no=20= > longer relevant), so I think the legacy sequence ought to just return = via=20 > JR.HB as well, therefore providing the required semantics with newer=20= > hardware. If it does trap for 4Kc, then the OS can emulate it (and we = can=20 > ignore it for bare metal, deferring to whoever might be interested for = a=20 > workaround). Hmm, I just checked MIPS-IV manual, it seems like HB bit (bit 10) is = defined as zero for both JR and JALR. Is it actually omitted in implementation? Thanks Jiaxun