[llvm-branch-commits] [llvm] [3/7][PISA] Add PISA register file, instruction set, and MC layer (PR #214107)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Sep 13 10:28:50 PDT 2026
================
@@ -0,0 +1,30 @@
+//===-- PISAMCExpr.cpp - Handle custom MCExprs ----------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "PISAMCExpr.h"
+#include "PISAInstPrinter.h"
+#include "llvm/MC/MCAssembler.h"
+#include "llvm/MC/MCContext.h"
+#include "llvm/Support/Format.h"
+using namespace llvm;
+
+const PISAGlobalAddressMCExpr *
+PISAGlobalAddressMCExpr::create(const MCSymbol &Symbol, MCContext &Ctx) {
+ return new (Ctx) PISAGlobalAddressMCExpr(Symbol);
+}
+
+PISAGlobalAddressMCExpr::PISAGlobalAddressMCExpr(const MCSymbol &Sym)
+ : Symbol(&Sym) {
+ assert(Symbol);
+}
+
+void PISAGlobalAddressMCExpr::printImpl(raw_ostream &OS,
+ const MCAsmInfo *MAI) const {
+ OS << "@";
----------------
arsenm wrote:
```suggestion
OS << '@';
```
https://github.com/llvm/llvm-project/pull/214107
More information about the llvm-branch-commits
mailing list