[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Wed Aug 15 07:32:14 CEST 2012


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	12/08/15 07:32:14

Modified files:
	cm3/m3-sys/m3back/src/: M3C.i3 M3C.m3 
	./: M3C.i3 M3C.m3 
	cm3/m3-sys/m3cgcat/src/: Main.m3 m3makefile 

Log message:
	finally some credable work in progress on C-generating backend
	it isn't yet useful but it does generate some correct C, but there is more to do.
	
	The current interface, while in development, is thus:
	m3cgcat has been extended.
	old usage, just:
	usage: ./AMD64_DARWIN/m3cgcat -ascii  < in.asc > out.bin
	./AMD64_DARWIN/m3cgcat -binary < in.bin > out.asc
	
	new usage, includes old and adds:
	./AMD64_DARWIN/m3cgcat -[in|out]-[binary|ascii|c] < in > out
	./AMD64_DARWIN/m3cgcat -[in|out]-[binary|ascii|c][:=file] < in > out
	example: ./AMD64_DARWIN/m3cgcat -in-binary -out-c < in.bin > out.c
	example: ./AMD64_DARWIN/m3cgcat -in-binary=in.bin -out-c:out.c
	
	The input binary is from cm3 -keep.
	It is the same input as to m3cc/cm3cg.
	
	Once this is all done, there will be a new "backend mode" (see m3middle/Target.m3)
	to trigger 1) call to M3C.New() instead of M3CG_BinWr.New(), and then
	invocation of C compiler. i.e. we won't write out the .mc files and run m3cgcat.
	
	Reading/writing files instead of stdin/stdout is particularly useful
	for use under gdb!




More information about the M3commit mailing list