This is the mail archive of the
cgen@sources.redhat.com
mailing list for the CGEN project.
[commit] Extracting insn fields
- From: Dave Brolley <brolley at redhat dot com>
- To: cgen at sources dot redhat dot com, sid at sources dot redhat dot com
- Date: Wed, 16 Feb 2005 17:12:48 -0500
- Subject: [commit] Extracting insn fields
Hi,
I've committed the attached patches.
o The change to sid.scm allows for the reading of the final 24 bits of
an insn beyond the base. This happened with an internal port which has a
32 bit base and has some 56 bit insns.
o The change to utils-gen.scm corrects a problem for ports with insns of
length less than the base. -gen-ifld-extract uses its second argument
to generate
the 'total' argument to EXTRACT_{LM}SBO_[U]INT which expects it to be
the width of the base insn word. Using (min base-length total-length) is
not correct in this situation. base-length seems to be the correct value.
o The change to utils.scm is simply to update the generated copyright years.
Dave
2005-02-16 Dave Brolley <brolley@redhat.com>
* utils.scm: Update copyright years.
* utils-gen.scm (gen-ifld-extract): Pass base-length to -gen-ifld-extract-base.
* sid.scm (gen-ifetch): Handle the case where bitsize == 24.
Index: cgen/sid.scm
===================================================================
RCS file: /cvs/src/src/cgen/sid.scm,v
retrieving revision 1.12
diff -c -p -r1.12 sid.scm
*** cgen/sid.scm 22 Mar 2004 20:44:16 -0000 1.12
--- cgen/sid.scm 16 Feb 2005 21:48:56 -0000
***************
*** 1,5 ****
; Simulator generator support routines.
! ; Copyright (C) 2000-2004 Red Hat, Inc.
; This file is part of CGEN.
; One goal of this file is to provide cover functions for all methods.
--- 1,5 ----
; Simulator generator support routines.
! ; Copyright (C) 2000-2005 Red Hat, Inc.
; This file is part of CGEN.
; One goal of this file is to provide cover functions for all methods.
***************
*** 191,196 ****
--- 191,197 ----
(case bitsize
((8) "UQI")
((16) "UHI")
+ ((24) "USI")
((32) "USI")
(else (error "bad bitsize argument to gen-ifetch" bitsize)))
" (pc, "
Index: cgen/utils-gen.scm
===================================================================
RCS file: /cvs/src/src/cgen/utils-gen.scm,v
retrieving revision 1.11
diff -c -p -r1.11 utils-gen.scm
*** cgen/utils-gen.scm 15 Feb 2005 12:52:00 -0000 1.11
--- cgen/utils-gen.scm 16 Feb 2005 21:48:56 -0000
***************
*** 1,5 ****
; Application independent utilities for C/C++ code generation.
! ; Copyright (C) 2000, 2001 Red Hat, Inc.
; This file is part of CGEN.
; See file COPYING.CGEN for details.
--- 1,5 ----
; Application independent utilities for C/C++ code generation.
! ; Copyright (C) 2000, 2001, 2005 Red Hat, Inc.
; This file is part of CGEN.
; See file COPYING.CGEN for details.
***************
*** 241,248 ****
(-gen-ifld-extract-base f total-length base-value)
(if (ifld-beyond-base? f base-length total-length)
(-gen-ifld-extract-beyond f base-length total-length var-list)
! (-gen-ifld-extract-base f (min base-length total-length)
! base-value)))
";"
(if macro? " \\\n" "\n")
)
--- 241,247 ----
(-gen-ifld-extract-base f total-length base-value)
(if (ifld-beyond-base? f base-length total-length)
(-gen-ifld-extract-beyond f base-length total-length var-list)
! (-gen-ifld-extract-base f base-length base-value)))
";"
(if macro? " \\\n" "\n")
)
Index: cgen/utils.scm
===================================================================
RCS file: /cvs/src/src/cgen/utils.scm,v
retrieving revision 1.15
diff -c -p -r1.15 utils.scm
*** cgen/utils.scm 27 Jan 2005 20:31:12 -0000 1.15
--- cgen/utils.scm 16 Feb 2005 21:48:56 -0000
***************
*** 1,5 ****
; Generic Utilities.
! ; Copyright (C) 2000-2004 Red Hat, Inc.
; This file is part of CGEN.
; See file COPYING.CGEN for details.
--- 1,5 ----
; Generic Utilities.
! ; Copyright (C) 2000-2005 Red Hat, Inc.
; This file is part of CGEN.
; See file COPYING.CGEN for details.
***************
*** 1251,1257 ****
(cons "\
THIS FILE IS MACHINE GENERATED WITH CGEN.
! Copyright 1996-2004 Free Software Foundation, Inc.
"
"\
This program is free software; you can redistribute it and/or modify
--- 1251,1257 ----
(cons "\
THIS FILE IS MACHINE GENERATED WITH CGEN.
! Copyright 1996-2005 Free Software Foundation, Inc.
"
"\
This program is free software; you can redistribute it and/or modify
*************** with this program; if not, write to the
*** 1276,1282 ****
(cons "\
THIS FILE IS MACHINE GENERATED WITH CGEN.
! Copyright (C) 2000-2004 Red Hat, Inc.
"
"\
"))
--- 1276,1282 ----
(cons "\
THIS FILE IS MACHINE GENERATED WITH CGEN.
! Copyright (C) 2000-2005 Red Hat, Inc.
"
"\
"))