CSKYAttributeParser.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===---- CSKYAttributeParser.h - CSKY Attribute Parser ---------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_SUPPORT_CSKYATTRIBUTEPARSER_H
  14. #define LLVM_SUPPORT_CSKYATTRIBUTEPARSER_H
  15. #include "llvm/Support/CSKYAttributes.h"
  16. #include "llvm/Support/ELFAttributeParser.h"
  17. namespace llvm {
  18. class CSKYAttributeParser : public ELFAttributeParser {
  19. struct DisplayHandler {
  20. CSKYAttrs::AttrType attribute;
  21. Error (CSKYAttributeParser::*routine)(unsigned);
  22. };
  23. static const DisplayHandler displayRoutines[];
  24. Error dspVersion(unsigned tag);
  25. Error vdspVersion(unsigned tag);
  26. Error fpuVersion(unsigned tag);
  27. Error fpuABI(unsigned tag);
  28. Error fpuRounding(unsigned tag);
  29. Error fpuDenormal(unsigned tag);
  30. Error fpuException(unsigned tag);
  31. Error fpuHardFP(unsigned tag);
  32. Error handler(uint64_t tag, bool &handled) override;
  33. public:
  34. CSKYAttributeParser(ScopedPrinter *sw)
  35. : ELFAttributeParser(sw, CSKYAttrs::getCSKYAttributeTags(), "csky") {}
  36. CSKYAttributeParser()
  37. : ELFAttributeParser(CSKYAttrs::getCSKYAttributeTags(), "csky") {}
  38. };
  39. } // namespace llvm
  40. #endif
  41. #ifdef __GNUC__
  42. #pragma GCC diagnostic pop
  43. #endif