[M3devel] completing M3CG_Binary.Op?

Jay K jay.krell at cornell.edu
Wed Oct 10 06:08:52 CEST 2012


M3CG_Binary.Op currently representswhat we write to ".mc" files for the gccbackend to read in. This is very very closeto what you'd want to fully represent M3CG.T.

It missing an operation that takes a function pointer -- can'tbe stored in a file. It is missing operations that get convertedto different operations by M3CG_Wr. There is no realvalue in the transform but it doesn't hurt either.

I'd like to add the missing operations.It seems like a very sensible reasonable change to me.


===================================================================RCS file: /usr/cvs/cm3/m3-sys/m3middle/src/M3CG_BinRd.m3,vretrieving revision 1.19diff -u -r1.19 M3CG_BinRd.m3--- M3CG_BinRd.m3	4 Sep 2012 14:29:54 -0000	1.19+++ M3CG_BinRd.m3	10 Oct 2012 04:04:19 -0000@@ -37,7 +37,7 @@   END;  CONST-  CmdMap = ARRAY Bop OF Cmd {+  CmdMap = ARRAY [Bop.begin_unit..Bop.fetch_and_xor] OF Cmd {     Cmd {Bop.begin_unit, begin_unit},     Cmd {Bop.end_unit, end_unit},     Cmd {Bop.import_unit, import_unit},Index: M3CG_Binary.i3===================================================================RCS file: /usr/cvs/cm3/m3-sys/m3middle/src/M3CG_Binary.i3,vretrieving revision 1.6diff -u -r1.6 M3CG_Binary.i3--- M3CG_Binary.i3	1 Nov 2010 09:59:44 -0000	1.6+++ M3CG_Binary.i3	10 Oct 2012 04:04:19 -0000@@ -38,7 +38,17 @@     call_indirect, pop_param, pop_struct, pop_static_link,     load_procedure, load_static_link, comment,     store_ordered, load_ordered, exchange, compare_exchange, fence,-    fetch_and_add, fetch_and_sub, fetch_and_or, fetch_and_and, fetch_and_xor+    fetch_and_add, fetch_and_sub, fetch_and_or, fetch_and_and, fetch_and_xor,++    (* These only occur in memory, not in files.+       Conversely, what they are converted to only occur in files,+       not in memory. *)+    set_error_handler,  (* disk: contains a pointer, silently skipped *)+    compare             (* converted to eq/ne/etc. *)+    cvt_int,            (* converted to trunc/ceiling/etc. *)+    fetch_and_op,       (* converted to fetch_and_add/fetch_and_sub/etc. *)+    if_compare,         (* converted to if_eq/if_ne/etc. *)+    set_compare,        (* converted to set_eq/set_ne/etc. *)   };

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20121010/d9685e05/attachment-0001.html>


More information about the M3devel mailing list