From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id B62F758A219; Tue, 15 Aug 2023 16:25:52 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B62F758A219 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1692105952; bh=27c34RQjsN+8DjQGKcx3tVCbdY+JvMY26vu6rEQ/CFQ=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=jPyp3JWwMzxSTh6AK3LVlG1iwIJcsHrs7ey2Wsy/pJACtBJCSu98STVReNwwvpVMv F1KczIaxTWI+twnTcZxLVZhvCmtpOSGzWmYjJez3X9z3XD62KuHtxXybv5OFhHXpDj ivjSx3NfgUP8Mpuw6nqYw5eH5WTtpcySb/FJ7jcw= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [95.163.41.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D58B7589F42 for ; Tue, 15 Aug 2023 16:25:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D58B7589F42 Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1qVu3T-00AqST-0u; Tue, 15 Aug 2023 16:25:51 +0300 Date: Tue, 15 Aug 2023 16:25:51 +0300 To: Sergey Kaplun Message-ID: References: <3166f89d23b9986f3849f2873ee78285c034b894.1691592488.git.skaplun@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3166f89d23b9986f3849f2873ee78285c034b894.1691592488.git.skaplun@tarantool.org> X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC804E38A5F9341E5D89B81E0241E25E490182A05F53808504032DC236083801C2F8A2CA19404AC019F1C7E1A686647AE8438C7C20F2DDC5735 X-C1DE0DAB: 0D63561A33F958A5EB8FB8EA0171EE883147BAB23272F9A0E7A6A6093F719518F87CCE6106E1FC07E67D4AC08A07B9B0CE135D2742255B35CB5012B2E24CD356 X-C8649E89: 1C3962B70DF3F0AD5177F0B940C8B66ECE892A7B2722663E91682638B966EB3F662256BEEFA9527FC38CF464C74E81E9A51FF7735BD7981DC51AAD92BEB42014E64571E5B0DF4160A154876371FDD6BE37FD76D11AF80A0D5675C551C2A783ABBE891750C6E5F873EA455F16B58544A21C197AAF4D2E4732965026E5D17F6739C77C69D99B9914278E50E1F0597A6FD5CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojHVl7ekwB6hhMnQO6t2YG8Q== X-Mailru-Sender: 11C2EC085EDE56FA38FD4C59F7EFE407B82DC50B3927A433CFF12B6FB32D9CB9EE612619EC0257F6D51284F0FE6F529ABC7555A253F5B200DF104D74F62EE79D27EC13EC74F6107F4198E0F3ECE9B5443453F38A29522196 X-Mras: OK Subject: Re: [Tarantool-patches] [PATCH luajit 13/19] ARM: Fix GCC 7 -Wimplicit-fallthrough warnings. X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey! Thanks for the patch! LGTM as trivial, except for a few nits, regarding the commit message. On Wed, Aug 09, 2023 at 06:36:02PM +0300, Sergey Kaplun via Tarantool-patches wrote: > From: Mike Pall > > (cherry-picked from commit 9bd5a722bee2ee2c5b159a89937778b81be49915) > > This patch adds the `/* fallthrough */` comments elsewhere, where it was Typo: s/where it was/where they were/ > missing for the ARM build, so the `-Wimplicit-fallthrough` [1] warning > is trigerred. Typo: s/is trigerred/is not triggered/ > > Also, this commits sets the correspoinding flag in the Typo: s/commits/commit/ Typo: s/in the/in/ > . > > [1]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough > > Sergey Kaplun: > * added the description for the commit > > Part of tarantool/tarantool#8825 > --- > cmake/SetTargetFlags.cmake | 6 ++++++ > src/lj_asm.c | 2 +- > src/lj_asm_arm.h | 4 ++-- > 3 files changed, 9 insertions(+), 3 deletions(-) > > diff --git a/cmake/SetTargetFlags.cmake b/cmake/SetTargetFlags.cmake > index 3b9e481d..d309989e 100644 > --- a/cmake/SetTargetFlags.cmake > +++ b/cmake/SetTargetFlags.cmake > @@ -8,6 +8,12 @@ > > include(CheckUnwindTables) > > +# Clang does not recognize comment markers. > +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" > + AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.1") > + AppendFlags(TARGET_C_FLAGS -Wimplicit-fallthrough) > +endif() > + > if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") > set(BUILDVM_MODE machasm) > else() # Linux and FreeBSD. > diff --git a/src/lj_asm.c b/src/lj_asm.c > index 2d570bb9..25b96264 100644 > --- a/src/lj_asm.c > +++ b/src/lj_asm.c > @@ -2176,8 +2176,8 @@ static void asm_setup_regsp(ASMState *as) > #if LJ_SOFTFP > case IR_MIN: case IR_MAX: > if ((ir+1)->o != IR_HIOP) break; > - /* fallthrough */ > #endif > + /* fallthrough */ > /* C calls evict all scratch regs and return results in RID_RET. */ > case IR_SNEW: case IR_XSNEW: case IR_NEWREF: case IR_BUFPUT: > if (REGARG_NUMGPR < 3 && as->evenspill < 3) > diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h > index 6ae6e2f2..2894e5c9 100644 > --- a/src/lj_asm_arm.h > +++ b/src/lj_asm_arm.h > @@ -979,7 +979,7 @@ static ARMIns asm_fxloadins(IRIns *ir) > case IRT_I16: return ARMI_LDRSH; > case IRT_U16: return ARMI_LDRH; > case IRT_NUM: lua_assert(!LJ_SOFTFP); return ARMI_VLDR_D; > - case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VLDR_S; > + case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VLDR_S; /* fallthrough */ > default: return ARMI_LDR; > } > } > @@ -990,7 +990,7 @@ static ARMIns asm_fxstoreins(IRIns *ir) > case IRT_I8: case IRT_U8: return ARMI_STRB; > case IRT_I16: case IRT_U16: return ARMI_STRH; > case IRT_NUM: lua_assert(!LJ_SOFTFP); return ARMI_VSTR_D; > - case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VSTR_S; > + case IRT_FLOAT: if (!LJ_SOFTFP) return ARMI_VSTR_S; /* fallthrough */ > default: return ARMI_STR; > } > } > -- > 2.41.0 >