1. A method of enforcing control-flow integrity (CFI) of a software program operating-in conjunction with a microprocessor and associated with a control flow graph (CFG), comprising: identifying indirect branches in the software program, and destinations of the indirect branches; constraining the destinations to a set of targets within the CFG; annotating each target of each indirect branch with a label; and for each indirect branch, using a microarchitecture that checks to determine if the destination contains the label, determines that the indirect branch is valid if the label is present, and otherwise triggers an exception.