CPU disassembler-memory accessor
Frank Ch. Eigler
fche@redhat.com
Fri May 31 13:39:00 GMT 2002
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/sid/attachments/20020531/1460f02e/attachment.sig>
More information about the Sid
mailing list