<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/lib/test_emulate_step.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-07-29T13:47:52Z</updated>
<entry>
<title>powerpc/test_emulate_step: Add testcases for divde[.] and divdeu[.] instructions</title>
<updated>2020-07-29T13:47:52Z</updated>
<author>
<name>Balamuruhan S</name>
</author>
<published>2020-07-28T13:03:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b859c95cf4b936b5e8019e7ab68ee2740e609ffd'/>
<id>urn:sha1:b859c95cf4b936b5e8019e7ab68ee2740e609ffd</id>
<content type='text'>
Add testcases for divde, divde., divdeu, divdeu. emulated instructions
to cover few scenarios,
  - with same dividend and divisor to have undefine RT
    for divdeu[.]
  - with divide by zero to have undefine RT for both
    divde[.] and divdeu[.]
  - with negative dividend to cover -|divisor| &lt; r &lt;= 0 if
    the dividend is negative for divde[.]
  - normal case with proper dividend and divisor for both
    divde[.] and divdeu[.]

Signed-off-by: Balamuruhan S &lt;bala24@linux.ibm.com&gt;
Reviewed-by: Sandipan Das &lt;sandipan@linux.ibm.com&gt;
Acked-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200728130308.1790982-4-bala24@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/test_emulate_sstep: Fix build error</title>
<updated>2020-07-24T00:41:19Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2020-07-23T23:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=70cc062c47e7851335ff4c44ba9b362174baf7d4'/>
<id>urn:sha1:70cc062c47e7851335ff4c44ba9b362174baf7d4</id>
<content type='text'>
ppc64_book3e_allmodconfig fails with:

  arch/powerpc/lib/test_emulate_step.c: In function 'test_pld':
  arch/powerpc/lib/test_emulate_step.c:113:7: error: implicit declaration of function 'cpu_has_feature'
    113 |  if (!cpu_has_feature(CPU_FTR_ARCH_31)) {
        |       ^~~~~~~~~~~~~~~

Add an include of cpu_has_feature.h to fix it.

Fixes: b6b54b42722a ("powerpc/sstep: Add tests for prefixed integer load/stores")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200724004109.1461709-1-mpe@ellerman.id.au
</content>
</entry>
<entry>
<title>powerpc/test_emulate_step: Move extern declaration to sstep.h</title>
<updated>2020-07-23T07:43:14Z</updated>
<author>
<name>Balamuruhan S</name>
</author>
<published>2020-06-26T09:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e93ad65e3611b06288efdf0cfd76c012df3feec1'/>
<id>urn:sha1:e93ad65e3611b06288efdf0cfd76c012df3feec1</id>
<content type='text'>
fix checkpatch.pl warnings by moving extern declaration from source
file to headerfile.

Signed-off-by: Balamuruhan S &lt;bala24@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200626095158.1031507-5-bala24@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/test_emulate_step: Add negative tests for prefixed addi</title>
<updated>2020-07-23T07:43:07Z</updated>
<author>
<name>Balamuruhan S</name>
</author>
<published>2020-06-26T09:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7e67c73b939b25d4ad18a536e52282aa35d8ee56'/>
<id>urn:sha1:7e67c73b939b25d4ad18a536e52282aa35d8ee56</id>
<content type='text'>
testcases for `paddi` instruction to cover the negative case,
if R is equal to 1 and RA is not equal to 0, the instruction
form is invalid.

Signed-off-by: Balamuruhan S &lt;bala24@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200626095158.1031507-3-bala24@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/test_emulate_step: Enhancement to test negative scenarios</title>
<updated>2020-07-23T07:43:01Z</updated>
<author>
<name>Balamuruhan S</name>
</author>
<published>2020-06-26T09:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93c3a0ba2a0863a5c82a518d64044434f82a57f5'/>
<id>urn:sha1:93c3a0ba2a0863a5c82a518d64044434f82a57f5</id>
<content type='text'>
add provision to declare test is a negative scenario, verify
whether emulation fails and avoid executing it.

Signed-off-by: Balamuruhan S &lt;bala24@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200626095158.1031507-2-bala24@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc: Add a ppc_inst_as_str() helper</title>
<updated>2020-07-23T07:41:36Z</updated>
<author>
<name>Jordan Niethe</name>
</author>
<published>2020-06-02T05:27:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50428fdc53ba48f6936b10dfdc0d644972403908'/>
<id>urn:sha1:50428fdc53ba48f6936b10dfdc0d644972403908</id>
<content type='text'>
There are quite a few places where instructions are printed, this is
done using a '%x' format specifier. With the introduction of prefixed
instructions, this does not work well. Currently in these places,
ppc_inst_val() is used for the value for %x so only the first word of
prefixed instructions are printed.

When the instructions are word instructions, only a single word should
be printed. For prefixed instructions both the prefix and suffix should
be printed. To accommodate both of these situations, instead of a '%x'
specifier use '%s' and introduce a helper, __ppc_inst_as_str() which
returns a char *. The char * __ppc_inst_as_str() returns is buffer that
is passed to it by the caller.

It is cumbersome to require every caller of __ppc_inst_as_str() to now
declare a buffer. To make it more convenient to use __ppc_inst_as_str(),
wrap it in a macro that uses a compound statement to allocate a buffer
on the caller's stack before calling it.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Acked-by: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;
[mpe: Drop 0x prefix to match most existings uses, especially xmon]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200602052728.18227-1-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>powerpc/sstep: Add tests for Prefixed Add Immediate</title>
<updated>2020-07-23T07:25:21Z</updated>
<author>
<name>Jordan Niethe</name>
</author>
<published>2020-05-25T02:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f825900786e1c24e4c48622e12eb493a6cd27b6'/>
<id>urn:sha1:4f825900786e1c24e4c48622e12eb493a6cd27b6</id>
<content type='text'>
Use the existing support for testing compute type instructions to test
Prefixed Add Immediate (paddi). The R bit of the paddi instruction
controls whether current instruction address is used. Add test cases
for when R=1 and for R=0. paddi has a 34 bit immediate field formed by
concatenating si0 and si1. Add tests for the extreme values of this
field.

Skip the paddi tests if ISA v3.1 is unsupported.

Some of these test cases were added by Balamuruhan S.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
[mpe: Fix conflicts with ppc-opcode.h changes, squash in .balign]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200525025923.19843-5-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>powerpc/sstep: Let compute tests specify a required cpu feature</title>
<updated>2020-07-23T07:25:18Z</updated>
<author>
<name>Jordan Niethe</name>
</author>
<published>2020-05-25T02:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=301ebf7d69f6709575d137a41a0291f69f343aed'/>
<id>urn:sha1:301ebf7d69f6709575d137a41a0291f69f343aed</id>
<content type='text'>
An a array of struct compute_test's are used to declare tests for
compute instructions. Add a cpu_feature field to struct compute_test as
an optional way to specify a cpu feature that must be present. If not
present then skip the test.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200525025923.19843-4-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>powerpc/sstep: Set NIP in instruction emulation tests</title>
<updated>2020-07-23T07:25:15Z</updated>
<author>
<name>Jordan Niethe</name>
</author>
<published>2020-05-25T02:59:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1c89cf7fbed36f078b20fd47d308b4fc6dbff5f6'/>
<id>urn:sha1:1c89cf7fbed36f078b20fd47d308b4fc6dbff5f6</id>
<content type='text'>
The tests for emulation of compute instructions execute and
emulate an instruction and then compare the results to verify the
emulation. In ISA v3.1 there are instructions that operate relative to
the NIP. Therefore set the NIP in the regs used for the emulated
instruction to the location of the executed instruction so they will
give the same result.

This is a rework of a patch by Balamuruhan S.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200525025923.19843-3-jniethe5@gmail.com
</content>
</entry>
<entry>
<title>powerpc/sstep: Add tests for prefixed floating-point load/stores</title>
<updated>2020-07-23T07:25:12Z</updated>
<author>
<name>Jordan Niethe</name>
</author>
<published>2020-05-25T02:59:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0396de6d8561c721b03fce386eb9682b37a26013'/>
<id>urn:sha1:0396de6d8561c721b03fce386eb9682b37a26013</id>
<content type='text'>
Add tests for the prefixed versions of the floating-point load/stores
that are currently tested. This includes the following instructions:
  * Prefixed Load Floating-Point Single (plfs)
  * Prefixed Load Floating-Point Double (plfd)
  * Prefixed Store Floating-Point Single (pstfs)
  * Prefixed Store Floating-Point Double (pstfd)

Skip the new tests if ISA v3.10 is unsupported.

Signed-off-by: Jordan Niethe &lt;jniethe5@gmail.com&gt;
[mpe: Fix conflicts with ppc-opcode.h changes]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20200525025923.19843-2-jniethe5@gmail.com
</content>
</entry>
</feed>
