C2244 when trying to call the pow function from inline assembly
- by schrödingers cat
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