armv8-m.main long call implementation

Asked by Andrew Malachowski on 2020-03-13

I've noticed on gcc8 and gcc9 builds targeting the CM33 that the implementation of the veneers used for long calls appear to be using the limited THUMB2 e.g.

-march=armv8-m.main
    000000b4 <main>:
      b4: b508 push {r3, r14}
      b6: f000 f96b bl 390 <__func0_veneer>
      ba: 2000 movs r0, #0
      bc: bd08 pop {r3, r15}
      be: bf00 nop

    00000390 <__func0_veneer>:
      390: b401 push {r0}
      392: 4802 ldr r0, [pc, #8] ; (39c <__func0_veneer+0xc>)
      394: 4684 mov r12, r0
      396: bc01 pop {r0}
      398: 4760 bx r12
      39a: bf00 nop
      39c: 18000001 .word 0x18000001

Comparatively on the CM4 using full THUMB2

-march-armv7e-m
    000000b4 <main>:
      b4: b508 push {r3, r14}
      b6: f000 f96b bl 390 <__func0_veneer>
      ba: 2000 movs r0, #0
      bc: bd08 pop {r3, r15}
      be: bf00 nop

    00000390 <__func0_veneer>:
     390: f85f f000 ldr.w r15, [r15] ; 394 <__func0_veneer+0x4>
     394: 18000001 .word 0x18000001

Is there something related to the security extensions that forces the architecture to use the less efficient implementation or is it a bug in the armv8m.mainline configuration?

Question information

Language:
English Edit question
Status:
Expired
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
2020-03-13
Last reply:
2020-03-29
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.