Lines Matching defs:prefix

363   // Add padding to avoid memory violation when scanning the prefix.
474 FunctionPrefixKind prefix = FunctionPrefixDetour;
475 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
476 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
477 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
478 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
492 FunctionPrefixKind prefix = FunctionPrefixHotPatch;
493 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
498 FunctionPrefixKind prefix = FunctionPrefixNone;
499 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
500 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
502 prefix = FunctionPrefixPadding;
503 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
504 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
509 FunctionPrefixKind prefix = FunctionPrefixNone;
510 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
511 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
512 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
514 prefix = FunctionPrefixPadding;
515 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
516 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
517 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
518 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
520 prefix = FunctionPrefixHotPatch;
521 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
522 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
523 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
524 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
526 prefix = FunctionPrefixDetour;
527 TestIdentityFunctionPatching(kIdentityCodeWithPrologue, override, prefix);
528 TestIdentityFunctionPatching(kIdentityCodeWithPushPop, override, prefix);
529 TestIdentityFunctionPatching(kIdentityCodeWithMov, override, prefix);
530 TestIdentityFunctionPatching(kIdentityCodeWithJump, override, prefix);
643 // Without the prefix, no function can be detoured.
655 // With the prefix, all functions can be detoured.
656 FunctionPrefixKind prefix = FunctionPrefixDetour;
657 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
658 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
659 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
660 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override, prefix));
661 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
662 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
663 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
664 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
665 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
666 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
686 FunctionPrefixKind prefix = FunctionPrefixHotPatch;
688 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
689 EXPECT_FALSE(TestFunctionPatching(kPatchableCode2, override, prefix));
690 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
691 EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override, prefix));
693 EXPECT_TRUE(TestFunctionPatching(kPatchableCode6, override, prefix));
694 EXPECT_TRUE(TestFunctionPatching(kPatchableCode7, override, prefix));
695 EXPECT_TRUE(TestFunctionPatching(kPatchableCode8, override, prefix));
697 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
698 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
699 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
700 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
701 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
702 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
707 FunctionPrefixKind prefix = FunctionPrefixPadding;
709 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
710 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
712 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
713 EXPECT_TRUE(TestFunctionPatching(kPatchableCode9, override, prefix));
714 EXPECT_TRUE(TestFunctionPatching(kPatchableCode10, override, prefix));
715 EXPECT_TRUE(TestFunctionPatching(kPatchableCode11, override, prefix));
716 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode7, override, prefix));
717 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode8, override, prefix));
718 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode9, override, prefix));
720 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
721 EXPECT_TRUE(TestFunctionPatching(kPatchableCode12, override, prefix));
722 EXPECT_TRUE(TestFunctionPatching(kPatchableCode13, override, prefix));
724 EXPECT_FALSE(TestFunctionPatching(kPatchableCode4, override, prefix));
725 EXPECT_TRUE(TestFunctionPatching(kPatchableCode14, override, prefix));
727 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
728 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
729 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
730 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
731 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
732 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));
737 FunctionPrefixKind prefix = FunctionPrefixPadding;
765 EXPECT_FALSE(TestFunctionPatching(kUnsupportedCode1, override, prefix));
774 FunctionPrefixKind prefix = FunctionPrefixPadding;
776 EXPECT_TRUE(TestFunctionPatching(kPatchableCode1, override, prefix));
777 EXPECT_TRUE(TestFunctionPatching(kPatchableCode2, override, prefix));
779 EXPECT_FALSE(TestFunctionPatching(kPatchableCode3, override, prefix));
781 EXPECT_TRUE(TestFunctionPatching(kPatchableCode3, override, prefix));
783 EXPECT_TRUE(TestFunctionPatching(kPatchableCode4, override, prefix));
785 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode1, override, prefix));
786 EXPECT_TRUE(TestFunctionPatching(kUnpatchableCode2, override, prefix));
787 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode3, override, prefix));
788 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode4, override, prefix));
789 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode5, override, prefix));
790 EXPECT_FALSE(TestFunctionPatching(kUnpatchableCode6, override, prefix));