Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Add implied zero offset load/store alias patterns
Allow load/store instructions with implied zero offset for compatibility with GNU assembler. Differential Revision: https://reviews.llvm.org/D57141 Patch by James Clarke. llvm-svn: 354581
- Loading branch information
Showing
12 changed files
with
180 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
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,14 @@ | ||
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+f -riscv-no-aliases \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+f < %s \ | ||
# RUN: | llvm-objdump -mattr=+c,+f -riscv-no-aliases -d - \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
|
||
# CHECK-EXPAND: c.flw fs0, 0(s1) | ||
c.flw f8, (x9) | ||
# CHECK-EXPAND: c.fsw fs0, 0(s1) | ||
c.fsw f8, (x9) | ||
# CHECK-EXPAND: c.flwsp fs0, 0(sp) | ||
c.flwsp f8, (x2) | ||
# CHECK-EXPAND: c.fswsp fs0, 0(sp) | ||
c.fswsp f8, (x2) |
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
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,19 @@ | ||
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc %s -triple=riscv64 -mattr=+c -riscv-no-aliases \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \ | ||
# RUN: | llvm-objdump -riscv-no-aliases -d - \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c < %s \ | ||
# RUN: | llvm-objdump -riscv-no-aliases -d - \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
|
||
# CHECK-EXPAND: c.lw s0, 0(s1) | ||
c.lw x8, (x9) | ||
# CHECK-EXPAND: c.sw s0, 0(s1) | ||
c.sw x8, (x9) | ||
# CHECK-EXPAND: c.lwsp s0, 0(sp) | ||
c.lwsp x8, (x2) | ||
# CHECK-EXPAND: c.swsp s0, 0(sp) | ||
c.swsp x8, (x2) |
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,18 @@ | ||
# RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+d -riscv-no-aliases \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc %s -triple=riscv64 -mattr=+c,+d -riscv-no-aliases \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+d < %s \ | ||
# RUN: | llvm-objdump -mattr=+c,+d -riscv-no-aliases -d - \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c,+d < %s \ | ||
# RUN: | llvm-objdump -mattr=+c,+d -riscv-no-aliases -d - \ | ||
# RUN: | FileCheck -check-prefixes=CHECK-EXPAND %s | ||
|
||
c.fld f8, (x9) | ||
# CHECK-EXPAND: c.fsd fs0, 0(s1) | ||
c.fsd f8, (x9) | ||
# CHECK-EXPAND: c.fldsp fs0, 0(sp) | ||
c.fldsp f8, (x2) | ||
# CHECK-EXPAND: c.fsdsp fs0, 0(sp) | ||
c.fsdsp f8, (x2) |
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