diff options
| author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 16:02:52 +0000 |
|---|---|---|
| committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-02 16:02:52 +0000 |
| commit | 65441f6f247bd989d1832b74041bdf4ce2c75f0f (patch) | |
| tree | e40a83be7177af1bedc673ba3dca92cacef69468 /gcc/c-typeck.c | |
| parent | bfa3ca035bc8186de03fae04dcd4a7715cacb20d (diff) | |
| download | ppe42-gcc-65441f6f247bd989d1832b74041bdf4ce2c75f0f.tar.gz ppe42-gcc-65441f6f247bd989d1832b74041bdf4ce2c75f0f.zip | |
2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (resolve_overloaded_builtin): Forward to target
hook for BUILT_IN_MD built-ins.
* c-typeck.c (finish_call_expr): Call resolve_overloaded_builtin
for all types of built-in.
* target-def.h (TARGET_RESOLVE_OVERLOADED_BUILTIN): New. Use it
in the definition of the target hooks struct.
* target.h (struct gcc_target): Add resolve_overloaded_builtin.
* config/rs6000/altivec.h: Rewritten.
* config/rs6000/rs6000-c.c (struct altivec_builtin_types,
altivec_resolve_overloaded_builtin, altivec_build_resolved_builtin,
rs6000_builtin_type, rs6000_builtin_type_compatible,
altivec_overloaded_builtins, rs6000_builtin_type,
rs6000_builtin_type_compatible): New.
* config/rs6000/rs6000.c (rs6000_builtin_types, rs6000_builtin_decls):
New.
(def_builtin): Turn into a function. Check for duplicates and store
the builtin into rs6000_builtin_decls.
(bdesc_3arg, bdesc_dst, bdesc_altivec_preds, bdesc_2arg,
bdesc_1arg): Add overloaded builtins.
(altivec_expand_builtin): Check for unresolved overloaded builtins,
do not support ALTIVEC_COMPILETIME_ERROR.
(rs6000_init_builtins): Add opaque 128-bit vector, and internal
nodes to represent front-end types.
(altivec_init_builtins, rs6000_common_init_builtins): Create builtins
with opaque arguments and/or return values.
* config/rs6000/rs6000.h (enum rs6000_builtins): Remove
ALTIVEC_COMPILETIME_ERROR and add Altivec overloaded builtins.
(rs6000_builtin_type_index): New.
(is_ev64_opaque_type): Rename to...
(rs6000_is_opaque_type): ... this.
(rs6000_cpu_cpp_builtins): Install the resolve_overloaded_builtin
target hook.
cp:
2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* semantics.c (finish_call_expr): Call resolve_overloaded_builtin
for BUILT_IN_MD built-ins.
testsuite:
2005-05-02 Paolo Bonzini <bonzini@gnu.org>
* gcc.dg/altivec-3.c (vec_store): Do not use the old
__builtin_altivec_st_internal_4si built-in.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99103 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
| -rw-r--r-- | gcc/c-typeck.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 3a5d11d1f42..07471c7fd89 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1979,12 +1979,13 @@ build_function_call (tree function, tree params) /* Convert anything with function type to a pointer-to-function. */ if (TREE_CODE (function) == FUNCTION_DECL) { - if (DECL_BUILT_IN_CLASS (function) == BUILT_IN_NORMAL) - { - tem = resolve_overloaded_builtin (function, params); - if (tem) - return tem; - } + /* Implement type-directed function overloading for builtins. + resolve_overloaded_builtin and targetm.resolve_overloaded_builtin + handle all the type checking. The result is a complete expression + that implements this function call. */ + tem = resolve_overloaded_builtin (function, params); + if (tem) + return tem; name = DECL_NAME (function); |

