Computer software having program code which, when executed by a host system, causes the host system to carry out a method for emulation of a target system, the method comprising: determining statistics for use of a set of registers of a target system processor; based on the statistics, determining a first subset of registers of the set of registers, the first subset including one or more most commonly used registers; directly mapping the first subset of registers to a first group of registers of a host system processor so as to provide a consistent mapping between a target system register and one or more corresponding host system registers; dynamically mapping a second subset of the set of registers to a second group of registers of the host system processor, so that a target system register is mapped dynamically to whatever host system register or registers of the second group happen to be available; and emulating the target system processor on the host system processor using the first and second groups of registers of the host system processor; wherein some of the registers in the set of registers of the target system processor are larger than the registers in the first and second groups of registers of the host system processor, and some of the registers in the set of registers of the target system processor are smaller than the registers in the first and second groups of registers of the host system processor, wherein each of the registers in the set of registers of the target system processor that are larger than the registers in the first and second groups of registers of the host system processor are mapped to multiple registers in the first and/or second groups of registers of the host system processor, and wherein one or more registers in the set of registers of the target system processor that are smaller than the registers in the first and second groups of registers of the host system processor are mapped to each field of a larger register in the first or second groups of registers of the host system processor, wherein the larger register is divided into fields of an equivalent size to the smaller register. determining statistics for use of a set of registers of a target system processor; based on the statistics, determining a first subset of registers of the set of registers, the first subset including one or more most commonly used registers; directly mapping the first subset of registers to a first group of registers of a host system processor so as to provide a consistent mapping between a target system register and one or more corresponding host system registers; dynamically mapping a second subset of the set of registers to a second group of registers of the host system processor, so that a target system register is mapped dynamically to whatever host system register or registers of the second group happen to be available; and emulating the target system processor on the host system processor using the first and second groups of registers of the host system processor; wherein some of the registers in the set of registers of the target system processor are larger than the registers in the first and second groups of registers of the host system processor, and some of the registers in the set of registers of the target system processor are smaller than the registers in the first and second groups of registers of the host system processor, wherein each of the registers in the set of registers of the target system processor that are larger than the registers in the first and second groups of registers of the host system processor are mapped to multiple registers in the first and/or second groups of registers of the host system processor, and wherein one or more registers in the set of registers of the target system processor that are smaller than the registers in the first and second groups of registers of the host system processor are mapped to each field of a larger register in the first or second groups of registers of the host system processor, wherein the larger register is divided into fields of an equivalent size to the smaller register.