diff options
author | James Bowman <james.bowman@ftdichip.com> | 2015-09-29 23:34:34 +0000 |
---|---|---|
committer | James Bowman <jamesbowman@gcc.gnu.org> | 2015-09-29 23:34:34 +0000 |
commit | d3adfe5dbe08d502a870d0279db39ced6fa1c088 (patch) | |
tree | 7fd16acf1d71e9bc3c2a15d9ac584e882621b3b4 /gcc | |
parent | 3734a25644d2f7ea652303f4268de9e52e4a5a64 (diff) | |
download | gcc-d3adfe5dbe08d502a870d0279db39ced6fa1c088.zip gcc-d3adfe5dbe08d502a870d0279db39ced6fa1c088.tar.gz gcc-d3adfe5dbe08d502a870d0279db39ced6fa1c088.tar.bz2 |
Limit the MEMSET (setmemsi pattern) and MEMCPY (movmemsi pattern) instructions to 0-511 bytes.
Limit the MEMSET (setmemsi pattern) and MEMCPY (movmemsi pattern)
instructions to 0-511 bytes. There is a hardware limitation on large
MEMSET, MEMCPY operations that the library versions of memset() and
memcpy() deal with.
2015-09-29 James Bowman <james.bowman@ftdichip.com>
* config/ft32/predicates.md (ft32_imm_operand): New predicate.
* config/ft32/ft32.md (movmemsi, setmemsi): Use ft32_imm_operand
predicate, disallow register for operand 2.
From-SVN: r228271
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/ft32/ft32.md | 14 | ||||
-rw-r--r-- | gcc/config/ft32/predicates.md | 4 |
3 files changed, 17 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fc1ce7..6f9fea7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-09-29 James Bowman <james.bowman@ftdichip.com> + + * config/ft32/predicates.md (ft32_imm_operand): New predicate. + * config/ft32/ft32.md (movmemsi, setmemsi): Use ft32_imm_operand + predicate, disallow register for operand 2. + 2015-09-29 Aditya Kumar <aditya.k7@samsung.com> * graphite-dependences.c (scop_get_dependences): Moved in down diff --git a/gcc/config/ft32/ft32.md b/gcc/config/ft32/ft32.md index 68dc683..1eac74d 100644 --- a/gcc/config/ft32/ft32.md +++ b/gcc/config/ft32/ft32.md @@ -841,19 +841,19 @@ ) (define_insn "movmemsi" - [(set (match_operand:BLK 0 "memory_operand" "=W,W,BW") - (match_operand:BLK 1 "memory_operand" "W,W,BW")) - (use (match_operand:SI 2 "ft32_rimm_operand" "r,KA,rKA")) + [(set (match_operand:BLK 0 "memory_operand" "=W,BW") + (match_operand:BLK 1 "memory_operand" "W,BW")) + (use (match_operand:SI 2 "ft32_imm_operand" "KA,KA")) (use (match_operand:SI 3)) ] "" - "memcpy.%d3 %b0,%b1,%2 # %3!" + "memcpy.%d3 %b0,%b1,%2 " ) (define_insn "setmemsi" - [(set (match_operand:BLK 0 "memory_operand" "=BW,BW") (unspec:BLK [ - (use (match_operand:QI 2 "register_operand" "r,r")) - (use (match_operand:SI 1 "ft32_rimm_operand" "r,KA")) + [(set (match_operand:BLK 0 "memory_operand" "=BW") (unspec:BLK [ + (use (match_operand:QI 2 "register_operand" "r")) + (use (match_operand:SI 1 "ft32_imm_operand" "KA")) ] UNSPEC_SETMEM)) (use (match_operand:SI 3)) ] diff --git a/gcc/config/ft32/predicates.md b/gcc/config/ft32/predicates.md index ac800ae..32ca8c6 100644 --- a/gcc/config/ft32/predicates.md +++ b/gcc/config/ft32/predicates.md @@ -80,6 +80,10 @@ (and (match_code "const_int") (match_test "IN_RANGE (INTVAL (op), -512, 511)")))) +(define_predicate "ft32_imm_operand" + (and (match_code "const_int") + (match_test "IN_RANGE (INTVAL (op), -512, 511)"))) + (define_predicate "ft32_bwidth_operand" (and (match_code "const_int") (match_test "IN_RANGE (INTVAL (op), 1, 16)"))) |