i386.cpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //===---- i386.cpp - Generic JITLink i386 edge kinds, utilities -----===//
  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. // Generic utilities for graphs representing i386 objects.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "llvm/ExecutionEngine/JITLink/i386.h"
  13. #define DEBUG_TYPE "jitlink"
  14. namespace llvm::jitlink::i386 {
  15. const char *getEdgeKindName(Edge::Kind K) {
  16. switch (K) {
  17. case None:
  18. return "None";
  19. case Pointer32:
  20. return "Pointer32";
  21. case PCRel32:
  22. return "PCRel32";
  23. case Pointer16:
  24. return "Pointer16";
  25. case PCRel16:
  26. return "PCRel16";
  27. case Delta32:
  28. return "Delta32";
  29. case Delta32FromGOT:
  30. return "Delta32FromGOT";
  31. case RequestGOTAndTransformToDelta32FromGOT:
  32. return "RequestGOTAndTransformToDelta32FromGOT";
  33. }
  34. return getGenericEdgeKindName(K);
  35. }
  36. const char NullPointerContent[PointerSize] = {0x00, 0x00, 0x00, 0x00};
  37. } // namespace llvm::jitlink::i386