/* This C language subroutine computes the complex exponential value of its complex floating point input. The Run Time Library for the C Language. Gordon A. Sterling (617) 461 - 3076 DSP Development Tools Engineering Created on 6/27/93 Updated on 5/94 by AS #include
complex float cexpf(complex float x); */ #include "lib_glob.h" #include "mth_glob.h" #include "dspcglob.h" .SEGMENT/CODE Code_Space_Name; .FILE RTL_FILENAME; .GLOBAL _cexpf; _cexpf: put(R3); put(R7); reads(R3, 1); /* Read real part */ reads(R7, 2); /* Read imag part */ R4=PASS R7, CALLER_HOLD(R8) CALLER_SWAP RTLCALL (PC, _cosf) (DB); SAVE_OLD_FRAME(R8) label_1: SAVE_RET_ADDR R4=PASS R7, R7=R0; /* Hold cos(imag) */ CALLER_HOLD(R8) CALLER_SWAP RTLCALL (PC, _sinf) (DB); SAVE_OLD_FRAME(R8) label_2: SAVE_RET_ADDR R4=PASS R3, R3=R0; /* Hold i*sin(imag) */ CALLER_HOLD(R8) CALLER_SWAP RTLCALL (PC, _expf) (DB); SAVE_OLD_FRAME(R8) label_3: SAVE_RET_ADDR F1=F0*F3; /* Compute imag result */ F0=F0*F7,FETCH_RETURN /* Compute real result */ restore_state: get(R7,3); get(R3,4); RETURN (DB); RESTORE_STACK RESTORE_FRAME .ENDSEG;