From: Doug Evans <dje@transmeta.com>
To: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Cc: cgen@sources.redhat.com
Subject: [RFA:] Fix lsb? bug with insn fields beyond base insn size.
Date: Fri, 21 Jun 2002 12:13:00 -0000 [thread overview]
Message-ID: <15635.31439.589711.692123@casey.transmeta.com> (raw)
In-Reply-To: <200206190111.DAA19613@ignucius.axis.se>
Not something of your making, but one thing that can be cleaned
up in -gen-extract-word is it's use of current-arch-insn-lsb0?.
Either it should use the lsb0? argument, or the lsb0? argument
should be removed. I don't have a strong preference which.
[grep for >>>]
(define (-gen-extract-word word-name word-start word-length start length
unsigned? lsb0?)
; ??? lsb0?
(let ((word-end (+ word-start word-length))
(end (+ start length))
(base (if (< start word-start) word-start start)))
(string-append "("
"EXTRACT_"
>>>>>>> (if (current-arch-insn-lsb0?) "LSB0" "MSB0")
(if (and (not unsigned?)
; Only want sign extension for word with sign bit.
(bitrange-overlap? start 1 word-start word-length
lsb0?))
"_INT ("
"_UINT (")
word-name
", "
(number->string word-length)
", "
(number->string (if (< start word-start)
0
(- start word-start)))
", "
(number->string (if (< end word-end)
(- end base)
(- word-end base)))
") << "
(number->string (if (> end word-end)
(- end word-end)
0))
")"))
)
next prev parent reply other threads:[~2002-06-21 19:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-18 18:11 Hans-Peter Nilsson
2002-06-19 11:05 ` Doug Evans
2002-06-24 8:24 ` Hans-Peter Nilsson
2002-06-21 11:59 ` Doug Evans
2002-06-24 7:59 ` Hans-Peter Nilsson
2002-06-21 12:13 ` Doug Evans [this message]
2002-06-24 8:00 ` Hans-Peter Nilsson
2002-06-21 13:54 ` Doug Evans
2002-06-24 8:11 ` Hans-Peter Nilsson
2002-06-24 8:18 ` Doug Evans
2002-06-24 9:05 ` Hans-Peter Nilsson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15635.31439.589711.692123@casey.transmeta.com \
--to=dje@transmeta.com \
--cc=cgen@sources.redhat.com \
--cc=hans-peter.nilsson@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).