From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 059013858D32 for ; Thu, 4 Jan 2024 04:05:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 059013858D32 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 059013858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704341127; cv=none; b=omzgvYLx7MLoz9NduSHsxh7mFCNHczZCgyy9uQ1mfZn3TgOY/RV3DuVIUuQyUp1Wvw19gzsOf6reXZmd5sLL2RG5D+MXiRqKCZjxk7PUulL6bB0A49P5G/N0tWARjIHCmM2Gup6kx0lRJn/IgixiP/HP5+CjWgeNcbavWRExmaM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704341127; c=relaxed/simple; bh=ZBVjDJcF0AFKNQ6EMwYQ39TuiK2fZPQgZYeBqr2f878=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=NDsDacopoJS40z/lmGXIj+wHsKlqKmM2lU3FQtfQsat8ljL2ESaxzeF5DcqF/EDI7JZ00YPxIlUeGyhft/5dg1a/v8yyyE/h+HLolzcWW/rTDTuIboLBjgQtC0VY0+1lMEtK1DQW+cS/c9YQRY6FBu/C6bytQOSZZ97rTROEVh8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1704341125; bh=ZBVjDJcF0AFKNQ6EMwYQ39TuiK2fZPQgZYeBqr2f878=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=gGsa8hq5YGNEZFggQ/ZTx0bg+GX6nl4BHdk2u5AAW43sYfXv0d+c3tNtGbfW274JK ylLQp0FvNz9XzB4y9BAPvIw341yhH/PmbPiC3HD8FEUL25XoUEM73wK2NC4o7Mz22o ijcc97fRgoPKcU+udlUEbWU26WnVp9dwsRY9Lwv4= Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 4FC4066AE9; Wed, 3 Jan 2024 23:05:24 -0500 (EST) Message-ID: Subject: Re: [PATCH 1/2] LoongArch: Add the macro implementation of mcmodel=extreme. From: Xi Ruoyao To: chenglulu , gcc-patches@gcc.gnu.org Cc: i@xen0n.name, xuchenghua@loongson.cn Date: Thu, 04 Jan 2024 12:05:22 +0800 In-Reply-To: References: <20231227084654.20614-1-chenglulu@loongson.cn> <20231227084654.20614-2-chenglulu@loongson.cn> <734aebe3f8159485e2e823699bf987c2f605eaa5.camel@xry111.site> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 2024-01-04 at 11:58 +0800, chenglulu wrote: >=20 > =E5=9C=A8 2024/1/4 =E4=B8=8A=E5=8D=8811:51, Xi Ruoyao =E5=86=99=E9=81=93: > > On Wed, 2023-12-27 at 16:46 +0800, Lulu Cheng wrote: > > > +(define_insn "movdi_pcrel64" > > > + [(set (match_operand:DI 0 "register_operand" "=3D&r") > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match_operand:DI 1 "symbolic_p= crel64_operand")) > > > +=C2=A0 (unspec:DI [(const_int 0)] > > > +=C2=A0=C2=A0=C2=A0 UNSPEC_MOV_PCREL64) > > > +=C2=A0 (use (reg:DI T3_REGNUM)) > > > +=C2=A0 (clobber (reg:DI T3_REGNUM))] > > It's better not to hard code $t3 here.=C2=A0 We can write > >=20 > > [(set (match_operand:DI 0 "register_operand" "=3Dr") > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (match_operand:DI 1 "symboli= c_pcrel64_operand")) > > =C2=A0=C2=A0 (clobber (match_operand:DI 2 "register_operand "=3D&r"))] > >=20 > > And use > >=20 > > =C2=A0=C2=A0=C2=A0 gen_movdi_pcrel64 (operands[0], operands[1], gen_reg= _rtx(DImode)) > >=20 > > in expand. > >=20 > I tried using (clobber (match_scratch)) when implementing it, but it=20 > didn't work. I tried match_scratch a few times as well in my previous hacks but never succeeded :(. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University