linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sandipan Das <sandipan@linux.ibm.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: mpe@ellerman.id.au, paulus@samba.org,
	naveen.n.rao@linux.vnet.ibm.com, linuxppc-dev@lists.ozlabs.org,
	anton@samba.org, ravi.bangoria@linux.ibm.com
Subject: Re: [PATCH 1/6] powerpc sstep: Add maddhd, maddhdu, maddld instruction emulation
Date: Wed, 5 Sep 2018 17:00:49 +0530	[thread overview]
Message-ID: <99722a4e-fea8-7c74-2cb4-7d5efd2c54fa@linux.ibm.com> (raw)
In-Reply-To: <20180904221223.GR24439@gate.crashing.org>

Hi Segher,

On Wednesday 05 September 2018 03:42 AM, Segher Boessenkool wrote:
> On Mon, Sep 03, 2018 at 08:49:33PM +0530, Sandipan Das wrote:
>> +#ifdef __powerpc64__
>> +	case 4:
>> +		if (!cpu_has_feature(CPU_FTR_ARCH_300))
>> +			return -1;
>> +
>> +		switch (instr & 0x3f) {
>> +		case 48:	/* maddhd */
>> +			asm("maddhd %0,%1,%2,%3" : "=r" (op->val) :
>> +			    "r" (regs->gpr[ra]), "r" (regs->gpr[rb]),
>> +			    "r" (regs->gpr[rc]));
>> +			goto compute_done;
> 
> If running maddhd does not work, will running it in kernel mode work?
> 

Not sure what you meant here but one of the scenarios that I'm aware of
where this is will be used is if we place a probe at a location having
an maddhd instruction. The kernel would first attempt to emulate its
behaviour, which in this case is done by executing the same instruction
(similar to what is done for mulhd and mulhw) and if that fails, try to
execute the instruction natively.

- Sandipan

  reply	other threads:[~2018-09-05 11:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-03 15:19 [PATCH 0/6] powerpc sstep: Extend instruction emulation support Sandipan Das
2018-09-03 15:19 ` [PATCH 1/6] powerpc sstep: Add maddhd, maddhdu, maddld instruction emulation Sandipan Das
2018-09-04 22:12   ` Segher Boessenkool
2018-09-05 11:30     ` Sandipan Das [this message]
2019-02-20  0:51   ` Michael Ellerman
2018-09-03 15:19 ` [PATCH 2/6] powerpc sstep: Add darn " Sandipan Das
2019-02-20  0:50   ` Michael Ellerman
2019-02-20  9:49     ` Sandipan Das
2018-09-03 15:19 ` [PATCH 3/6] powerpc sstep: Add cnttzw, cnttzd " Sandipan Das
2018-09-04 21:12   ` Segher Boessenkool
2018-09-05  6:36     ` Paul Mackerras
2018-09-03 15:19 ` [PATCH 4/6] powerpc sstep: Add extswsli " Sandipan Das
2018-09-03 15:19 ` [PATCH 5/6] powerpc sstep: Add modsw, moduw " Sandipan Das
2018-09-03 15:19 ` [PATCH 6/6] powerpc sstep: Add modsd, modud " Sandipan Das
2018-09-04 21:21   ` Segher Boessenkool
2018-09-05 11:53     ` Sandipan Das

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=99722a4e-fea8-7c74-2cb4-7d5efd2c54fa@linux.ibm.com \
    --to=sandipan@linux.ibm.com \
    --cc=anton@samba.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    --cc=ravi.bangoria@linux.ibm.com \
    --cc=segher@kernel.crashing.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).