From: Tom Musta <tommusta@gmail.com>
To: Alexander Graf <agraf@suse.de>
Cc: PowerPC <qemu-ppc@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 7/8] target-ppc: Add Load Quadword and Reserve
Date: Mon, 27 Jan 2014 14:01:10 -0600 [thread overview]
Message-ID: <52E6BB06.8020304@gmail.com> (raw)
In-Reply-To: <9FC7D786-5323-4051-8100-321EE9A492F0@suse.de>
On 1/27/2014 12:59 PM, Alexander Graf wrote:
>
> On 27.01.2014, at 18:54, Tom Musta <tommusta@gmail.com> wrote:
>
>> This patch adds the Load Quadword and Reserve (lqarx) instruction,
>> which is new in Power ISA 2.07.
>>
>> Signed-off-by: Tom Musta <tommusta@gmail.com>
>> ---
>> target-ppc/translate.c | 34 ++++++++++++++++++++++++++++++++++
>> 1 files changed, 34 insertions(+), 0 deletions(-)
>>
>> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
>> index bb1dc82..589cee9 100644
>> --- a/target-ppc/translate.c
>> +++ b/target-ppc/translate.c
>> @@ -3361,6 +3361,39 @@ STCX(stwcx_, 4);
>> /* ldarx */
>> LARX(ldarx, 8, ld64);
>>
>> +/* lqarx */
>> +static void gen_lqarx(DisasContext *ctx)
>> +{
>> + TCGv EA;
>> + int rd = rD(ctx->opcode);
>> + TCGv gpr1, gpr2;
>> +
>> + if (unlikely((rd & 1) || (rd == rA(ctx->opcode)) ||
>> + (rd == rB(ctx->opcode)))) {
>> + gen_inval_exception(ctx, POWERPC_EXCP_INVAL_INVAL);
>> + return;
>> + }
>> +
>> + gen_set_access_type(ctx, ACCESS_RES);
>> + EA = tcg_temp_local_new();
>> + gen_addr_reg_index(ctx, EA);
>> + gen_check_align(ctx, EA, 15);
>> + if (unlikely(ctx->le_mode)) {
>> + gpr1 = cpu_gpr[rd+1];
>> + gpr2 = cpu_gpr[rd];
>> + } else {
>> + gpr1 = cpu_gpr[rd];
>> + gpr2 = cpu_gpr[rd+1];
>> + }
>> + gen_qemu_ld64(ctx, gpr1, EA);
>> + tcg_gen_mov_tl(cpu_reserve, EA);
>> + tcg_gen_st_tl(gpr1, cpu_env, offsetof(CPUPPCState, reserve_val));
>
> I suppose it's ok to only store the first 64bits as reserved?
>
>
> Alex
>
Thank you, Alex. It looks like there is some interesting code in linux-user/main.c that is impacted by lqarx/stqcx.
next prev parent reply other threads:[~2014-01-27 20:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 17:54 [Qemu-devel] [PATCH 0/8] target-ppc: Base ISA V2.07 for Power8 Tom Musta
2014-01-27 17:54 ` [Qemu-devel] [PATCH 1/8] target-ppc: Add Flag for bctar Tom Musta
2014-01-27 17:54 ` [Qemu-devel] [PATCH 2/8] target-ppc: Add Target Address SPR (TAR) to Power8 Tom Musta
2014-01-27 17:54 ` [Qemu-devel] [PATCH 3/8] target-ppc: Add bctar Instruction Tom Musta
2014-01-27 18:46 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-01-27 19:34 ` Tom Musta
2014-01-27 21:44 ` Alexander Graf
2014-01-27 17:54 ` [Qemu-devel] [PATCH 4/8] target-ppc: Add Flag for ISA 2.07 Load/Store Quadword Instructions Tom Musta
2014-01-27 17:54 ` [Qemu-devel] [PATCH 5/8] target-ppc: Load Quadword Tom Musta
2014-01-27 18:55 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-01-27 19:53 ` Tom Musta
2014-01-27 21:43 ` Alexander Graf
2014-01-27 17:54 ` [Qemu-devel] [PATCH 6/8] target-ppc: Store Quadword Tom Musta
2014-01-27 17:54 ` [Qemu-devel] [PATCH 7/8] target-ppc: Add Load Quadword and Reserve Tom Musta
2014-01-27 18:59 ` [Qemu-devel] [Qemu-ppc] " Alexander Graf
2014-01-27 20:01 ` Tom Musta [this message]
2014-01-27 17:54 ` [Qemu-devel] [PATCH 8/8] target-ppc: Add Store Quadword Conditional Tom Musta
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=52E6BB06.8020304@gmail.com \
--to=tommusta@gmail.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).