juliak66ussd
Programmer
Hi, everyone... first time here.
I am taking on a big project with a lot of parsing
and such, so I use inline ASM a lot. As known, the
latest Pentium CPUs are performing better when code
and data are aligned on 32-byte boundary. Here is a code
sample with a loop aligned on 16 byte:
And that works OK, however, I need 32-byte alignment, but
when I specify it - the compiler gives the following:
error C2413: 'align' : illegal align size
My question is: is there any directive or command line flag
which will fix that problem? And why 16 is fine, but 32 is not?
My guess, the segment where code is generated does not have
an alignment property compatible with 32-bytes. I
encountered this in pure ASM code. So, how can that be changed? Is it possible at all?
I am taking on a big project with a lot of parsing
and such, so I use inline ASM a lot. As known, the
latest Pentium CPUs are performing better when code
and data are aligned on 32-byte boundary. Here is a code
sample with a loop aligned on 16 byte:
Code:
_asm {
ALIGN 16
NEXT:
// ... some instructions here ...
loop NEXT
}
when I specify it - the compiler gives the following:
error C2413: 'align' : illegal align size
My question is: is there any directive or command line flag
which will fix that problem? And why 16 is fine, but 32 is not?
My guess, the segment where code is generated does not have
an alignment property compatible with 32-bytes. I
encountered this in pure ASM code. So, how can that be changed? Is it possible at all?