This patch refactors some code so that it is easier to integrate new inline assemblers for different architectures other than ARM Thumb.