[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Mon Dec 15 16:41:46 CET 2008


CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	08/12/15 16:41:46

Modified files:
	cm3/m3-sys/m3cc/gcc/gcc/m3cg/: parse.c 

Log message:
	Declare the globals (er, module variables) to be (overall)
	2 * max_alignment instead of merely max_alignment.
	This works around a problem where gcc assumes the module variables (overall,
	for a single module) fit in registers, and the offset is lost loading them,
	leading to many/most/all module variable loads to go awry, catastrophic
	on MIPS64. Many platforms work because their maxalign is already large.
	This is not clearly the best fix, but it sure is small.
	
	MIPS64_OPENBSD gets as far as:
	
	$ gdb cm3
	(gdb) r
	Starting program: /home/jay/cm3/bin/cm3
	--- building in MIPS64_OPENBSD ---
	
	missing version stamps -> compiling RTHooks.i3
	
	Program received signal SIGFPE, Arithmetic exception.
	0x00000000104f7be0 in Utils__M3Time (M3_CtKayy_t=0) at ..\src\Utils.m3:320
	320     ..\src\Utils.m3: No such file or directory.
	in ..\src\Utils.m3
	(gdb) bt
	#0  0x00000000104f7be0 in Utils__M3Time (M3_CtKayy_t=0) at ..\src\Utils.m3:320
	#1  0x00000000104f7a1c in Utils__NoteNewFile (M3_Bd56fi_file=0x570673e0)
	at ..\src\Utils.m3:307
	#2  0x00000000100b2eb4 in Builder__PushOneM3 (M3_Bd9FNt_s=0x55604830,
	M3_AXLf8B_u=0x106735f0) at ..\src\Builder.m3:1217
	#3  0x00000000100b258c in Builder__CompileM3 (M3_Bd9FNt_s=0x517dd818,
	M3_AXLf8B_u=0x57077c40) at ..\src\Builder.m3:1149
	#4  0x00000000100b0594 in Builder__CompileOne (M3_Bd9FNt_s=0x1,
	M3_AXLf8B_u=0x57077558) at ..\src\Builder.m3:984
	#5  0x00000000100b005c in Builder__CompileEverything (M3_Bd9FNt_s=0x0,
	M3_Cw4bpV_schedule=0x0) at ..\src\Builder.m3:944
	#6  0x00000000100a9bd8 in Builder__CompileUnits (M3_Bd56fi_main=0x570671b0,
	M3_EEuw3X_units=0x57067188, M3_C1FTrk_sys_libs=0x5179d2d8,
	M3_A2QN6Z_info_kind=0 '\0', M3_An02H2_mach=0x555fec40)
	at ..\src\Builder.m3:325
	
	though all the seemingly related code runs several times successfully.
	Now(), FromUtime(), M3Time(), stat, etc.
	Perhaps some floats are getting corrupt on the stack.




More information about the M3commit mailing list