• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: When is an unaligned memory access illegal on ARM?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: When is an unaligned memory access illegal on ARM?


  • Subject: Re: When is an unaligned memory access illegal on ARM?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 23 Jun 2014 11:21:02 -0700


On Jun 22, 2014, at 8:18 PM, Roland King <email@hidden> wrote:

What 'aligned' is for any given type is up to the compiler. The only way I can see that the compiler is 'right' in this instance is if uint32_t pointers are defined to be 8 byte aligned (even though you'd think it would be 4 byte)

It’s easy to prove that’s not the case, by defining a struct like
struct {
uint32_t a, b;
} foo;
and evaluating sizeof(foo), which is 8 not 12. I.e. Clang treats uint32_t as 4-byte aligned as we’d expect.

—Jens

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: When is an unaligned memory access illegal on ARM?
      • From: Roland King <email@hidden>
References: 
 >When is an unaligned memory access illegal on ARM? (From: Jens Alfke <email@hidden>)
 >Re: When is an unaligned memory access illegal on ARM? (From: Roland King <email@hidden>)
 >Re: When is an unaligned memory access illegal on ARM? (From: Jens Alfke <email@hidden>)
 >Re: When is an unaligned memory access illegal on ARM? (From: Roland King <email@hidden>)
 >Re: When is an unaligned memory access illegal on ARM? (From: Roland King <email@hidden>)

  • Prev by Date: Re: When is an unaligned memory access illegal on ARM?
  • Next by Date: Getting weird assembly view in iOS target
  • Previous by thread: Re: When is an unaligned memory access illegal on ARM?
  • Next by thread: Re: When is an unaligned memory access illegal on ARM?
  • Index(es):
    • Date
    • Thread