diff options
| author | Changpeng Fang <changpeng.fang@gmail.com> | 2016-03-10 16:47:15 +0000 |
|---|---|---|
| committer | Changpeng Fang <changpeng.fang@gmail.com> | 2016-03-10 16:47:15 +0000 |
| commit | 278a5b31a5a5524eaafced3f72e009d59277752f (patch) | |
| tree | 39ddd8bf4aa7d2372e1253d2cd9b57f3712c9640 /llvm/lib/Target/AMDGPU | |
| parent | 1632fe1f77b114799d2aa00ff2c097d9be47708a (diff) | |
| download | bcm5719-llvm-278a5b31a5a5524eaafced3f72e009d59277752f.tar.gz bcm5719-llvm-278a5b31a5a5524eaafced3f72e009d59277752f.zip | |
AMDGPU/SI: Define S_GETREG Intrinsic
Summary:
Define s_getreg intrinsic to generate s_getreg instruction to read
hardware registers.
Reviewers: tstellarAMD, arsenm
Subscribers: llvm-commits, arsenm
Differential Revision: http://reviews.llvm.org/D17892
llvm-svn: 263124
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstructions.td | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td index 7602498c274..edc60925a3e 100644 --- a/llvm/lib/Target/AMDGPU/SIInstructions.td +++ b/llvm/lib/Target/AMDGPU/SIInstructions.td @@ -416,7 +416,11 @@ defm S_CBRANCH_I_FORK : SOPK_m < sopk<0x11, 0x10>, "s_cbranch_i_fork", (outs), (ins SReg_64:$sdst, u16imm:$simm16), " $sdst, $simm16" >; + +let mayLoad = 1 in { defm S_GETREG_B32 : SOPK_32 <sopk<0x12, 0x11>, "s_getreg_b32", []>; +} + defm S_SETREG_B32 : SOPK_m < sopk<0x13, 0x12>, "s_setreg_b32", (outs), (ins SReg_32:$sdst, u16imm:$simm16), " $sdst, $simm16" @@ -2090,6 +2094,14 @@ def : Pat < >; //===----------------------------------------------------------------------===// +// S_GETREG_B32 Intrinsic Pattern. +//===----------------------------------------------------------------------===// +def : Pat < + (int_amdgcn_s_getreg imm:$simm16), + (S_GETREG_B32 (as_i16imm $simm16)) +>; + +//===----------------------------------------------------------------------===// // SMRD Patterns //===----------------------------------------------------------------------===// |

