GCC 9

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

GCC 9

Postby mobyfab » Thu Nov 07, 2019 8:09 pm

ARM has just released their new GCC, version is 9.2.1.

https://developer.arm.com/tools-and-sof ... /downloads

It's almost twice as fast on linux compared to GCC 8.

Could someone check if it still produces incorrect CM0 code?
As far as I know it was fixed in the trunk a couple month ago.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88656

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC 9

Postby Giovanni » Thu Nov 07, 2019 9:11 pm

Great news, I will run a full test tomorrow.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC 9

Postby Giovanni » Fri Nov 08, 2019 6:51 pm

Hi,

Bad news first, the problem with M0 is still there... I wonder which GCC version is supposed to have this fixed.

Now benchmarks, scores seem to be generally better than 8.2.1 except for test case 10.9 which took a dive for some reason.

8.2.1

Code: Select all

*** ChibiOS/RT Test Suite
***
*** Compiled:     Nov  8 2019 - 18:42:45
*** Platform:     STM32L4xx Ultra Low Power
*** Test Board:   STMicroelectronics STM32L476-Discovery

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv7E-M
--- Core Variant:                       Cortex-M4
--- Compiler:                           GCC 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
--- Port Info:                          Advanced kernel mode
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Kernel Info)
--- Product:                            ChibiOS/RT
--- Stable Flag:                        0
--- Version String:                     6.1.0
--- Major Number:                       6
--- Minor Number:                       1
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Kernel Settings)
--- CH_CFG_ST_RESOLUTION:               32
--- CH_CFG_ST_FREQUENCY:                10000
--- CH_CFG_INTERVALS_SIZE:              32
--- CH_CFG_TIME_TYPES_SIZE:             32
--- CH_CFG_ST_TIMEDELTA:                2
--- CH_CFG_TIME_QUANTUM:                0
--- CH_CFG_MEMCORE_SIZE:                0
--- CH_CFG_NO_IDLE_THREAD:              0
--- CH_CFG_OPTIMIZE_SPEED:              1
--- CH_CFG_USE_TM:                      1
--- CH_CFG_USE_REGISTRY:                1
--- CH_CFG_USE_WAITEXIT:                1
--- CH_CFG_USE_SEMAPHORES:              1
--- CH_CFG_USE_SEMAPHORES_PRIORITY:     0
--- CH_CFG_USE_MUTEXES:                 1
--- CH_CFG_USE_MUTEXES_RECURSIVE:       0
--- CH_CFG_USE_CONDVARS:                1
--- CH_CFG_USE_CONDVARS_TIMEOUT:        1
--- CH_CFG_USE_EVENTS:                  1
--- CH_CFG_USE_EVENTS_TIMEOUT:          1
--- CH_CFG_USE_MESSAGES:                1
--- CH_CFG_USE_MESSAGES_PRIORITY:       0
--- CH_CFG_USE_DYNAMIC:                 1
--- CH_DBG_STATISTICS:                  0
--- CH_DBG_SYSTEM_STATE_CHECK:          0
--- CH_DBG_ENABLE_CHECKS:               0
--- CH_DBG_ENABLE_ASSERTS:              0
--- CH_DBG_TRACE_MASK:                  255
--- CH_DBG_TRACE_BUFFER_SIZE:           128
--- CH_DBG_ENABLE_STACK_CHECK:          0
--- CH_DBG_FILL_THREADS:                0
--- CH_DBG_THREADS_PROFILING:           0
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (System layer and port interface)
----------------------------------------------------------------------------
--- Test Case 2.1 (System integrity functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Critical zones functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Interrupts handling functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (System Tick Counter functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Threads Functionality)
----------------------------------------------------------------------------
--- Test Case 3.1 (Thread Sleep functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Ready List functionality, threads priority order)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Priority change test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (Priority change test with Priority Inheritance)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Suspend/Resume)
----------------------------------------------------------------------------
--- Test Case 4.1 (Suspend and Resume functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Counter Semaphores)
----------------------------------------------------------------------------
--- Test Case 5.1 (Semaphore primitives, no state change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.2 (Semaphore enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.3 (Semaphore timeout test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.4 (Testing chSemAddCounterI() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.5 (Testing chSemWaitSignal() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.6 (Testing Binary Semaphores special case)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Mutexes, Condition Variables and Priority Inheritance)
----------------------------------------------------------------------------
--- Test Case 6.1 (Priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Priority return verification)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.3 (Repeated locks, non recursive scenario)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.4 (Condition Variable signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.5 (Condition Variable broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.6 (Condition Variable priority boost test)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Synchronous Messages)
----------------------------------------------------------------------------
--- Test Case 7.1 (Messages Server loop)
--- Result: SUCCESS
============================================================================
=== Test Sequence 8 (Event Sources and Event Flags)
----------------------------------------------------------------------------
--- Test Case 8.1 (Events registration)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.2 (Event Flags dispatching)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.3 (Events Flags wait using chEvtWaitOne())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.4 (Events Flags wait using chEvtWaitAny())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.5 (Events Flags wait using chEvtWaitAll())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.6 (Events Flags wait timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.7 (Broadcasting using chEvtBroadcast())
--- Result: SUCCESS
============================================================================
=== Test Sequence 9 (Dynamic threads)
----------------------------------------------------------------------------
--- Test Case 9.1 (Threads creation from Memory Heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Threads creation from Memory Pool)
--- Result: SUCCESS
============================================================================
=== Test Sequence 10 (Benchmarks)
----------------------------------------------------------------------------
--- Test Case 10.1 (Messages performance #1)
--- Score : 388325 msgs/S, 776650 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Messages performance #2)
--- Score : 306495 msgs/S, 612990 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.3 (Messages performance #3)
--- Score : 306495 msgs/S, 612990 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.4 (Context Switch performance)
--- Score : 1219040 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.5 (Threads performance, full cycle)
--- Score : 224703 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.6 (Threads performance, create/exit only)
--- Score : 296294 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.7 (Mass reschedule performance)
--- Score : 90395 reschedules/S, 542370 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.8 (Round-Robin voluntary reschedule)
--- Score : 751120 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.9 (Virtual Timers set/reset performance)
--- Score : 765156 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.10 (Semaphores wait/signal performance)
--- Score : 1624356 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.11 (Mutexes lock/unlock performance)
--- Score : 972636 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.12 (RAM Footprint)
--- System: 120 bytes
--- Thread: 68 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS

*** ChibiOS OS Library Test Suite
***
*** Compiled:     Nov  8 2019 - 18:42:45
*** Platform:     STM32L4xx Ultra Low Power
*** Test Board:   STMicroelectronics STM32L476-Discovery

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv7E-M
--- Core Variant:                       Cortex-M4
--- Compiler:                           GCC 8.2.1 20181213 (release) [gcc-8-branch revision 267074]
--- Port Info:                          Advanced kernel mode
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (OS Library Info)
--- Product:                            ChibiOS/LIB
--- Stable Flag:                        0
--- Version String:                     1.2.0
--- Major Number:                       1
--- Minor Number:                       2
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (OS Library Settings)
--- CH_CFG_USE_MEMCORE:                 1
--- CH_CFG_USE_HEAP:                    1
--- CH_CFG_USE_MEMPOOLS:                1
--- CH_CFG_USE_OBJ_FIFOS:               1
--- CH_CFG_USE_PIPES:                   1
--- CH_CFG_USE_FACTORY:                 1
--- CH_CFG_FACTORY_MAX_NAMES_LENGTH:    8
--- CH_CFG_FACTORY_OBJECTS_REGISTRY:    1
--- CH_CFG_FACTORY_GENERIC_BUFFERS:     1
--- CH_CFG_FACTORY_SEMAPHORES:          1
--- CH_CFG_FACTORY_MAILBOXES:           1
--- CH_CFG_FACTORY_OBJ_FIFOS:           1
--- CH_CFG_FACTORY_PIPES:               1
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (Mailboxes)
----------------------------------------------------------------------------
--- Test Case 2.1 (Mailbox normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Mailbox I-Class API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Mailbox timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Pipes)
----------------------------------------------------------------------------
--- Test Case 3.1 (Pipes normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Pipe timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Objects Caches)
----------------------------------------------------------------------------
--- Test Case 4.1 (Cache initialization)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Memory Pools)
----------------------------------------------------------------------------
--- Test Case 5.1 (Loading and emptying a memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.2 (Loading and emptying a guarded memory pool without waiting)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.3 (Guarded Memory Pools timeout)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Memory Heaps)
----------------------------------------------------------------------------
--- Test Case 6.1 (Allocation and fragmentation)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Default Heap)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Objects Factory)
----------------------------------------------------------------------------
--- Test Case 7.1 (Objects Registry)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Dynamic Buffers Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Dynamic Semaphores Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.4 (Dynamic Mailboxes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.5 (Dynamic Objects FIFOs Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.6 (Dynamic Pipes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS


9.2.1

Code: Select all

*** ChibiOS/RT Test Suite
***
*** Compiled:     Nov  8 2019 - 18:33:47
*** Platform:     STM32L4xx Ultra Low Power
*** Test Board:   STMicroelectronics STM32L476-Discovery

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv7E-M
--- Core Variant:                       Cortex-M4
--- Compiler:                           GCC 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
--- Port Info:                          Advanced kernel mode
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (Kernel Info)
--- Product:                            ChibiOS/RT
--- Stable Flag:                        0
--- Version String:                     6.1.0
--- Major Number:                       6
--- Minor Number:                       1
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (Kernel Settings)
--- CH_CFG_ST_RESOLUTION:               32
--- CH_CFG_ST_FREQUENCY:                10000
--- CH_CFG_INTERVALS_SIZE:              32
--- CH_CFG_TIME_TYPES_SIZE:             32
--- CH_CFG_ST_TIMEDELTA:                2
--- CH_CFG_TIME_QUANTUM:                0
--- CH_CFG_MEMCORE_SIZE:                0
--- CH_CFG_NO_IDLE_THREAD:              0
--- CH_CFG_OPTIMIZE_SPEED:              1
--- CH_CFG_USE_TM:                      1
--- CH_CFG_USE_REGISTRY:                1
--- CH_CFG_USE_WAITEXIT:                1
--- CH_CFG_USE_SEMAPHORES:              1
--- CH_CFG_USE_SEMAPHORES_PRIORITY:     0
--- CH_CFG_USE_MUTEXES:                 1
--- CH_CFG_USE_MUTEXES_RECURSIVE:       0
--- CH_CFG_USE_CONDVARS:                1
--- CH_CFG_USE_CONDVARS_TIMEOUT:        1
--- CH_CFG_USE_EVENTS:                  1
--- CH_CFG_USE_EVENTS_TIMEOUT:          1
--- CH_CFG_USE_MESSAGES:                1
--- CH_CFG_USE_MESSAGES_PRIORITY:       0
--- CH_CFG_USE_DYNAMIC:                 1
--- CH_DBG_STATISTICS:                  0
--- CH_DBG_SYSTEM_STATE_CHECK:          0
--- CH_DBG_ENABLE_CHECKS:               0
--- CH_DBG_ENABLE_ASSERTS:              0
--- CH_DBG_TRACE_MASK:                  255
--- CH_DBG_TRACE_BUFFER_SIZE:           128
--- CH_DBG_ENABLE_STACK_CHECK:          0
--- CH_DBG_FILL_THREADS:                0
--- CH_DBG_THREADS_PROFILING:           0
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (System layer and port interface)
----------------------------------------------------------------------------
--- Test Case 2.1 (System integrity functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Critical zones functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Interrupts handling functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.4 (System Tick Counter functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Threads Functionality)
----------------------------------------------------------------------------
--- Test Case 3.1 (Thread Sleep functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Ready List functionality, threads priority order)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.3 (Priority change test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.4 (Priority change test with Priority Inheritance)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Suspend/Resume)
----------------------------------------------------------------------------
--- Test Case 4.1 (Suspend and Resume functionality)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Counter Semaphores)
----------------------------------------------------------------------------
--- Test Case 5.1 (Semaphore primitives, no state change)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.2 (Semaphore enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.3 (Semaphore timeout test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.4 (Testing chSemAddCounterI() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.5 (Testing chSemWaitSignal() functionality)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.6 (Testing Binary Semaphores special case)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Mutexes, Condition Variables and Priority Inheritance)
----------------------------------------------------------------------------
--- Test Case 6.1 (Priority enqueuing test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Priority return verification)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.3 (Repeated locks, non recursive scenario)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.4 (Condition Variable signal test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.5 (Condition Variable broadcast test)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.6 (Condition Variable priority boost test)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Synchronous Messages)
----------------------------------------------------------------------------
--- Test Case 7.1 (Messages Server loop)
--- Result: SUCCESS
============================================================================
=== Test Sequence 8 (Event Sources and Event Flags)
----------------------------------------------------------------------------
--- Test Case 8.1 (Events registration)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.2 (Event Flags dispatching)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.3 (Events Flags wait using chEvtWaitOne())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.4 (Events Flags wait using chEvtWaitAny())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.5 (Events Flags wait using chEvtWaitAll())
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.6 (Events Flags wait timeouts)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 8.7 (Broadcasting using chEvtBroadcast())
--- Result: SUCCESS
============================================================================
=== Test Sequence 9 (Dynamic threads)
----------------------------------------------------------------------------
--- Test Case 9.1 (Threads creation from Memory Heap)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 9.2 (Threads creation from Memory Pool)
--- Result: SUCCESS
============================================================================
=== Test Sequence 10 (Benchmarks)
----------------------------------------------------------------------------
--- Test Case 10.1 (Messages performance #1)
--- Score : 392132 msgs/S, 784264 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.2 (Messages performance #2)
--- Score : 312482 msgs/S, 624964 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.3 (Messages performance #3)
--- Score : 312482 msgs/S, 624964 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.4 (Context Switch performance)
--- Score : 1242712 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.5 (Threads performance, full cycle)
--- Score : 225973 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.6 (Threads performance, create/exit only)
--- Score : 294115 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.7 (Mass reschedule performance)
--- Score : 93676 reschedules/S, 562056 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.8 (Round-Robin voluntary reschedule)
--- Score : 758240 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.9 (Virtual Timers set/reset performance)
--- Score : 713902 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.10 (Semaphores wait/signal performance)
--- Score : 1624356 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.11 (Mutexes lock/unlock performance)
--- Score : 960956 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 10.12 (RAM Footprint)
--- System: 120 bytes
--- Thread: 68 bytes
--- Timer : 20 bytes
--- Semaph: 12 bytes
--- Mutex : 16 bytes
--- CondV.: 8 bytes
--- EventS: 4 bytes
--- EventL: 20 bytes
--- MailB.: 40 bytes
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS

*** ChibiOS OS Library Test Suite
***
*** Compiled:     Nov  8 2019 - 18:33:47
*** Platform:     STM32L4xx Ultra Low Power
*** Test Board:   STMicroelectronics STM32L476-Discovery

============================================================================
=== Test Sequence 1 (Information)
----------------------------------------------------------------------------
--- Test Case 1.1 (Port Info)
--- Architecture:                       ARMv7E-M
--- Core Variant:                       Cortex-M4
--- Compiler:                           GCC 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
--- Port Info:                          Advanced kernel mode
--- Natural alignment:                  4
--- Stack alignment:                    8
--- Working area alignment:             8
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.2 (OS Library Info)
--- Product:                            ChibiOS/LIB
--- Stable Flag:                        0
--- Version String:                     1.2.0
--- Major Number:                       1
--- Minor Number:                       2
--- Patch Number:                       0
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 1.3 (OS Library Settings)
--- CH_CFG_USE_MEMCORE:                 1
--- CH_CFG_USE_HEAP:                    1
--- CH_CFG_USE_MEMPOOLS:                1
--- CH_CFG_USE_OBJ_FIFOS:               1
--- CH_CFG_USE_PIPES:                   1
--- CH_CFG_USE_FACTORY:                 1
--- CH_CFG_FACTORY_MAX_NAMES_LENGTH:    8
--- CH_CFG_FACTORY_OBJECTS_REGISTRY:    1
--- CH_CFG_FACTORY_GENERIC_BUFFERS:     1
--- CH_CFG_FACTORY_SEMAPHORES:          1
--- CH_CFG_FACTORY_MAILBOXES:           1
--- CH_CFG_FACTORY_OBJ_FIFOS:           1
--- CH_CFG_FACTORY_PIPES:               1
--- Result: SUCCESS
============================================================================
=== Test Sequence 2 (Mailboxes)
----------------------------------------------------------------------------
--- Test Case 2.1 (Mailbox normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.2 (Mailbox I-Class API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 2.3 (Mailbox timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 3 (Pipes)
----------------------------------------------------------------------------
--- Test Case 3.1 (Pipes normal API, non-blocking tests)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 3.2 (Pipe timeouts)
--- Result: SUCCESS
============================================================================
=== Test Sequence 4 (Objects Caches)
----------------------------------------------------------------------------
--- Test Case 4.1 (Cache initialization)
--- Result: SUCCESS
============================================================================
=== Test Sequence 5 (Memory Pools)
----------------------------------------------------------------------------
--- Test Case 5.1 (Loading and emptying a memory pool)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.2 (Loading and emptying a guarded memory pool without waiting)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 5.3 (Guarded Memory Pools timeout)
--- Result: SUCCESS
============================================================================
=== Test Sequence 6 (Memory Heaps)
----------------------------------------------------------------------------
--- Test Case 6.1 (Allocation and fragmentation)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 6.2 (Default Heap)
--- Result: SUCCESS
============================================================================
=== Test Sequence 7 (Objects Factory)
----------------------------------------------------------------------------
--- Test Case 7.1 (Objects Registry)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.2 (Dynamic Buffers Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.3 (Dynamic Semaphores Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.4 (Dynamic Mailboxes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.5 (Dynamic Objects FIFOs Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 7.6 (Dynamic Pipes Factory)
--- Result: SUCCESS
----------------------------------------------------------------------------

Final result: SUCCESS


And this is the problem, note how the last instruction takes the LR value which has already been dirtied:

Code: Select all

 08007d70 <VectorB0>:
 8007d70:   b5f0         push   {r4, r5, r6, r7, lr}
 8007d72:   4646         mov   r6, r8
 8007d74:   46d6         mov   lr, sl
 8007d76:   464f         mov   r7, r9
 8007d7a:   b5c0         push   {r6, r7, lr}
 8007d7e:   46f0         mov   r8, lr


Giovanni

faisal
Posts: 374
Joined: Wed Jul 19, 2017 12:44 am
Has thanked: 44 times
Been thanked: 60 times

Re: GCC 9

Postby faisal » Fri Nov 08, 2019 9:48 pm

mobyfab wrote:ARM has just released their new GCC, version is 9.2.1.

https://developer.arm.com/tools-and-sof ... /downloads

It's almost twice as fast on linux compared to GCC 8.

Could someone check if it still produces incorrect CM0 code?
As far as I know it was fixed in the trunk a couple month ago.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88656


What is twice as fast? Compile time? Link time ... with or without LTO?

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC 9

Postby Giovanni » Fri Nov 08, 2019 9:51 pm

I searched the GCC tracker, the bug fixes have been committed on "all active branches" two months after 9.2 release so we can expect it to be fixed in next release.

We could try to build from source but then we could hit other problems.

Giovanni

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: GCC 9

Postby mobyfab » Fri Nov 08, 2019 10:00 pm

faisal wrote:
mobyfab wrote:ARM has just released their new GCC, version is 9.2.1.

https://developer.arm.com/tools-and-sof ... /downloads

It's almost twice as fast on linux compared to GCC 8.

Could someone check if it still produces incorrect CM0 code?
As far as I know it was fixed in the trunk a couple month ago.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88656


What is twice as fast? Compile time? Link time ... with or without LTO?


Everything. I only use LTO, but it's much, much faster even without it.
There was a bug in their GCC8 release that was slowing it down, it's now fixed.

Compiling all Chibios-Contrib ARM examples/demos went from 4mn57 to 2m33.

User avatar
alex31
Posts: 374
Joined: Fri May 25, 2012 10:23 am
Location: toulouse, france
Has thanked: 38 times
Been thanked: 61 times
Contact:

Re: GCC 9

Postby alex31 » Sat Nov 09, 2019 11:27 am

Giovanni wrote:I searched the GCC tracker, the bug fixes have been committed on "all active branches" two months after 9.2 release so we can expect it to be fixed in next release.

We could try to build from source but then we could hit other problems.

Giovanni



Hello, there is an easy way to build from source, it's to use Freddie Chopin build scripts :
http://www.freddiechopin.info/en/downlo ... -toolchain

last script build 9.2.0, but it should be easy to modify script to use the 9.2.1 trunk whit the M0 fix instead.

Under linux, i use to unset some env variable before compiling : LANG, LANGUAGE, MAKEFLAGS.

Alexandre

dflogeras
Posts: 212
Joined: Tue Sep 03, 2013 8:16 pm
Has thanked: 7 times
Been thanked: 19 times

Re: GCC 9

Postby dflogeras » Mon Nov 11, 2019 2:49 pm

That's a shame they missed merging the cortex-m0 fix prior to the last round of releases.

Giovanni, based on what you've seen so far (and ignoring the cortex-m0 issue), is GCC 9 shaping up to be decent across most of the spectrum? I recall reading the last benchmark thread done between GCC 7 and 8, that there was almost nothing that GCC 8 performed better at than 7 in terms of speed/optimization/code size. Personally, I've stayed on GCC 7 for this reason (and keeping 4.9 around for m0 projects). Just wondering if I should think about migrating to GCC 9.

Thanks,
Dave

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC 9

Postby Giovanni » Mon Nov 11, 2019 2:54 pm

hi,

GCC 9 scores look generally better than GCC8 with one exception of one test case (which I need to analyse more) so it looks promising.

About M0, the latest compatible version is 5.4.1. I have not found, so far, an acceptable workaround for later compilers.

The general problem is: In an ISR epilogue how can I tell if the ISR is returning into normal code or into another ISR? The intrinsic used in the v6m port is bugged, it is done differently in v7m because that architecture has a dedicated status bit for this which is missing in M0.

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: GCC 9

Postby Giovanni » Fri Jun 05, 2020 6:51 am

Hi,

I just tried 9.3.1 2020q2 and looking at generated code it seems to be fine, LR register is preserved in the function prologue, later today I will run some tests and change the preprocessor check in the repository.

The new compiler also supports Cortex-A now, which is very nice.

Giovanni


Return to “Development and Feedback”

Who is online

Users browsing this forum: No registered users and 14 guests