1. Apparatus for processing data comprising: processing circuitry configured to perform data processing operations; instruction decoder circuitry coupled to said processing circuitry and responsive to a stream of program instructions to generate control signals to control said processing circuitry to perform said data processing operations; and dedicated function hardware coupled to said processing circuitry and configured to receive output data from said processing circuitry and to perform a dedicated processing operation upon said output data to generate hardware generated result data; wherein said instruction decoder circuitry is responsive to an end instruction and a software processing flag to generate control signals to control said processing circuitry to end a current software routine, to generate said output data and: (i) if said software processing flag has a first value, then to trigger said dedicated function hardware to receive said output data from said processing circuitry and to perform said dedicated processing operation to generate said hardware generated result data; or (ii) if said software processing flag has a second value, then to trigger said processing circuitry to perform a further software routine upon said output data to generate software generated result data instead of said hardware generated result data.