| 137 | } |
| 138 | |
| 139 | bool PerformLocalDisassembly(const uint8_t *data, uint64_t addr, size_t &len, decomp_result* res, bool bigendian) |
| 140 | { |
| 141 | uint32_t local_op = 0; |
| 142 | uint32_t insword = *(uint32_t *)data; |
| 143 | |
| 144 | if(bigendian == true) |
| 145 | { |
| 146 | insword = bswap32(insword); |
| 147 | } |
| 148 | |
| 149 | local_op = DoesQualifyForLocalDisassembly(data, bigendian); |
| 150 | |
| 151 | switch(local_op) |
| 152 | { |
| 153 | case PPC_INS_BN_FCMPO: |
| 154 | ppc_fcmpo(insword, res); |
| 155 | break; |
| 156 | case PPC_INS_BN_XXPERMR: |
| 157 | ppc_xxpermr(insword, res); |
| 158 | break; |
| 159 | default: |
| 160 | return false; |
| 161 | } |
| 162 | return true; |
| 163 | } |
| 164 | |
| 165 | extern "C" int |
| 166 | powerpc_init(int cs_mode_arg) |