1. Apparatus for processing data, said apparatus comprising: a multithreaded processor having a hardware scheduling mechanism for interleaving execution of program instructions from a plurality of program threads; and a branch prediction mechanism having: (i) a plurality of branch history registers each storing a prediction index that is a representation of preceding branch behaviour for a respective program thread of said plurality of program threads; (ii) a global history table shared between said plurality of program threads and having a plurality of storage locations storing predictions of branch behaviour, said plurality of storage locations being indexed in dependence upon a prediction index for a currently active program thread; and (iii) mapping logic providing different mappings for different program threads between storage locations of predictions within said plurality of storage locations and preceding branch behaviour represented by respective prediction indices.