This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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:
msg00026/pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |