| 365 | } |
| 366 | |
| 367 | static inline bool isT2SOImmTwoPartVal (unsigned Imm) |
| 368 | { |
| 369 | unsigned V = Imm; |
| 370 | // Passing values can be any combination of splat values and shifter |
| 371 | // values. If this can be handled with a single shifter or splat, bail |
| 372 | // out. Those should be handled directly, not with a two-part val. |
| 373 | if (getT2SOImmValSplatVal(V) != -1) |
| 374 | return false; |
| 375 | V = rotr32 (~255U, getT2SOImmValRotate(V)) & V; |
| 376 | if (V == 0) |
| 377 | return false; |
| 378 | |
| 379 | // If this can be handled as an immediate, accept. |
| 380 | if (getT2SOImmVal(V) != -1) return true; |
| 381 | |
| 382 | // Likewise, try masking out a splat value first. |
| 383 | V = Imm; |
| 384 | if (getT2SOImmValSplatVal(V & 0xff00ff00U) != -1) |
| 385 | V &= ~0xff00ff00U; |
| 386 | else if (getT2SOImmValSplatVal(V & 0x00ff00ffU) != -1) |
| 387 | V &= ~0x00ff00ffU; |
| 388 | // If what's left can be handled as an immediate, accept. |
| 389 | if (getT2SOImmVal(V) != -1) return true; |
| 390 | |
| 391 | // Otherwise, do not accept. |
| 392 | return false; |
| 393 | } |
| 394 | |
| 395 | static inline unsigned getT2SOImmTwoPartFirst(unsigned Imm) |
| 396 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…