A multiscalar processor for executing a multiscalar program, said multiscalar program including first, second, and third threads that are each composed of a plurality of instructions of a selected instruction set architecture, said third thread having an instruction among said plurality forming a single entry point and others of said plurality of instructions forming first and second possible exit points, said multiscalar program further including first, second, and third data structures that are each associated with a corresponding one of said first, second, and third threads, said multiscalar processor comprising:
- a plurality of processing elements that execute threads;
- a thread scheduler, including:
- means, responsive to receipt of said third data structure, said third data structure associating said first data structure with said first possible exit point and associating said second data structure with a second possible exit point, for assigning said third thread to a selected processing element among said plurality of processing elements for execution;
- means for selecting one of said first and said second possible exit points of said third thread prior to said selected processing element completing execution of said third thread;
- and
- means, responsive to said selection, for loading an associated one of said first and second data structures into said thread scheduler for processing.