diff options
author | Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> | 2014-12-04 10:51:54 +0000 |
---|---|---|
committer | Ganesh Gopalasubramanian <gganesh@gcc.gnu.org> | 2014-12-04 10:51:54 +0000 |
commit | 79c6bb5f20c2e2c0033bcd020ea643db3a1b11d0 (patch) | |
tree | 49c6c7a7b61aea41c2504750d2149fbecaae831e | |
parent | 8495b8f6938b2b7da696fde00f668112d50313fc (diff) | |
download | gcc-79c6bb5f20c2e2c0033bcd020ea643db3a1b11d0.zip gcc-79c6bb5f20c2e2c0033bcd020ea643db3a1b11d0.tar.gz gcc-79c6bb5f20c2e2c0033bcd020ea643db3a1b11d0.tar.bz2 |
Add prefetch support for aarch64
From-SVN: r218349
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 27 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 61b1a30..8b7bbda 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-04 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> + + * config/aarch64/aarch64.md (define_insn "prefetch"): New. + 2014-12-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> * doc/install.texi: Remove mentions of cloog and ppl. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 597ff8c..1b0d302 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -375,6 +375,33 @@ [(set_attr "type" "no_insn")] ) +(define_insn "prefetch" + [(prefetch (match_operand:DI 0 "address_operand" "r") + (match_operand:QI 1 "const_int_operand" "") + (match_operand:QI 2 "const_int_operand" ""))] + "" + { + const char * pftype[2][4] = + { + {"prfm\\tPLDL1STRM, %a0", + "prfm\\tPLDL3KEEP, %a0", + "prfm\\tPLDL2KEEP, %a0", + "prfm\\tPLDL1KEEP, %a0"}, + {"prfm\\tPSTL1STRM, %a0", + "prfm\\tPSTL3KEEP, %a0", + "prfm\\tPSTL2KEEP, %a0", + "prfm\\tPSTL1KEEP, %a0"}, + }; + + int locality = INTVAL (operands[2]); + + gcc_assert (IN_RANGE (locality, 0, 3)); + + return pftype[INTVAL(operands[1])][locality]; + } + [(set_attr "type" "load1")] +) + (define_insn "trap" [(trap_if (const_int 1) (const_int 8))] "" |