Commit bf5f0e90 by John Carr Committed by John Carr

calls.c (expand_call): Fix recognition of C++ operator new.

	* calls.c (expand_call): Fix recognition of C++ operator new.
	* alias.c (mode_alias_check): Disable type based alias detection.

From-SVN: r19492
parent a0281dae
Wed Apr 29 15:34:40 1998 John Carr <jfc@mit.edu>
* calls.c (expand_call): Fix recognition of C++ operator new.
* alias.c (mode_alias_check): Disable type based alias detection.
Wed Apr 29 15:06:42 1998 Gavin Koch <gavin@cygnus.com>
* config/mips/elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL,
......
......@@ -859,6 +859,11 @@ mode_alias_check (x, y, varies)
register rtx x, y;
int (*varies) PROTO ((rtx));
{
#if 1
/* gcc rules: all type aliasing allowed */
return 1;
#else
/* ANSI C rules: different types do not alias. */
enum machine_mode x_mode = GET_MODE (x), y_mode = GET_MODE (y);
rtx x_addr = XEXP (x, 0), y_addr = XEXP (y, 0);
int x_varies, y_varies, x_struct, y_struct;
......@@ -903,6 +908,7 @@ mode_alias_check (x, y, varies)
/* Both are varying structs or fixed scalars. Check that they are not
the same type. */
return (x_struct == y_struct);
#endif
}
/* Read dependence: X is read after read in MEM takes place. There can
......
......@@ -901,8 +901,12 @@ expand_call (exp, target, ignore)
else if (! strcmp (tname, "malloc")
|| ! strcmp (tname, "calloc")
|| ! strcmp (tname, "realloc")
|| ! strcmp (tname, "__builtin_new")
|| ! strcmp (tname, "__builtin_vec_new"))
/* Note use of NAME rather than TNAME here. These functions
are only reserved when preceded with __. */
|| ! strcmp (name, "__vn") /* mangled __builtin_vec_new */
|| ! strcmp (name, "__nw") /* mangled __builtin_new */
|| ! strcmp (name, "__builtin_new")
|| ! strcmp (name, "__builtin_vec_new"))
is_malloc = 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment