Boss is targetting me and

Hi, I am working in this MNC as a senior manager ( 6 years in this office). Two years back I did some complain against one of team mate to my boss. Complain was serious still my boss dint entertained it cause that employee was boss fev one. So i esclated this issue further to HR that too against my boss will. also complained against boss that he is fevoring that guy.Finaly i proved right and HR issued waring to that employee. Since he was my boss,s fev so I asked HR to change my team cause now boss will be revangeful. But HR asked me adjust under same boss . Since i had no option so I did same. Now after two years company is thinking of some downsizing and my boss hinting me again and again that he is going to put me in list of layoffs for no any made up reasons. He is now trying to take revange as he got some opportunity this time. I want to explore legal options in this case ,if he is going to terninate me then what legal options I have ?? Usually HR force employee to resign in this case , so in this case what should I do ?? Should I resign or not?? If I will not resign then HR will terminate me , in this case can I challenge my termination? Any other legal option fevoring employee in such case ?? I have all mail communication saved,which happened two years back. I am a good performer in my 6 years in this office but now getting targeted due to revangeful mindset of my boss. Please tell me my rights in this case. Thanks