Author Topic: This is an armclang bug, isn't it? [It wasn't]  (Read 2810 times)

0 Members and 1 Guest are viewing this topic.

Offline emece67Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
This is an armclang bug, isn't it? [It wasn't]
« on: August 27, 2021, 01:59:51 pm »
.
« Last Edit: August 19, 2022, 05:56:55 pm by emece67 »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11258
  • Country: us
    • Personal site
Re: This is an armclang bug, isn't it?
« Reply #1 on: August 27, 2021, 04:39:38 pm »
I'd say this is a bug. I see nothing wrong with this code.

Does it do the same if instead of a literal parameter you create a structure on the stack and pass that?
Alex
 

Offline emece67Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: This is an armclang bug, isn't it?
« Reply #2 on: August 27, 2021, 07:13:19 pm »
.
« Last Edit: August 19, 2022, 04:39:24 pm by emece67 »
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11258
  • Country: us
    • Personal site
Re: This is an armclang bug, isn't it?
« Reply #3 on: August 27, 2021, 08:19:14 pm »
What MCU/core you are targeting?

According to this https://www.keil.com/support/man/docs/armclang_ref/armclang_ref_sam1444138667173.htm:
Quote
-munaligned-access is the default for architectures that support unaligned accesses to data. This default applies to all architectures supported by Arm Compiler 6, except Armv6‑M, and Armv8‑M without the Main Extension.

So if you are targeting Cortex-M4/M7, then it will default to unaligned access, so it has to be enabled in the core. Or pass -mno-unaligned-access flag.
Alex
 
The following users thanked this post: emece67, I wanted a rude username, DiTBho

Offline emece67Topic starter

  • Frequent Contributor
  • **
  • !
  • Posts: 614
  • Country: 00
Re: This is an armclang bug, isn't it?
« Reply #4 on: August 27, 2021, 10:32:45 pm »
.
« Last Edit: August 19, 2022, 04:39:32 pm by emece67 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf