From ec84e2f1b08c297f82f517bc5c904dee78c2a6bc Mon Sep 17 00:00:00 2001 From: Yonghong Song Date: Fri, 23 Feb 2018 23:49:18 +0000 Subject: bpf: Use markSuperRegs to mark reserved registers markSuperRegs is the canonical helper function used to mark reserved registers. It could mark any overlapping sub-registers automatically. Reviewed-by: Yonghong Song Signed-off-by: Jiong Wang llvm-svn: 325979 --- llvm/lib/Target/BPF/BPFRegisterInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/Target/BPF/BPFRegisterInfo.cpp b/llvm/lib/Target/BPF/BPFRegisterInfo.cpp index 6f706781609..635c1111315 100644 --- a/llvm/lib/Target/BPF/BPFRegisterInfo.cpp +++ b/llvm/lib/Target/BPF/BPFRegisterInfo.cpp @@ -37,8 +37,8 @@ BPFRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { BitVector BPFRegisterInfo::getReservedRegs(const MachineFunction &MF) const { BitVector Reserved(getNumRegs()); - Reserved.set(BPF::R10); // R10 is read only frame pointer - Reserved.set(BPF::R11); // R11 is pseudo stack pointer + markSuperRegs(Reserved, BPF::W10); // [W|R]10 is read only frame pointer + markSuperRegs(Reserved, BPF::W11); // [W|R]11 is pseudo stack pointer return Reserved; } -- cgit v1.2.3