• 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
[SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?


  • Subject: [SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?
  • From: David Hoerl <email@hidden>
  • Date: Wed, 11 Jan 2012 15:52:04 -0500

I omitted from the original post that the code worked fine in the simulator, but crashed on the iPhone with an access violation message.

Turns out that for many data types, ARMv7 permits unaligned access (though with serious performance issues).

In looking further what I found was that the crashes happened when the library was trying to access unaligned doubles (8 bytes). I then searched around and found many posts claiming that the instruction used to load doubles (and probably long longs) only works on aligned data.

So, I switched all 8 byte casts to use memcpy, and everything fell into place.

The end result is DHlibxls on github, a ObjectiveC static library to read Excel .xls files (its a long story...) - based on the now ARMv7 clean open source library libxls on sourceforge.

Thanks to all who commented!

David
_______________________________________________
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: [SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?
      • From: Jeffrey Walton <email@hidden>
  • Prev by Date: Re: Possible to set the armv7 chip into using unaligned memory accesses?
  • Next by Date: Re: [SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?
  • Previous by thread: Re: Possible to set the armv7 chip into using unaligned memory accesses?
  • Next by thread: Re: [SOLVED] Possible to set the armv7 chip into using unaligned, memory accesses?
  • Index(es):
    • Date
    • Thread