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 C78CE5764A4; Wed, 9 Aug 2023 18:47:29 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org C78CE5764A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1691596049; bh=hcExSUvN8dxMFeJSUi0mHa6oCUG8jRc5kyNsKa4ftCc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UlRqQLJD5+DoyJKVbbj9pcJ7Ox4vRJdvHJL1h1e3TMTsEA75YVwjEm8LFk70+41dU bWtU1lRrJ8p+Hn/G6gftWdGUv3Ock/ntQQJiFIOV1q9rSbfKlW7a+4R7/iZ4GHyO1Q jAzDxvI02aPQtKkjK9LNs3IukCxGyzontyHxKjGI= Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [95.163.41.73]) (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 1752A576499 for ; Wed, 9 Aug 2023 18:41:14 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 1752A576499 Received: by smtp32.i.mail.ru with esmtpa (envelope-from ) id 1qTlJB-003Nbf-1K; Wed, 09 Aug 2023 18:41:13 +0300 To: Igor Munkin , Sergey Bronnikov Date: Wed, 9 Aug 2023 18:36:02 +0300 Message-ID: <3166f89d23b9986f3849f2873ee78285c034b894.1691592488.git.skaplun@tarantool.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-4EC0790: 10 X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD969E04B5EED670DC804E38A5F9341E5D89B81E0241E25E490182A05F5380850400E1B121FB487315A39BC923D1AD8FECE0FD67FF0191F0EA0F997D13114D0275A X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7FCFCB92DA8654BB0EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637C05E8F374EA5A79AEA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BE5CCB53A13BC8DBA14A64958C87438862C89C2CE6DE4DD6DCC7F00164DA146DAFE8445B8C89999728AA50765F7900637036D0B7DAED17EFF389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC8ED96AA85C75E140D117882F4460429728AD0CFFFB425014E868A13BD56FB6657D81D268191BDAD3DC09775C1D3CA48CF4B46395E11137F01BA3038C0950A5D36C8A9BA7A39EFB766D91E3A1F190DE8FDBA3038C0950A5D36D5E8D9A59859A8B67ABDCDB10AB97B1D76E601842F6C81A1F004C906525384303E02D724532EE2C3F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7C565C1E6824D8037B43847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A53CF0837EFDFC151A2F6BEBBAB7CE81343768244C0DDDEF18F87CCE6106E1FC07E67D4AC08A07B9B01F9513A7CA91E5559C5DF10A05D560A950611B66E3DA6D700B0A020F03D25A0997E3FB2386030E77 X-C8649E89: 1C3962B70DF3F0ADE00A9FD3E00BEEDF3FED46C3ACD6F73ED3581295AF09D3DF87807E0823442EA2ED31085941D9CD0AF7F820E7B07EA4CFC903A9C25A9B92816112DCC76CCAA829B870CE612916B3D4DD7B41EEB6321A975B8C288B04B80C1C1529AA6C8ABD04CA9EE175FF7CB5A1B1FC646BBC802B189AA74DFFEFA5DC0E7F02C26D483E81D6BE5EF9655DD6DEA7D65774BB76CC95456EEC5B5AD62611EEC62B5AFB4261A09AF0 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojUzxoxvtYX2pzkQtS1/qmkA== X-Mailru-Sender: 11C2EC085EDE56FAC07928AF2646A7691F1B48039DBE207339BC923D1AD8FECEBDDB26EEA8DAF3A6DEDBA653FF35249392D99EB8CC7091A70E183A470755BFD208F19895AA18418972D6B4FCE48DF648AE208404248635DF X-Mras: Ok Subject: [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: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" From: Mike Pall (cherry-picked from commit 9bd5a722bee2ee2c5b159a89937778b81be49915) This patch adds the `/* fallthrough */` comments elsewhere, where it was missing for the ARM build, so the `-Wimplicit-fallthrough` [1] warning is trigerred. Also, this commits sets the correspoinding flag in the . [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