CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
84 lines
2.2 KiB
C++
84 lines
2.2 KiB
C++
//===-- CSKYMCAsmInfo.cpp - CSKY Asm properties ---------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declarations of the CSKYMCAsmInfo properties.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "CSKYMCAsmInfo.h"
|
|
#include "MCTargetDesc/CSKYMCAsmInfo.h"
|
|
#include "llvm/BinaryFormat/Dwarf.h"
|
|
#include "llvm/MC/MCExpr.h"
|
|
#include "llvm/MC/MCStreamer.h"
|
|
|
|
using namespace llvm;
|
|
|
|
const MCAsmInfo::AtSpecifier atSpecifiers[] = {
|
|
{CSKY::S_GOT, "GOT"}, {CSKY::S_GOTOFF, "GOTOFF"},
|
|
{CSKY::S_PLT, "PLT"}, {CSKY::S_TLSGD, "TLSGD"},
|
|
{CSKY::S_TLSLDM, "TLSLDM"}, {CSKY::S_TPOFF, "TPOFF"},
|
|
};
|
|
|
|
void CSKYMCAsmInfo::anchor() {}
|
|
|
|
CSKYMCAsmInfo::CSKYMCAsmInfo(const Triple &TargetTriple,
|
|
const MCTargetOptions &Options)
|
|
: MCAsmInfoELF(Options) {
|
|
AlignmentIsInBytes = false;
|
|
SupportsDebugInformation = true;
|
|
CommentString = "#";
|
|
|
|
// Uses '.section' before '.bss' directive
|
|
UsesELFSectionDirectiveForBSS = true;
|
|
|
|
ExceptionsType = ExceptionHandling::DwarfCFI;
|
|
|
|
initializeAtSpecifiers(atSpecifiers);
|
|
}
|
|
|
|
static StringRef getVariantKindName(uint8_t Kind) {
|
|
using namespace CSKY;
|
|
switch (Kind) {
|
|
default:
|
|
llvm_unreachable("Invalid ELF symbol kind");
|
|
case S_None:
|
|
case S_ADDR:
|
|
return "";
|
|
case S_ADDR_HI16:
|
|
return "@HI16";
|
|
case S_ADDR_LO16:
|
|
return "@LO16";
|
|
case S_GOT_IMM18_BY4:
|
|
case S_GOT:
|
|
return "@GOT";
|
|
case S_GOTPC:
|
|
return "@GOTPC";
|
|
case S_GOTOFF:
|
|
return "@GOTOFF";
|
|
case S_PLT_IMM18_BY4:
|
|
case S_PLT:
|
|
return "@PLT";
|
|
case S_TLSLE:
|
|
return "@TPOFF";
|
|
case S_TLSIE:
|
|
return "@GOTTPOFF";
|
|
case S_TLSGD:
|
|
return "@TLSGD32";
|
|
case S_TLSLDO:
|
|
return "@TLSLDO32";
|
|
case S_TLSLDM:
|
|
return "@TLSLDM32";
|
|
}
|
|
}
|
|
|
|
void CSKYMCAsmInfo::printSpecifierExpr(raw_ostream &OS,
|
|
const MCSpecifierExpr &Expr) const {
|
|
printExpr(OS, *Expr.getSubExpr());
|
|
OS << getVariantKindName(Expr.getSpecifier());
|
|
}
|