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 72DED384F014 for ; Wed, 8 Sep 2021 16:21:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72DED384F014 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=kernel.crashing.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 188GKPW5006321; Wed, 8 Sep 2021 11:20:26 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 188GKPc9006319; Wed, 8 Sep 2021 11:20:25 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 8 Sep 2021 11:20:25 -0500 From: Segher Boessenkool To: HON LUU Cc: "gcc-help@gcc.gnu.org" Subject: Re: gcc question Message-ID: <20210908162025.GO1583@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, BODY_8BITS, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Sep 2021 16:21:34 -0000 Hi! On Wed, Sep 08, 2021 at 03:06:54PM +0000, HON LUU wrote: > + The modified gcc command did not compile. The error message would look like this. > In file included from ././include/linux/compiler_types.h:58, > from : > ./arch/x86/include/asm/jump_label.h: In function ‘unmap_user_buf.part.3’: > ./include/linux/compiler-gcc.h:305:38: error: asm operand 0 probably doesn’t match constraints [-Werror] > #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) > ^~~ > ./arch/x86/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’ > asm_volatile_goto("1:" > ^~~~~~~~~~~~~~~~~ > ./include/linux/compiler-gcc.h:305:38: error: impossible constraint in ‘asm’ > #define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) > ^~~ > ./arch/x86/include/asm/jump_label.h:38:2: note: in expansion of macro ‘asm_volatile_goto’ > asm_volatile_goto("1:" > ^~~~~~~~~~~~~~~~~ > cc1: all warnings being treated as errors (Use LANG=C or LC_ALL=C to not get those weird quotes, just like you would use this to get error messages that aren't translated, that the compiler developers can actually read :-) ) You need to show the full code of the asm_volatile_goto, and the declarations of everything used in its operands, for us to get a handle on what is going on here. Bonus points if you manage to make a stand- alone compilable testcase that shows the problem. GL;HF, Segher