Hi:<br />
I'm trying to implement something similar to sandbox(Software fault isolation).I put the protect instruction <br />
and danger instruction(such as call) in a basicblock and use the MachineBasicBlock::setAlignment to align it <br />
to 32B.The results is the picture above.but i'm wondering if it's possible to insert the no-op before the call <br />
instruction like the picture below.<br />
0B 32B<br />
| some protect instruction | call instruction | no-ops |<br />
| some protect instruction | no-ops | call instruction |<br />
So is it possible to modify llvm's X86 backend to set the layout like this?(I guess google's native client achieve<br />
this goal, but i can't find any document.) I know there is no pass in MC layer, i just want to know if i modify <br />
the source code, can i achieve this goal?<br />
The second question, does function EmitNops in 'llvm/lib/Target/X86/MCInstLower' insert all no-ops to the binary?<br />
if not, which function does?<br />
Thanks for your help.<br />
Regards,<br />
zheng han<br />