-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Add assembler support for LA pseudo-instruction
This patch also introduces the emitAuipcInstPair helper, which is then used for both emitLoadAddress and emitLoadLocalAddress. Differential Revision: https://reviews.llvm.org/D55325 Patch by James Clarke. llvm-svn: 354111
- Loading branch information
Showing
4 changed files
with
145 additions
and
20 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
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,22 @@ | ||
# RUN: not llvm-mc %s -triple=riscv64 2>&1 | FileCheck %s | ||
# RUN: not llvm-mc %s -triple=riscv64 2>&1 | FileCheck %s | ||
|
||
lla x1, 1234 # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %hi(1234) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %lo(1234) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %hi(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
lla x1, %lo(foo) # CHECK: :[[@LINE]]:9: error: operand must be a bare symbol name | ||
|
||
la x1, 1234 # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %pcrel_hi(1234) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %pcrel_lo(1234) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %pcrel_hi(foo) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %pcrel_lo(foo) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %hi(1234) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %lo(1234) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %hi(foo) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name | ||
la x1, %lo(foo) # CHECK: :[[@LINE]]:8: error: operand must be a bare symbol name |
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