Preliminary finding is that defining a local function with the same name and prototype as an intrinsic will cause the compiler to use the user-defined function over the standard intrinsic, without emitting a duplicate symbol linker error. This can work to my advantage for solving unaligned access issues until I can come up with something better.
This solution is assuming that intrinsic memory copies and intrinsic memory sets are actually...
User Profile
Collapse
-
Yes I own copies of the C and C++ standard specifications, you and I both know very well that __unaligned is an MS extension. My point was that if any other ARM compilers have extensions covering functionality and behavior not covered by the standards that are specific to that processor then I would expect there to be something equivalent in those extensions.
Even on the MS development platform, the __unaligned keyword only works when...Leave a comment:
-
Your solution is trivial and it would be my first choice, however is in not within the constraints I've been given.
Expecting unaligned access to uncached memory to cause exception is specific to the cpu, not the OS or development platform. And so it should not be unexpected to find an equivalent.
I either can make a tiny change to the existing code like adding another keyword to the type, or I have to change the behavior...Leave a comment:
-
Another question about unaligned access
There is some kernel code that is playing with uncached memory in an unaligned fashion and halting the system, and hardware-supported unaligned access only works for cached memory. I want changes to existing code to be minimal. Is there a way to tell the compiler to access the memory a byte at a time, equivalent to the __unaligned keyword in MS C++?
Code:unsigned char* uncachedMemory = (unsigned char*)GetUncachedMemory(); // returns 8 bytes
No activity results to display
Show More
Leave a comment: