-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Teach AsmPrinter about GlobalAddress operands.
Fixes PR22761, rdar://20024866. Differential Revision: http://reviews.llvm.org/D8042 llvm-svn: 231400
- Loading branch information
1 parent
03ea864
commit 1b67630
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
; RUN: llc < %s -mtriple aarch64-gnu-linux | FileCheck %s | ||
; RUN: llc < %s -mtriple arm64-apple-darwin | FileCheck %s | ||
|
||
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" | ||
|
||
; CHECK-LABEL: test_inlineasm_globaladdress: | ||
; CHECK: b {{_?}}test_symbol | ||
define void @test_inlineasm_globaladdress() { | ||
call void asm sideeffect "b $0", "i"(void ()* @test_symbol) | ||
ret void | ||
} | ||
|
||
; CHECK-LABEL: test_inlineasm_globaladdress_offset: | ||
; CHECK: b {{_?}}test_symbol+4 | ||
define void @test_inlineasm_globaladdress_offset() { | ||
call void asm sideeffect "b $0", "i"(void ()* bitcast (i8* getelementptr (i8* bitcast (void ()* @test_symbol to i8*), i64 4) to void ()*)) | ||
ret void | ||
} | ||
|
||
declare void @test_symbol() |