ARM support
Bug fix and archs support

A temperary patch for arm ppc and mips