This is the mail archive of the
cgen@sourceware.org
mailing list for the CGEN project.
[RFA:] Fix breakage of manually building SID CPU
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: cgen at sourceware dot org
- Cc: bje at gcc dot gnu dot org
- Date: Mon, 23 Jan 2006 04:31:04 +0100
- Subject: [RFA:] Fix breakage of manually building SID CPU
See dev.scm. The recentlish (within the last years) enumeration
SID-SIMULATOR, split off from SIMULATOR, isn't handled in
dev.scm, causing the cload after load-sid to error. It means my
how-to-repeat description for the SID-generator-problem with
cris.cpu at <URL:http://sourceware.org/ml/cgen/2004-q4/msg00015.html>
broke with the SID-SIMULATOR introduction. I.e.:
(load "dev.scm")
(load-sid)
(cload #:arch "../../cpu/cris" #:options "with-scache" #:machs "crisv32")
(cgen-decode.cxx)
got, at the (cload ...):
Backtrace:
In dev.scm:
84: 0 [error "unknown application:" SID-SIMULATOR]
52: 1 (case APPLICATION ((UNKNOWN) (error "application not
loaded")) ...)
33: 2 (let (# # # #) (letrec # #) (case APPLICATION # # ...))
In standard input:
3: 3* [cload #:arch "../../cpu/cris" #:options "with-scache"
#:machs "crisv32"]
dev.scm:84:13: In procedure error in expression (error "unknown
application:" APPLICATION):
dev.scm:84:13: unknown application: SID-SIMULATOR
ABORT: (misc-error)
Which begs the question: how do people debug their new SID CPU
ports these days?
Maybe the fix is as simple as copying the SIMULATOR case?
A patch follows for that. It works for the guile sequence
above. With CGEN sources at the time of this writing, I no
longer get the error above or at the URL. I haven't checked
whether the generated code is correct, though.
Ok to commit?
cgen:
* dev.scm (cload) <SID-SIMULATOR>: New case, duplicated from
SIMULATOR.
Index: dev.scm
===================================================================
RCS file: /cvs/src/src/cgen/dev.scm,v
retrieving revision 1.9
diff -p -u -r1.9 dev.scm
--- dev.scm 15 Jun 2005 21:28:18 -0000 1.9
+++ dev.scm 23 Jan 2006 03:28:55 -0000
@@ -76,6 +76,11 @@
sim-init!
sim-finish!
sim-analyze!))
+ ((SID-SIMULATOR) (cpu-load (string-append "./cpu/" arch ".cpu")
+ keep-mach keep-isa options
+ sim-init!
+ sim-finish!
+ sim-analyze!))
((SIM-TEST) (cpu-load (string-append "./cpu/" arch ".cpu")
keep-mach keep-isa options
sim-test-init!
brgds, H-P