summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-02 19:34:16 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2001-11-02 19:34:16 +0000
commit223097eb5b50a3d0adae6d9d4b9de46fc5f6a630 (patch)
tree4224b6d4e8b546b28082518363df73ad2731797c /gcc/builtins.c
parent7a472ef10cd0f24d00fbd32db2e72a0de8b8550f (diff)
downloadgcc-223097eb5b50a3d0adae6d9d4b9de46fc5f6a630.tar.gz
* builtins.c (apply_args_size): Handle vector arguments.
(apply_result_size): Same. * machmode.def: Set WIDER mode field for all vector entries. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 28be3422f58..d1eeda9f5f2 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -836,6 +836,22 @@ apply_args_size ()
&& have_insn_for (SET, mode))
best_mode = mode;
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
mode = best_mode;
if (mode == VOIDmode)
abort ();
@@ -892,6 +908,22 @@ apply_result_size ()
&& have_insn_for (SET, mode))
best_mode = mode;
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
mode = best_mode;
if (mode == VOIDmode)
abort ();