Re: Question about address resolving code (64bit)

"Stanislav" <[email protected]> Sat, 11 May 2019 12:15:35 +0300
Newsgroups gmane.comp.emulators.bochs.devel
Message-ID <[email protected]>
This is a multipart message in MIME format.

--===============6165353972732929298==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0020_01D507F3.4B4F1920"
Content-Language: en-il

This is a multipart message in MIME format.

------=_NextPart_000_0020_01D507F3.4B4F1920
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

cpu.h:#  define BX_CPU_RESOLVE_ADDR(i) \

cpu.h:            ((i)->as64L() ? BxResolve64(i) : BxResolve32(i))

=20

Did it answer you ?

=20

Stanislav

=20

From: Ignat G. <[email protected]>=20
Sent: Thursday, 25 April 2019 10:02
To: [email protected]
Subject: [Bochs-developers] Question about address resolving code =
(64bit)

=20

Hello everyone,

=20

I'm working on a project which involves X86 emulation, and it's going =
great so far (Bochs is a really good source to learn from).

I've been studying parts of the code but there's a thing that doesn't =
make sense to me.

In BxResolve64 (cpu/cpu.h), why doesn't it do "& i->asize_mask()" like =
BxResolve32 does?

Surely you'd still need to cut off high bytes depending on the =
address-size prefix, right?

=20

Thank you.


------=_NextPart_000_0020_01D507F3.4B4F1920
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta =
http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta =
name=3DGenerator content=3D"Microsoft Word 15 (filtered =
medium)"><style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman",serif;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:#1F497D;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]--></head><body lang=3DEN-US =
link=3D"#0563C1" vlink=3D"#954F72"><div class=3DWordSection1><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>cpu.h:#=C2=A0 define BX_CPU_RESOLVE_ADDR(i) \<o:p></o:p></span></p><p =
class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>cpu.h:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
 ((i)-&gt;as64L() ? BxResolve64(i) : =
BxResolve32(i))<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Did it answer you ?<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
>Stanislav<o:p></o:p></span></p><p class=3DMsoNormal><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'=
><o:p>&nbsp;</o:p></span></p><p class=3DMsoNormal><b><span =
style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span><=
/b><span style=3D'font-size:11.0pt;font-family:"Calibri",sans-serif'> =
Ignat G. &lt;[email protected]&gt; <br><b>Sent:</b> Thursday, =
25 April 2019 10:02<br><b>To:</b> =
[email protected]<br><b>Subject:</b> =
[Bochs-developers] Question about address resolving code =
(64bit)<o:p></o:p></span></p><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p><div><div><div><p =
class=3DMsoNormal>Hello everyone,<o:p></o:p></p><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>I'm working on a project which involves X86 emulation, =
and it's going great so far (Bochs is a really good source to learn =
from).<o:p></o:p></p></div><div><p class=3DMsoNormal>I've been studying =
parts of the code but there's a thing that doesn't make sense to =
me.<o:p></o:p></p></div><div><p class=3DMsoNormal>In BxResolve64 =
(cpu/cpu.h), why doesn't it do &quot;&amp; i-&gt;asize_mask()&quot; like =
BxResolve32 does?<o:p></o:p></p></div><div><p class=3DMsoNormal>Surely =
you'd still need to cut off high bytes depending on the address-size =
prefix, right?<o:p></o:p></p></div><div><p =
class=3DMsoNormal><o:p>&nbsp;</o:p></p></div><div><p =
class=3DMsoNormal>Thank =
you.<o:p></o:p></p></div></div></div></div></div></body></html>
------=_NextPart_000_0020_01D507F3.4B4F1920--



--===============6165353972732929298==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============6165353972732929298==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
bochs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bochs-developers

--===============6165353972732929298==--