* builtins.c (expand_builtin): Fall back to library function call for
conj, conjf, conjl, creal, crealf, creall, cimag, cimagf and cimagl.
(fold_builtin_1): Lower built-ins BUILT_IN_CONJ{,F,L} to CONJ_EXPR,
BUILT_IN_CREAL{,F,L} to REALPART_EXPR, and BUILT_IN_CIMAG{,F,L} to
IMAGPART_EXPR respectively.
From-SVN: r82938
+2004-06-10 Roger Sayle <roger@eyesopen.com>
+
+ * builtins.c (expand_builtin): Fall back to library function call for
+ conj, conjf, conjl, creal, crealf, creall, cimag, cimagf and cimagl.
+ (fold_builtin_1): Lower built-ins BUILT_IN_CONJ{,F,L} to CONJ_EXPR,
+ BUILT_IN_CREAL{,F,L} to REALPART_EXPR, and BUILT_IN_CIMAG{,F,L} to
+ IMAGPART_EXPR respectively.
+
2004-06-10 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (dump_table): New argument start. Changed caller.
}
break;
- case BUILT_IN_CONJ:
- case BUILT_IN_CONJF:
- case BUILT_IN_CONJL:
- case BUILT_IN_CREAL:
- case BUILT_IN_CREALF:
- case BUILT_IN_CREALL:
- case BUILT_IN_CIMAG:
- case BUILT_IN_CIMAGF:
- case BUILT_IN_CIMAGL:
- /* expand_tree_builtin changes these into CONJ_EXPR, REALPART_EXPR
- and IMAGPART_EXPR. */
- abort ();
-
case BUILT_IN_EXP:
case BUILT_IN_EXPF:
case BUILT_IN_EXPL:
case BUILT_IN_IMAXABS:
return fold_builtin_abs (arglist, type);
+ case BUILT_IN_CONJ:
+ case BUILT_IN_CONJF:
+ case BUILT_IN_CONJL:
+ if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
+ return fold (build1 (CONJ_EXPR, type, TREE_VALUE (arglist)));
+ break;
+
+ case BUILT_IN_CREAL:
+ case BUILT_IN_CREALF:
+ case BUILT_IN_CREALL:
+ if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
+ return non_lvalue (fold (build1 (REALPART_EXPR, type,
+ TREE_VALUE (arglist))));
+ break;
+
+ case BUILT_IN_CIMAG:
+ case BUILT_IN_CIMAGF:
+ case BUILT_IN_CIMAGL:
+ if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
+ return non_lvalue (fold (build1 (IMAGPART_EXPR, type,
+ TREE_VALUE (arglist))));
+ break;
+
case BUILT_IN_CABS:
case BUILT_IN_CABSF:
case BUILT_IN_CABSL: