1. A method of allocating registers in an assembler, comprising: processing assembler code to avoid a register bank allocation error including at least one of a register bank conflict and an insufficient number of physical registers in target hardware; automatically manipulating instructions to avoid the register bank allocation errors; coloring a register graph to detect the register bank conflict; identifying registers adjacent to each other in the graph having the same color; and finding a shortest path having an odd length connecting the registers adjacent to each other having the same color.