* [Qemu-devel] What do these instructions do??
@ 2012-04-05 20:14 Davide
2012-04-05 22:06 ` Max Filippov
0 siblings, 1 reply; 2+ messages in thread
From: Davide @ 2012-04-05 20:14 UTC (permalink / raw)
To: qemu-devel
In target-i386/translate.c there are this instructions:
int op, f, val;
op = (b >> 3) & 7;
f = (b >> 1) & 3;
if ((b & 1) == 0)
ot = OT_BYTE;
else
ot = dflag + OT_WORD;
What does this code do??
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] What do these instructions do??
2012-04-05 20:14 [Qemu-devel] What do these instructions do?? Davide
@ 2012-04-05 22:06 ` Max Filippov
0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2012-04-05 22:06 UTC (permalink / raw)
To: Davide; +Cc: qemu-devel
> In target-i386/translate.c there are this instructions:
> int op, f, val;
> op = (b >> 3) & 7;
> f = (b >> 1) & 3;
> if ((b & 1) == 0)
> ot = OT_BYTE;
> else
> ot = dflag + OT_WORD;
> What does this code do??
It extracts some useful subfields from one-byte opcodes, e.g. op is
the arithmetic
operation code, f is operand encoding and ot is operand width.
Table A2 in the Intel® 64 and IA-32 Architectures Developer's Manual: Vol. 2B
http://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-2b-manual.html
will probably help.
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-05 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 20:14 [Qemu-devel] What do these instructions do?? Davide
2012-04-05 22:06 ` Max Filippov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.