qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Rafael Kioji <rafaelkioji@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Difference between tcg_gen_ld_i64 and tcg_gen_qemu_ld_i64.
Date: Sun, 29 Apr 2018 18:15:18 +0800	[thread overview]
Message-ID: <7366cfc5-e37f-483d-917b-2aae41d1e59e@gmail.com> (raw)

Dear all,

What is the difference between these two functions? They are located in 
the file "tcg/tcg-op.c". Here is their header:

 1. static inline void tcg_gen_ld_i64(TCGv_i64 ret, TCGv_ptr arg2,
    tcg_target_long offset)
 2. void tcg_gen_qemu_ld_i64(TCGv_i64 val, TCGv addr, TCGArg idx,
    TCGMemOp memop)

I don't quite understand the need for function (1). Especially because 
it is usually passed "cpu_env" for arg2. Like in 
target/arm/translate-a64.c:595:

> /* Convenience accessors for reading and writing single and double
>  * FP registers. Writing clears the upper parts of the associated
>  * 128 bit vector register, as required by the architecture.
>  * Note that unlike the GP register accessors, the values returned
>  * by the read functions must be manually freed.
>  */
> static TCGv_i64 read_fp_dreg(DisasContext *s, int reg)
> {
>     TCGv_i64 v = tcg_temp_new_i64();
>
>     tcg_gen_ld_i64(v, cpu_env, fp_reg_offset(s, reg, MO_64));
>     return v;
> }


Thanks!

  
--
Att.,
Rafael

             reply	other threads:[~2018-04-29 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-29 10:15 Rafael Kioji [this message]
2018-04-29 11:18 ` [Qemu-devel] Difference between tcg_gen_ld_i64 and tcg_gen_qemu_ld_i64 Bastian Koppelmann

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=7366cfc5-e37f-483d-917b-2aae41d1e59e@gmail.com \
    --to=rafaelkioji@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).