brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 258f5cd Raw
53 lines · cpp
1//===-- XtensaMCAsmInfo.cpp - Xtensa Asm Properties -----------------------===//2//3//                     The LLVM Compiler Infrastructure4//5// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.6// See https://llvm.org/LICENSE.txt for license information.7// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception8//9//===----------------------------------------------------------------------===//10//11// This file contains the declarations of the XtensaMCAsmInfo properties.12//13//===----------------------------------------------------------------------===//14 15#include "XtensaMCAsmInfo.h"16#include "llvm/Support/raw_ostream.h"17#include "llvm/TargetParser/Triple.h"18 19using namespace llvm;20 21XtensaMCAsmInfo::XtensaMCAsmInfo(const Triple &TT) {22  CodePointerSize = 4;23  CalleeSaveStackSlotSize = 4;24  PrivateGlobalPrefix = ".L";25  CommentString = "#";26  ZeroDirective = "\t.space\t";27  Data64bitsDirective = "\t.quad\t";28  GlobalDirective = "\t.global\t";29  UsesELFSectionDirectiveForBSS = true;30  SupportsDebugInformation = true;31  ExceptionsType = ExceptionHandling::DwarfCFI;32  AlignmentIsInBytes = false;33}34 35void XtensaMCAsmInfo::printSpecifierExpr(raw_ostream &OS,36                                         const MCSpecifierExpr &Expr) const {37  StringRef S = Xtensa::getSpecifierName(Expr.getSpecifier());38  if (!S.empty())39    OS << '%' << S << '(';40  printExpr(OS, *Expr.getSubExpr());41  if (!S.empty())42    OS << ')';43}44 45uint8_t Xtensa::parseSpecifier(StringRef name) { return 0; }46 47StringRef Xtensa::getSpecifierName(uint8_t S) {48  switch (S) {49  default:50    llvm_unreachable("Invalid ELF symbol kind");51  }52}53