摘要 |
The present invention discloses a method for compressing instruction codes. This method comprises: compressing an instruction block including a plurality of instructions according to Huffman-Encoding technique; determining whether it's necessary to insert no-operation (nop) instructions among the plurality of compressed instructions according to a compression ratio, so as to generate a plurality of new instruction blocks complying with the compression ratio; if it's necessary to insert nop instructions, inserting nop instructions among the plurality of compressed instructions to form the plurality of new instruction blocks; and repeating the above-mentioned steps until no nop instructions have to be inserted.
|