1//===-- ABIX86_i386.cpp ---------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "ABIX86_i386.h"
10
11uint32_t ABIX86_i386::GetGenericNum(llvm::StringRef name) {
12 return llvm::StringSwitch<uint32_t>(name)
13 .Case(S: "eip", LLDB_REGNUM_GENERIC_PC)
14 .Case(S: "esp", LLDB_REGNUM_GENERIC_SP)
15 .Case(S: "ebp", LLDB_REGNUM_GENERIC_FP)
16 .Case(S: "eflags", LLDB_REGNUM_GENERIC_FLAGS)
17 .Case(S: "edi", LLDB_REGNUM_GENERIC_ARG1)
18 .Case(S: "esi", LLDB_REGNUM_GENERIC_ARG2)
19 .Case(S: "edx", LLDB_REGNUM_GENERIC_ARG3)
20 .Case(S: "ecx", LLDB_REGNUM_GENERIC_ARG4)
21 .Default(LLDB_INVALID_REGNUM);
22}
23

source code of lldb/source/Plugins/ABI/X86/ABIX86_i386.cpp