Add volatile modifier to prevent ARM compiler to remove inline function calls for __set_CP and __get_CP.