Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions clang/test/CodeGen/AArch64/global-inline-asm-flags.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +pauth -flto=thin -emit-llvm -o - %s | FileCheck %s
// REQUIRES: aarch64-registered-target

// Check that +pauth target flag is enabled for global inline assembler.

// CHECK: module asm ".text"
// CHECK: module asm ".balign 16"
// CHECK: module asm ".globl foo"
// CHECK: module asm "pacib x30, x27"
// CHECK: module asm "retab"
// CHECK: module asm ".previous"

asm (
".text" "\n"
".balign 16" "\n"
".globl foo\n"
"pacib x30, x27" "\n"
"retab" "\n"
".previous" "\n"
);
3 changes: 2 additions & 1 deletion llvm/lib/Object/ModuleSymbolTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ initializeRecordStreamer(const Module &M,
if (!MAI)
return;

std::unique_ptr<MCSubtargetInfo> STI(T->createMCSubtargetInfo(TT, "", ""));
std::unique_ptr<MCSubtargetInfo> STI(
T->createMCSubtargetInfo(TT, "", "+all"));
if (!STI)
return;

Expand Down
Loading