Tech Mahindra, TCS, Maruti Suzuki, and Sun Pharma gain as broader markets falter amid geopolitical tensions.