From: "Frank Ch. Eigler" <fche@redhat.com>
To: Ben Elliston <bje@redhat.com>
Cc: sid@sources.redhat.com
Subject: Re: CPU disassembler-memory accessor
Date: Fri, 31 May 2002 13:39:00 -0000 [thread overview]
Message-ID: <20020531163954.C32174@redhat.com> (raw)
In-Reply-To: <15607.56973.58661.290693@tooth.toronto.redhat.com>; from bje@redhat.com on Fri, May 31, 2002 at 04:35:25PM -0400
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
Hi -
> Thanks for the feedback. How's this instead?
> [...]
Almost perfect:
> + inline bool
> + basic_cpu::read_disasm_memory (sid::host_int_4 address, sid::big_int_1& value) const
> + {
> + sid::bus* bus;
> + bus = (this->disassembler_bus) ? this->disassembler_bus : this->insn_bus;
> +
> + try
> + {
> + if (LIKELY (bus->read (address, value) == sid::bus::ok))
> + return true;
> + }
> + catch (cpu_memory_fault& f)
> + {
> + return false;
> + }
> }
This function is IMO still unnecessary. For one, sid::bus::read can never
throw an exception (it's declared throw()).
Why not just inline " ... bus->read (address, value) ... " into
cgen_read_memory?
- FChE
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
prev parent reply other threads:[~2002-05-31 20:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-29 7:46 Ben Elliston
2002-05-29 8:53 ` Frank Ch. Eigler
2002-05-31 13:35 ` Ben Elliston
2002-05-31 13:39 ` Frank Ch. Eigler [this message]
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=20020531163954.C32174@redhat.com \
--to=fche@redhat.com \
--cc=bje@redhat.com \
--cc=sid@sources.redhat.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).