Application-specific instructions play an important role in reducing code size and improving performance for embedded processors.Automating the design process of these instructions can shorten the time-to-market of the product.This paper proposes a fully automatic approach on instruction-set extension for embedded applications and a new algorithm for instruction pattern mapping.Experimental results show great performance improvement on various embedded applications under given hardware constraints.