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