A simplest assembly error - need help
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
I test a little _asm code, it works if type = float but error if type = double.
type GetSum()
{
type pData[] = {1.1, 2.2, 3.3};
type dbReturn = 0;//one line of c code, which will be replaced by _asm bellow
dbReturn = pData[0];//------------------
return dbReturn;
}asm for above one line
_asm
{
mov esi, pData
fld [esi]
fstp dbResult
}the little asm is correct if
typedef float type;
but error if
typedef double type;
why the little asm works for float but error for double? please help. thanks.