From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-bc.planetel.it (smtp-bc.planetel.it [46.21.184.193]) by sourceware.org (Postfix) with ESMTPS id 1B0313870881 for ; Mon, 8 Mar 2021 17:37:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1B0313870881 Received: from hosting56201.unitedhost.eu (hosting56201.unitedhost.eu [193.169.56.201]) by smtp-bc.planetel.it with ESMTP id uSD3HDIfbDcdNyDY (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 08 Mar 2021 18:37:26 +0100 (CET) Received: from [192.168.1.7] (unknown [151.40.200.187]) by hosting56201.unitedhost.eu (Postfix) with ESMTPA id CEA92A02B0 for ; Mon, 8 Mar 2021 18:37:25 +0100 (CET) Received-SPF: pass (hosting56201.unitedhost.eu: connection is authenticated) From: Francesco Prosperi Subject: [gas][cortex-m23] why does this beq.w results in hard fault? To: binutils@sourceware.org Message-ID: <093e8b39-fcd5-a704-3612-675d1e441353@ssgsrl.it> Date: Mon, 8 Mar 2021 18:37:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 Content-Language: it X-PPP-Message-ID: <161522504621.17770.9981283690422262846@hosting56201.unitedhost.eu> X-PPP-Vhost: ssgsrl.it X-Virus-Scanned: by bsmtpd at planetel.it X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, HTML_MESSAGE, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 17:37:31 -0000 Hi, compiling some cortex-m23 code I stumbled across an issue. I defined an assembly function with the following directives: .arch        armv8-m.base .syntax      unified .code        16 .thumb_func .text Compilation and linking were fine: no error / warning (for this module). Assembler invocation is at the end. Debugging, a hard fault occurs executing the wide conditional branch in the following line of code: |00001240: 0x01f0ef80 beq.w 0x2422 | The wide contidional branch is supported only for the Armv7-M. The Armv8-M architectural reference manual states that: /    Armv7-M compatibility requires the Main Extension/ Cortex-M23 implements the ARMv8-M baseline instruction set (so no Main Extension). For these reasons, could there be a problem with the assembler that is not giving out any error? Regards, FP Compilation command:||arm-none-eabi-gcc -mcpu=cortex-m23 -mthumb -mthumb-interwork -O3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wpointer-arith -Wshadow -Wlogical-op -Waggregate-return -Wfloat-equal  -g -x assembler-with-cpp -D_RENESAS_RA_ -I"C:\SSG\ARISTON\development\whb\CCS\CCS_ARI_trunk\Code\Script" -Wa,-adhlns="Src/outgen.o.lst" -MMD -MP -MF"Src/outgen.d" -MT"Src/outgen.o" -c -o "Src/outgen.o" "C:/SSG/ARISTON/development/whb/CCS/CCS_ARI_trunk/Code/Src/outgen.asm" ||