Improvements to float support in printf_fast
[fw/sdcc] / device / lib / _fsget1arg.c
1 #define SDCC_FLOAT_LIB
2 #include <float.h>
3
4
5 static void dummy(void) _naked
6 {
7         // input passed in a,b,dph,dpl
8         _asm
9         .globl  fsgetarg
10 fsgetarg:
11         // extract the input, placing it into:
12         //      sign     exponent   mantiassa
13         //      ----     --------   ---------
14         //  a:  sign_a   exp_a     r4/r3/r2
15         //
16         mov     r2, dpl
17         mov     r3, dph
18         mov     c, b.7
19         rlc     a
20         mov     sign_a, c
21         jz      00001$
22         setb    b.7
23 00001$:
24         mov     exp_a, a
25         mov     r4, b
26         ret
27         _endasm;
28 }
29
30
31
32