anchao opened a new pull request, #6048: URL: https://github.com/apache/incubator-nuttx/pull/6048
Signed-off-by: chao.an <[email protected]> ## Summary arm/armv8-m: indicating no low-overhead-loop predication by default Fix usage fault on clang version 13.0.0 (-Ofast): ``` ------------------------------------------------------------------ | arm_hardfault: Hard Fault escalation: | arm_usagefault: PANIC!!! Usage Fault: | arm_usagefault: IRQ: 3 regs: 0x3c58c510 | arm_usagefault: BASEPRI: 00000080 PRIMASK: 00000000 IPSR: 00000003 CONTROL: 00000004 | arm_usagefault: CFSR: 00020000 HFSR: 40000000 DFSR: 00000000 BFAR: 01608050 AFSR: 00000000 | arm_usagefault: Usage Fault Reason: | arm_usagefault: Invalid state | up_assert: Assertion failed at file:armv8-m/arm_usagefault.c line: 113 task: lpwork | backtrace: | [ 2] [<0x2c58124a>] up_backtrace+0xa/0x2e2 | [ 2] [<0x2c56f7cc>] sched_dumpstack+0x28/0x66 | [ 2] [<0x2c580cd0>] up_assert+0x62/0x254 | [ 2] [<0x2c56ab8a>] _assert+0/0xa | [ 2] [<0x2c55575a>] nxsched_add_prioritized+0x38/0xa2 | [ 2] [<0x2c555894>] nxsched_add_blocked+0x2e/0x44 | [ 2] [<0x2c580748>] up_block_task+0x2a/0x96 | [ 2] [<0x2c5569ea>] nxsem_wait+0x64/0xb4 | [ 2] [<0x2c556a40>] nxsem_wait_uninterruptible+0x6/0x10 | [ 2] [<0x2c559b9a>] work_thread+0x1c/0x48 ------------------------------------------------------------------- ``` usage fault on 0x2c55575a: ``` ------------------------------------ |2c555722 <nxsched_add_prioritized>: |; { |2c555722: 80 b5 push {r7, lr} |... |2c55575a: 2f f0 17 c0 le 0x2c555732 <nxsched_add_prioritized+0x10> @ imm = #-44 |... ------------------------------------ ``` Arm v8-M Architecture Reference Manual: ``` C2.4.103 LE, LETP B3.28 Low overhead loops: An INVSTATE UsageFault is raised if a LE instruction is executed and FPSCR.LTPSIZE does not read as four. When a new floating-point context is created and FPCCR.ASPEN is set to zero it is the responsibility of software to correctly initialize FPSCR.LTPSIZE. ``` ## Impact N/A ## Testing arm clang version 13.0.0 (https://github.com/llvm/llvm-project.git d7b669b3a30345cfcdb2fde2af6f48aa4b94845d) -Ofast -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
