diff --git a/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp b/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp index 90697c6645be2f..0d1eef60c3b550 100644 --- a/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp +++ b/llvm/lib/Target/BPF/AsmParser/BPFAsmParser.cpp @@ -229,6 +229,7 @@ struct BPFOperand : public MCParsedAsmOperand { return StringSwitch(Name.lower()) .Case("if", true) .Case("call", true) + .Case("callx", true) .Case("goto", true) .Case("gotol", true) .Case("*", true) diff --git a/llvm/test/MC/BPF/callx.s b/llvm/test/MC/BPF/callx.s new file mode 100644 index 00000000000000..1c53af99c6ac1a --- /dev/null +++ b/llvm/test/MC/BPF/callx.s @@ -0,0 +1,4 @@ +# RUN: llvm-mc -triple bpfel -show-encoding < %s | FileCheck %s + +# CHECK: callx r1 # encoding: [0x8d,0x00,0x00,0x00,0x01,0x00,0x00,0x00] +callx r1