* [commit] Extracting insn fields
@ 2005-02-16 22:12 Dave Brolley
0 siblings, 0 replies; only message in thread
From: Dave Brolley @ 2005-02-16 22:12 UTC (permalink / raw)
To: cgen, sid
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
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
[-- Attachment #2: cgen.ChangeLog --]
[-- Type: text/plain, Size: 229 bytes --]
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.
[-- Attachment #3: cgen.patch.txt --]
[-- Type: text/plain, Size: 3665 bytes --]
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.
"
"\
"))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-02-16 22:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-16 22:12 [commit] Extracting insn fields Dave Brolley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).