Re: bochs on sparc/solaris
Robin KAY <[email protected]>
| Newsgroups | gmane.comp.emulators.bochs.devel |
|---|---|
| Message-ID | <1356958873.16256.140661171855117.1C4E2023@webmail.messagingengine.com> |
On Thu, Dec 27, 2012, at 03:33 PM, Stanislav wrote:
[snip]
> I see that the ReadHostWordFromLittleEndian trying to read a word from
> non-aligned address.
[snip]
I had a similar problem some years ago when trying to recompile the
Bochs BIOS on a SPARC machine. I compiled the necessary assembler, but
it would crash when running because it accessed memory in an unaligned
fashion. As a quick and dirty workaround for this kind of problem, you
can always place the following code (gcc syntax) at the top of main().
asm("ta 6");
This will tell the Solaris kernel to implement unaligned memory accesses
inside the trap handler, rather than signal a fault, for the remainder
of the execution of the process. There is a performance penalty for
doing this, however, and so it's always better to avoid the unaligned
accesses in the first place.
Regards,
--
Robin KAY
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412