From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id BEEAB385842A for ; Sun, 7 Jan 2024 18:33:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BEEAB385842A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BEEAB385842A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=63.228.1.57 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704652423; cv=none; b=ClN+8+RfDf11vz1GTPwFrdn7CNdWtLjJWab0SzSPwW8pqbxUTXckvKpso7iosto2nYZBDSWRpVUaWwvsaW0ZFBTsTpWXcreeClgtVpqB6eKYtmFdTdnwtkz1ZAhZdzy4YawCnLDGKlj2q+YwVvSWwfeBZ9pzcBzGP+YncSSKT5Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704652423; c=relaxed/simple; bh=yo6fQ6mfZfN+Xw+ivP+VEhYH1gUtGdDXTLrcYHGJdJE=; h=Date:From:To:Subject:Message-ID:Mime-Version; b=gqmh06VVUqYGwJ/ydEaCvMhKAkA5pPQbyY+i1bGapzjCQYiYSgOi9CD6tvtNTX/syNzsAOoRytpfN/Khmhl4Tc3rsnjuBqdkuCY+TamG6VyMaNE2SjpIQ245fuFClqRvcGf9qZYYBnfYQkuklCqNxzTcQnnfC+LR05JQQsjmASw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 407IWbrM020509; Sun, 7 Jan 2024 12:32:37 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 407IWaoq020508; Sun, 7 Jan 2024 12:32:36 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sun, 7 Jan 2024 12:32:36 -0600 From: Segher Boessenkool To: LIU Hao Cc: David Brown , gcc-help@gcc.gnu.org Subject: Re: Odd error with the "X" inline assembly constraint Message-ID: <20240107183235.GH19790@gate.crashing.org> References: <20240105184612.GE19790@gate.crashing.org> <5060b400-38cb-410b-b2d8-1f305b309a50@126.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5060b400-38cb-410b-b2d8-1f305b309a50@126.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,KAM_SHORT,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 Sun, Jan 07, 2024 at 06:04:23PM +0800, LIU Hao wrote: > 在 2024/1/6 2:46, Segher Boessenkool 写道: > >The C constraint means "Any operand whatsoever is allowed." Here you > >are saying to use it both as input and as output, and GCC does not know > >how to reload wherever it chose to put it. > > Would you mind elaborating a bit more? On x86 and x86-64 it's almost always > the case that an expression can be used as either a source or a destination. This is just GCC internals. The compiler will never look at the template string in an asm at all, anyway. I don't know why exactly you get the error. Make a compilable reproducer, file a bug (), it sounds like something we can improve :-) Segher