* Calculate the start of the trampoline prologue. */
| 133 | * Calculate the start of the trampoline prologue. |
| 134 | */ |
| 135 | const Instr *getTrampolinePrologueStart(const EntrySet &Es, const Instr *I) |
| 136 | { |
| 137 | if (!option_Opeephole) |
| 138 | return nullptr; |
| 139 | auto i = Es.find(I->addr); |
| 140 | if (i == Es.end()) |
| 141 | return nullptr; |
| 142 | const EntryPoint &E = i->second; |
| 143 | if (E.I != I) |
| 144 | return nullptr; |
| 145 | |
| 146 | auto j = Es.begin(); |
| 147 | const Instr *J = I, *K = nullptr; |
| 148 | while (i != j) |
| 149 | { |
| 150 | J = J->prev(); |
| 151 | i--; |
| 152 | const EntryPoint &F = i->second; |
| 153 | if (F.I != E.I) |
| 154 | break; |
| 155 | if (F.target32 || F.target8) |
| 156 | K = J; |
| 157 | } |
| 158 | return K; |
| 159 | } |
| 160 | |
| 161 | /* |
| 162 | * Get the corresponding trampoline entry if it exists, else INTPTR_MIN. |
no test coverage detected