@techreport{TR-IC-99-12, number = {IC-99-12}, author = {Ricardo Pannain and Paulo Centoducatte and Guido Araújo}, title = {Using Operand Factorization to Compress {DSP} Programs}, month = {April}, year = {1999}, institution = {Institute of Computing, University of Campinas}, note = {In English, 14 pages. \par\selectlanguage{english}\textbf{Abstract} We propose a method for compressing programs running on embedded DSPs. Program expression trees are decomposed into opcode and operand sequences called patterns. We show that DSP program patterns have exponential frequency distributions. Based on that, we encode patterns using a mix of variable-length and fixed-length codewords. A decompression engine is proposed, which converts patterns into uncompressed instruction sequences. The experimental results reveal an average compression ratio of 67{\%} for typical DSP programs running on the TMS320C25 processor. This ratio includes an estimate of the size of the decompression engine. } }