Skip to Main Content

DevOps, CI/CD and Automation

C++ compiler option -misalign

807575Jul 7 2000
Can someone help me understand the performance implication of this option? Specifically, I would like to know if "very conservative loads and stores" are used for ALL data accesses in the program, not just misaligned data accesses.

The following is quoted from the compiler's user's guide:

-misalign

SPARC: Permits misaligned data, which would otherwise generate an error, in memory. This is shown in the following
code:

char b[100];
int f(int * ar) {
return *(int *) (b +2) + *ar;
}

Very conservative loads and stores must be used for the data, that is, one byte at a time. Using this option can cause
significant degradation in performance when you run the program.

Warnings

If possible, do not link aligned and misaligned parts of the program
Post Details
Locked on Aug 4 2000
Added on Jul 7 2000
0 comments
30 views