| 512 | |
| 513 | |
| 514 | static void StoreExclusive( |
| 515 | LowLevelILFunction& il, |
| 516 | uint8_t size, |
| 517 | InstructionOperand& status, |
| 518 | InstructionOperand& src, |
| 519 | InstructionOperand& dst, |
| 520 | size_t addr) |
| 521 | { |
| 522 | ExprId address = ReadAddress(il, dst, addr); |
| 523 | size_t dstSize = get_register_size(dst.reg); |
| 524 | |
| 525 | LowLevelILLabel trueCode, falseCode; |
| 526 | size_t statusSize = get_register_size(status.reg); |
| 527 | il.AddInstruction(il.Intrinsic({ RegisterOrFlag::Register(status.reg) }, |
| 528 | ARMV7_INTRIN_EXCLUSIVE_MONITORS_PASS, |
| 529 | { address, il.Const(1, dstSize) })); |
| 530 | il.AddInstruction(il.If(il.CompareEqual(statusSize, il.Register(statusSize, status.reg), il.Const(statusSize, 1)), |
| 531 | trueCode, falseCode)); |
| 532 | il.MarkLabel(trueCode); |
| 533 | |
| 534 | Store(il, size, src, dst, addr); |
| 535 | |
| 536 | il.MarkLabel(falseCode); |
| 537 | } |
| 538 | |
| 539 | |
| 540 | static void StorePair( |
no test coverage detected