| 787 | } |
| 788 | |
| 789 | uint64_t FPPointFive(bool sign, int N) |
| 790 | { |
| 791 | // width should be 16, 32, 64 |
| 792 | int E, F, exp; |
| 793 | |
| 794 | switch (N) |
| 795 | { |
| 796 | case 16: |
| 797 | E = 5; |
| 798 | case 32: |
| 799 | E = 8; |
| 800 | default: |
| 801 | E = 11; |
| 802 | } |
| 803 | |
| 804 | F = N - (E + 1); |
| 805 | exp = BITMASK(E - 2) << 1; |
| 806 | return (sign << (E - 2 + F)) | (exp << F); |
| 807 | } |
| 808 | |
| 809 | uint64_t SignExtend(uint64_t x, int width) |
| 810 | { |
no outgoing calls
no test coverage detected