From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: yuanzhu86 <yuanzhu86@163.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] where is the definition of this fuction?
Date: Mon, 9 Nov 2009 10:02:17 +0100 [thread overview]
Message-ID: <761ea48b0911090102q47d7ae59x8c041f40a4d1ac75@mail.gmail.com> (raw)
In-Reply-To: <30560797.365271257747059383.JavaMail.coremail@app199.163.com>
2009/11/9 yuanzhu86 <yuanzhu86@163.com>:
> Hi everyone:
> as I want to analysis the source code of qemu now, and there is a litte
> trouble at this fuction:
> in the file--Translate.c(target-i386)
>
> Line 6113 :
> case 0xea: /* ljmp im */
> {
> unsigned int selector, offset;
> if (CODE64(s))
> goto illegal_op;
> ot = dflag ? OT_LONG : OT_WORD;
> offset = insn_get(s, ot);
> selector = insn_get(s, OT_WORD);
> gen_op_movl_T0_im(selector);
> gen_op_movl_T1_imu(offset);
> }
> goto do_ljmp;
> ------------------------------------------------------
> do_ljmp:
> if (s->pe && !s->vm86) {
> if (s->cc_op != CC_OP_DYNAMIC)
> gen_op_set_cc_op(s->cc_op);
> gen_jmp_im(pc_start - s->cs_base);
> tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
> gen_helper_ljmp_protected(cpu_tmp2_i32, cpu_T[1],
> tcg_const_i32(s->pc - pc_start));
> } else {
> gen_op_movl_seg_T0_vm(R_CS);
> gen_op_movl_T0_T1();
> gen_op_jmp_T0();
> }
> gen_eob(s);
> break;
> ------------------------------------------------
> this fucion:
> gen_helper_ljmp_protected(cpu_tmp2_i32, cpu_T[1],
> tcg_const_i32(s->pc - pc_start));
> I guess it should use the fuction glue() to create,but I can not find where
> it is ,could someone tell me that if you konw !
> thanks very much !look forward to your answer !
Helper functions are built using macros.
This will find the definition:
grep -r ljmp_protected .
Laurent
prev parent reply other threads:[~2009-11-09 9:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 6:10 [Qemu-devel] where is the definition of this fuction? yuanzhu86
2009-11-09 9:02 ` Laurent Desnogues [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=761ea48b0911090102q47d7ae59x8c041f40a4d1ac75@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=yuanzhu86@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).