C2244 when trying to call the pow function from inline assembly
Posted
by schrödingers cat
on Stack Overflow
See other posts from Stack Overflow
or by schrödingers cat
Published on 2010-05-28T00:00:31Z
Indexed on
2010/05/28
0:01 UTC
Read the original article
Hit count: 333
I would like to call the pow function from inline assembly. The problem is i'm getting error C2244: 'pow' : unable to match function definition to an existing declaration. I'm new to assembly so this may be a trivial question but how do i resolve this? I guess it has something to do with the compiler not beeing able to properly resolve the overload of pow. The following code fragment is causing the error:
do_POW:
// push first argument to the stack
sub esp, size value_type
fld qword ptr [ecx]
fstp qword ptr [esp]
// push second argument to the stack
sub esp, size value_type
fld qword ptr [ecx - size value_type]
fstp qword ptr [esp]and pop fpu stack
// call the pow function
call pow
sub ecx, size value_type
fstp qword ptr [ecx]
add esp, 2 * size value_type
jmp loop_start
© Stack Overflow or respective owner