| 566 | } |
| 567 | |
| 568 | DAS_EVAL_ABI __forceinline vec4f call(const SimFunction * fn, vec4f * args, LineInfo * line) { |
| 569 | // PUSH |
| 570 | char * EP, *SP; |
| 571 | if (!stack.push(fn->stackSize, EP, SP)) { |
| 572 | throw_error_at(line, "stack overflow while calling %s",fn->mangledName); |
| 573 | return v_zero(); |
| 574 | } |
| 575 | // fill prologue |
| 576 | auto aa = abiArg; |
| 577 | abiArg = args; |
| 578 | #if DAS_SANITIZER |
| 579 | memset(stack.sp(), 0xcd, fn->stackSize); |
| 580 | #endif |
| 581 | #if DAS_ENABLE_STACK_WALK |
| 582 | Prologue * pp = (Prologue *)stack.sp(); |
| 583 | pp->info = fn->debugInfo; |
| 584 | pp->arguments = args; |
| 585 | pp->cmres = nullptr; |
| 586 | pp->line = line; |
| 587 | #endif |
| 588 | // CALL |
| 589 | fn->code->eval(*this); |
| 590 | stopFlags = 0; |
| 591 | // POP |
| 592 | abiArg = aa; |
| 593 | stack.pop(EP, SP); |
| 594 | return result; |
| 595 | } |
| 596 | |
| 597 | DAS_EVAL_ABI __forceinline vec4f callOrFastcall(const SimFunction * fn, vec4f * args, LineInfo * line) { |
| 598 | if ( fn->fastcall ) { |
no test coverage detected