A Framework for the Automatic Generation of Instruction-Set Extensions for Reconfigurable Architectures