Open negge opened 2 years ago
Thanks for bug report. I will review.
Take into account that in-line assembler is simple without functionality of standalone assembler. It use simple expression evaluator. It is supposed that complex expression will be resolved by C front end and in-line assembler do only basic operation.
Your code should looks like
float nums[3*4 + 2];
static void test_store_at_offset(float a, float *b);
#pragma aux test_store_at_offset parm [ 8087 ] [esi] = \
"fstp dword ptr [esi]"
void main() {
test_store_at_offset(0, nums + 3*4);
}
which is compiled as
main_:
push esi
fldz
mov esi,offset FLAT:_nums+30H
fstp dword ptr [esi]
pop esi
ret
Anyway I will look on this problem with expression evaluation.
When adding a constant offset to an address using inline assembly, some expressions fail to parse. Consider the example:
Compiling gives this error:
However changing the expression to
3*16
works fine. So do more complex expressions like(3*4 + 1)*4
.