From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 3 Jan 2011 12:00:48 -0500 To: fernanbolando@mailc.net, 9fans@9fans.net Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] pcc/8c dies compiling simh code Topicbox-Message-UUID: 905d1fc8-ead6-11e9-9d60-3106f5b1d025 On Mon Jan 3 11:12:58 EST 2011, fernanbolando@mailc.net wrote: > hi all > > can anyone else confirm that the attached file effectively kills 8c? > it dies on 9vx and virtualbox, will test it on real hardware tomorrow. > > cpp -D__STDC__=1 -N -I. -D_PLAN9 -D_POSIX_SOURCE -D_BSD_EXTENSION > -D_C99_SNPRINTF_EXTENSION -DVM_PDP10 -IPDP10 -IPDP11 > -I/386/include/ape -I/sys/include/ape PDP10/pdp10_ksio.c | 8c -o > pdp10_ksio.8 you're just running the compiler out of registers, and unfortunately the compiler just aborted there without flushing diagnostics. fix: ladd; diffy -c /sys/src/cmd/8c/txt.c /n/dump/2011/0103/sys/src/cmd/8c/txt.c:305,312 - /sys/src/cmd/8c/txt.c:305,311 for(i=D_AX; i<=D_DI; i++) if(reg[i] == 0) goto out; - diag(tn, "out of fixed registers"); - abort(); + fatal(tn, "out of fixed registers"); goto err; case TFLOAT: you really would do well to run 8c with the flags -FVTw. (and i think that we could enable these by default, as they're only warnings and won't break anything.) the truncated integer constants spell real trouble! 8c -FVTw tmp.c warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:145[tmp.c:2957] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:145[tmp.c:2957] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:146[tmp.c:2958] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:146[tmp.c:2958] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:147[tmp.c:2959] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:147[tmp.c:2959] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:148[tmp.c:2960] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:148[tmp.c:2960] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:149[tmp.c:2961] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:149[tmp.c:2961] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:150[tmp.c:2962] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:150[tmp.c:2962] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:151[tmp.c:2963] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:151[tmp.c:2963] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:168[tmp.c:2980] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:168[tmp.c:2980] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:168[tmp.c:2980] address of array/func ignored warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:412[tmp.c:3206] truncated constant: INT 0200000000000 warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:412[tmp.c:3206] truncated constant: INT 0400000000000 warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:412[tmp.c:3206] no return at end of function: .ret warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:429[tmp.c:3223] truncated constant: INT 0200000000000 warning: /tmp/simh-p9/PDP10/pdp10_ksio.c:429[tmp.c:3223] truncated constant: INT 0400000000000 out of fixed registers - erik