Created
February 27, 2019 23:20
-
-
Save pgoodman/df614c5e1246aa27e96078a66a508ae4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static bool TryExtractCMEQ_ASIMDMISC_Z(InstData &inst, uint32_t bits) { | |
| // bits | |
| // & 10111111001111111111110000000000 | |
| // -------------------------------- | |
| // 00001110001000001001100000000000 | |
| if ((bits & 0xbf3ffc00U) != 0xe209800U) { | |
| return false; | |
| } | |
| union { | |
| uint32_t flat; | |
| struct { | |
| uint32_t Rd:5; | |
| uint32_t Rn:5; | |
| uint32_t _10:1; // 0 | |
| uint32_t _11:1; // 1 | |
| uint32_t op:1; | |
| uint32_t _13:1; // 0 | |
| uint32_t _14:1; // 0 | |
| uint32_t _15:1; // 1 | |
| uint32_t _16:1; // 0 | |
| uint32_t _17:1; // 0 | |
| uint32_t _18:1; // 0 | |
| uint32_t _19:1; // 0 | |
| uint32_t _20:1; // 0 | |
| uint32_t _21:1; // 1 | |
| uint32_t size:2; | |
| uint32_t _24:1; // 0 | |
| uint32_t _25:1; // 1 | |
| uint32_t _26:1; // 1 | |
| uint32_t _27:1; // 1 | |
| uint32_t _28:1; // 0 | |
| uint32_t U:1; | |
| uint32_t Q:1; | |
| uint32_t _31:1; // 0 | |
| } __attribute__((packed)); | |
| } __attribute__((packed)) enc; | |
| static_assert(sizeof(enc) == 4, " "); | |
| enc.flat = bits; | |
| inst.Q = static_cast<uint8_t>(enc.Q); | |
| inst.Rd = static_cast<uint8_t>(enc.Rd); | |
| inst.U = static_cast<uint8_t>(enc.U); | |
| inst.Rn = static_cast<uint8_t>(enc.Rn); | |
| inst.op = static_cast<uint8_t>(enc.op); | |
| inst.size = static_cast<uint8_t>(enc.size); | |
| inst.iform = InstForm::CMEQ_ASIMDMISC_Z; | |
| inst.iclass = InstName::CMEQ; | |
| return true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment