diff options
author | revitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-15 10:39:13 +0000 |
---|---|---|
committer | revitale <revitale@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-15 10:39:13 +0000 |
commit | c6b19c5f7e30d3fe356989902a35bee01b8ea001 (patch) | |
tree | 6da5176cd614d338ccf9a4e80eb154a56282eeb5 /gcc/targhooks.c | |
parent | b83e063e0926312524a38712f17fc488b8542ff6 (diff) | |
download | gcc-c6b19c5f7e30d3fe356989902a35bee01b8ea001.tar.gz |
New function for checking misalignment
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@151715 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 7535bc10ab7..8480c0b833f 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -771,6 +771,23 @@ default_builtin_vector_alignment_reachable (const_tree type, bool is_packed) return true; } +/* By default, assume that a target supports any factor of misalignment + memory access if it supports movmisalign patten. + is_packed is true if the memory access is defined in a packed struct. */ +bool +default_builtin_support_vector_misalignment (enum machine_mode mode, + const_tree type + ATTRIBUTE_UNUSED, + int misalignment + ATTRIBUTE_UNUSED, + bool is_packed + ATTRIBUTE_UNUSED) +{ + if (optab_handler (movmisalign_optab, mode)->insn_code != CODE_FOR_nothing) + return true; + return false; +} + bool default_hard_regno_scratch_ok (unsigned int regno ATTRIBUTE_UNUSED) { |