<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Index: m3-sys/m3front/src/misc/Marker.m3<br>===================================================================<br>RCS file: /usr/cvs/cm3/m3-sys/m3front/src/misc/Marker.m3,v<br>retrieving revision 1.8<br>diff -u -r1.8 Marker.m3<br>--- m3-sys/m3front/src/misc/Marker.m3 6 Jan 2011 20:40:16 -0000 1.8<br>+++ m3-sys/m3front/src/misc/Marker.m3 13 Jan 2011 14:56:53 -0000<br>@@ -248,7 +248,7 @@<br> END;<br> (* void* _alloca(size_t); *)<br> IF (alloca = NIL) THEN<br>- alloca := CG.Import_procedure (M3ID.Add ("_alloca"), 1, CG.Type.Addr,<br>+ alloca := CG.Import_procedure (M3ID.Add ("m3_alloca"), 1, CG.Type.Addr,<br> Target.DefaultCall, new);<br> IF (new) THEN<br> EVAL CG.Declare_param (M3ID.NoID, Target.Word.size, Target.Word.align,<br>Index: m3-sys/m3cc/gcc/gcc/m3cg/parse.c<br>===================================================================<br>RCS file: /usr/cvs/cm3/m3-sys/m3cc/gcc/gcc/m3cg/parse.c,v<br>retrieving revision 1.477<br>diff -u -r1.477 parse.c<br>--- m3-sys/m3cc/gcc/gcc/m3cg/parse.c 5 Jan 2011 14:34:53 -0000 1.477<br>+++ m3-sys/m3cc/gcc/gcc/m3cg/parse.c 13 Jan 2011 14:56:53 -0000<br>@@ -473,6 +473,8 @@<br> #define t_void void_type_node<br> static GTY (()) tree t_set;<br> <br>+static tree m3_alloca;<br>+<br> static const struct { UINT32 type_id; tree* t; } builtin_uids[] = {<br> { UID_INTEGER, &t_int },<br> { UID_LONGINT, &t_longint },<br>@@ -1750,6 +1752,7 @@<br> bits_per_integer_tree = build_int_cst (t_word, BITS_PER_INTEGER);<br> bytes_per_integer_tree = build_int_cst (t_word, BITS_PER_INTEGER / BITS_PER_UNIT);<br> tree stdcall = get_identifier_with_length (CONSTANT_STRING_AND_LENGTH ("stdcall"));<br>+ m3_alloca = get_identifier_with_length (CONSTANT_STRING_AND_LENGTH ("m3_alloca"));<br> stdcall_list = build_tree_list (stdcall, NULL);<br> t_set = m3_build_pointer_type (t_word);<br> <br>@@ -2979,22 +2982,9 @@<br> tree *slot = (tree *)htab_find_slot (builtins, p, NO_INSERT);<br> <br> if (slot)<br>- {<br> p = *slot;<br>- }<br>- else<br>- {<br>- const char *name = IDENTIFIER_POINTER (DECL_NAME (p));<br>- if (name[0] == 'a' || name[0] == '_')<br>- {<br>- if (strcmp(name, "alloca") == 0<br>- || strcmp(name, "_alloca") == 0<br>- || strcmp(name, "__builtin_alloca") == 0)<br>- {<br>- p = built_in_decls[BUILT_IN_ALLOCA];<br>- }<br>- }<br>- }<br>+ else if (DECL_NAME (p) == m3_alloca)<br>+ p = built_in_decls[BUILT_IN_ALLOCA];<br> return p;<br> }<br> <br> - Jay<br><br><br>> Date: Thu, 13 Jan 2011 15:58:29 +0000<br>> To: m3commit@elegosoft.com<br>> From: jkrell@elego.de<br>> Subject: [M3commit] CVS Update: cm3<br>> <br>> CVSROOT: /usr/cvs<br>> Changes by: jkrell@birch. 11/01/13 15:58:29<br>> <br>> Modified files:<br>> cm3/m3-sys/m3front/src/misc/: Marker.m3 <br>> cm3/m3-sys/m3cc/gcc/gcc/m3cg/: parse.c <br>> <br>> Log message:<br>> __builtin_alloca didn't work w/o translation<br>> among alloca, _alloca, __builtin_alloca, make up our own name, m3_alloca<br>> and do the comparison by pointer equality (since gcc uses<br>> string interning)<br>> I'd also go for _m3_alloca, __m3_alloca, or alloca, or darn near<br>> anything else.<br>> <br> </body>
</html>