Modified for supporting ARM Thumb