1. A network device, comprising: a switching fabric; and a plurality of network processors connected to communicate via the switching fabric, the network processors including: a plurality of input register files, a plurality of output register files, and an execution unit configured to perform a plurality of protocol-processing functions on data received via the input register files and output the data via the output register files, the execution unit comprising: a plurality of specialized registers configured to store the data during performance of the protocol-processing functions, and a memory that performs a plurality of functions depending on which of the protocol-processing functions is performed by the execution unit.