from LLVM TODO: check license, determine if rewrite needed
| 707 | // from LLVM |
| 708 | // TODO: check license, determine if rewrite needed |
| 709 | uint64_t VFPExpandImm(unsigned char byte, unsigned N) |
| 710 | { |
| 711 | // assert(N == 32 || N == 64); |
| 712 | |
| 713 | uint64_t Result; |
| 714 | unsigned bit6 = SLICE(byte, 6, 6); |
| 715 | if (N == 32) |
| 716 | { |
| 717 | Result = SLICE(byte, 7, 7) << 31 | SLICE(byte, 5, 0) << 19; |
| 718 | if (bit6) |
| 719 | Result |= 0x1f << 25; |
| 720 | else |
| 721 | Result |= 0x1 << 30; |
| 722 | } |
| 723 | else |
| 724 | { |
| 725 | Result = (uint64_t)SLICE(byte, 7, 7) << 63 | (uint64_t)SLICE(byte, 5, 0) << 48; |
| 726 | if (bit6) |
| 727 | Result |= 0xffULL << 54; |
| 728 | else |
| 729 | Result |= 0x1ULL << 62; |
| 730 | } |
| 731 | |
| 732 | // return APInt(N, Result); |
| 733 | return Result; |
| 734 | } |
| 735 | |
| 736 | bool EL2Enabled(void) |
| 737 | { |
no outgoing calls
no test coverage detected