qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chris Metcalf <cmetcalf@ezchip.com>
To: Chen Gang S <gang.chen@sunrus.com.cn>,
	Richard Henderson <rth@twiddle.net>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Riku Voipio <riku.voipio@iki.fi>,
	qemu-devel <qemu-devel@nongnu.org>,
	"walt@tilera.com" <walt@tilera.com>
Subject: Re: [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully
Date: Thu, 26 Feb 2015 22:01:48 -0500	[thread overview]
Message-ID: <54EFDE1C.4080507@ezchip.com> (raw)
In-Reply-To: <54EE7A6D.6000704@sunrus.com.cn>

On 2/25/2015 8:44 PM, Chen Gang S wrote:
> On 02/26/2015 01:19 AM, Richard Henderson wrote:
>> On 02/24/2015 05:40 PM, Chen Gang S wrote:
>>>>> +static int gen_shl16insli(struct DisasContext *dc,
>>>>> +                          unsigned char rdst, unsigned char rsrc, short im16)
>>>> Use uint16_t, as the field is not signed.
>>>>
>>> objdump print it as signed, e.g. "shl16insli r32, r32, -30680"
>> I think you've just found a bug in objdump.  ;-)
>>
> According to the ISA document, I guess, it assumes imm16 is unsigned
> number (although ISA document does not mention about it, directly). But
> for tcg_gen_ori_i64, it assumes imm16 is signed number:
>
>    void tcg_gen_ori_i64(TCGv_i64 ret, TCGv_i64 arg1, int64_t arg2);
>
> So for me, I am not sure that objdump must be a bug. For safety reason,
> I still prefer to treat imm16 as signed number.

You have to consider the immediate value as having the high 48 bits zero
when you "or" it into the result, so it's hard to consider it as signed in
any meaningful way.  Richard is right.

> Y1 can issue branches, which can be buffered. And Y1 also can issue call
> (which will store pc to sp stack) -- e.g. jalr, jalrp.

Richard already covered this, but yes, jal/jalr etc are not memory ops.
There is only one memory op possible per bundle.

-- 
Chris Metcalf, EZChip Semiconductor
http://www.ezchip.com

  parent reply	other threads:[~2015-02-27  3:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-24  7:53 [Qemu-devel] [PATCH] target-tilegx: Execute _start and reach to __libc_start_main successfully Chen Gang S
2015-02-24  8:07 ` Chen Gang S
2015-02-24 14:21 ` Chris Metcalf
2015-02-24 14:38   ` Peter Maydell
2015-02-24 15:39     ` Chen Gang S
2015-02-24 16:42       ` Richard Henderson
2015-02-24 17:08         ` Chen Gang S
2015-02-24 16:31   ` Chen Gang S
2015-02-24 16:46     ` Chris Metcalf
2015-02-24 17:25       ` Chen Gang S
2015-02-24 18:18         ` Chris Metcalf
2015-02-25  1:01           ` Chen Gang S
2015-02-24 17:55 ` Richard Henderson
2015-02-25  3:40   ` Chen Gang S
2015-02-25 17:19     ` Richard Henderson
2015-02-26  1:44       ` Chen Gang S
2015-02-26 16:31         ` Richard Henderson
2015-02-26 23:30           ` Chen Gang S
2015-02-27  3:01         ` Chris Metcalf [this message]
2015-02-27  3:41           ` Chen Gang S

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=54EFDE1C.4080507@ezchip.com \
    --to=cmetcalf@ezchip.com \
    --cc=gang.chen@sunrus.com.cn \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=rth@twiddle.net \
    --cc=walt@tilera.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).