<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/disas, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/disas?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/disas?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-08T00:04:25+00:00</updated>
<entry>
<title>disas/nanomips: Tidy read for 48-bit opcodes</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-11-06T02:37:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=bb3daca71b58d11a13bc5979d1eb3c90b79452bc'/>
<id>urn:sha1:bb3daca71b58d11a13bc5979d1eb3c90b79452bc</id>
<content type='text'>
There is no point in looking for a 48-bit opcode if we've
not read the second word for a 32-bit opcode.

Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221106023735.5277-5-richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Split out read_u16</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-11-06T02:37:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1414e3f5657a9f0c66495eb347ffd00df7978b4c'/>
<id>urn:sha1:1414e3f5657a9f0c66495eb347ffd00df7978b4c</id>
<content type='text'>
Split out a helper function for reading a uint16_t
with the correct endianness.

Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221106023735.5277-4-richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Merge insn{1,2,3} into words[3]</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-11-06T21:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ad120616edfe405e283a924fa3302b78605616d6'/>
<id>urn:sha1:ad120616edfe405e283a924fa3302b78605616d6</id>
<content type='text'>
Since Disassemble wants the data in this format, collect
it that way.  This allows using a loop to print the bytes.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20221106212852.152384-3-richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Move setjmp into nanomips_dis</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Richard Henderson</name>
</author>
<published>2022-11-06T21:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=24449fc0f55ba99d4dbc6b3ab7ed495f43591c51'/>
<id>urn:sha1:24449fc0f55ba99d4dbc6b3ab7ed495f43591c51</id>
<content type='text'>
Reduce the number of local variables within the scope of the
setjmp by moving it to the existing helper.  The actual length
returned from Disassemble is not used, because we have already
determined the length while reading bytes.  Fixes:

nanomips.c: In function ‘print_insn_nanomips’:
nanomips.c:21925:14: error: variable ‘insn1’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
nanomips.c:21925:25: error: variable ‘insn2’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
nanomips.c:21925:36: error: variable ‘insn3’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
nanomips.c:21926:22: error: variable ‘buf’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20221106212852.152384-2-richard.henderson@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Remove headers already included by "qemu/osdep.h"</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2022-11-01T11:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e9ebb6677b2c07690f8e6e05602a0efcd19d3f2d'/>
<id>urn:sha1:e9ebb6677b2c07690f8e6e05602a0efcd19d3f2d</id>
<content type='text'>
Reviewed-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221101114458.25756-5-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Use G_GNUC_PRINTF to avoid invalid string formats</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2022-11-01T11:44:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d03a008e82b58593a6da7a79e6341a7a3a45da43'/>
<id>urn:sha1:d03a008e82b58593a6da7a79e6341a7a3a45da43</id>
<content type='text'>
Suggested-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Reviewed-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221101114458.25756-4-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Fix invalid PRIx64 format calling img_format()</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2022-11-01T11:44:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=50fc0945b6448903c0b696d373b004881ed37e1e'/>
<id>urn:sha1:50fc0945b6448903c0b696d373b004881ed37e1e</id>
<content type='text'>
Fix:

  disas/nanomips.c:12231:62: warning: format specifies type 'char *' but the argument has type 'uint64' (aka 'unsigned long long') [-Wformat]
    return img_format("RESTOREF 0x%" PRIx64 ", %s", u_value, count_value);
                                               ~~            ^~~~~~~~~~~
                                               %llu

Fixes: 4066c152b3 ("disas/nanomips: Remove IMMEDIATE functions")
Reported-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Reviewed-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221101114458.25756-3-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Fix invalid PRId64 format calling img_format()</title>
<updated>2022-11-08T00:04:25+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2022-11-01T11:44:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=04849c94fe50ce6fc621933eda2321dc6a3280a1'/>
<id>urn:sha1:04849c94fe50ce6fc621933eda2321dc6a3280a1</id>
<content type='text'>
Fix warnings such:

  disas/nanomips.c:3251:64: warning: format specifies type 'char *' but the argument has type 'int64' (aka 'long long') [-Wformat]
    return img_format("CACHE 0x%" PRIx64 ", %s(%s)", op_value, s_value, rs);
                                            ~~                 ^~~~~~~
                                            %lld

To avoid crashes such (kernel from commit f375ad6a0d):

  $ qemu-system-mipsel -cpu I7200 -d in_asm -kernel generic_nano32r6el_page4k
  ...
  ----------------
  IN: __bzero
  0x805c6084:  20c4 6950      ADDU r13, a0, a2
  0x805c6088:  9089           ADDIU a0, 1
  Process 70261 stopped
  * thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
      frame #0: 0x00000001bfe38864 libsystem_platform.dylib`_platform_strlen + 4
  libsystem_platform.dylib`:
  -&gt;  0x1bfe38864 &lt;+4&gt;:  ldr    q0, [x1]
      0x1bfe38868 &lt;+8&gt;:  adr    x3, #-0xc8                ; ___lldb_unnamed_symbol314
      0x1bfe3886c &lt;+12&gt;: ldr    q2, [x3], #0x10
      0x1bfe38870 &lt;+16&gt;: and    x2, x0, #0xf
  Target 0: (qemu-system-mipsel) stopped.
  (lldb) bt
  * thread #6, stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffffffffffff0)
    * frame #0: 0x00000001bfe38864 libsystem_platform.dylib`_platform_strlen + 4
      frame #1: 0x00000001bfce76a0 libsystem_c.dylib`__vfprintf + 4544
      frame #2: 0x00000001bfd158b4 libsystem_c.dylib`_vasprintf + 280
      frame #3: 0x0000000101c22fb0 libglib-2.0.0.dylib`g_vasprintf + 28
      frame #4: 0x0000000101bfb7d8 libglib-2.0.0.dylib`g_strdup_vprintf + 32
      frame #5: 0x000000010000fb70 qemu-system-mipsel`img_format(format=&lt;unavailable&gt;) at nanomips.c:103:14 [opt]
      frame #6: 0x0000000100018868 qemu-system-mipsel`SB_S9_(instruction=&lt;unavailable&gt;, info=&lt;unavailable&gt;) at nanomips.c:12616:12 [opt]
      frame #7: 0x000000010000f90c qemu-system-mipsel`print_insn_nanomips at nanomips.c:589:28 [opt]

Fixes: 4066c152b3 ("disas/nanomips: Remove IMMEDIATE functions")
Reported-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Reviewed-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221101114458.25756-2-philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/mips: Fix branch displacement for BEQZC and BNEZC</title>
<updated>2022-10-31T10:32:07+00:00</updated>
<author>
<name>David Daney</name>
</author>
<published>2022-10-14T11:23:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a6d89b454cec2de235595ea311d3cc3c49c3aaaa'/>
<id>urn:sha1:a6d89b454cec2de235595ea311d3cc3c49c3aaaa</id>
<content type='text'>
disas/mips.c got added in commit 6643d27ea0 ("MIPS disas support")
apparently based on binutils tag 'gdb_6_1-branchpoint' [1].
Back then, MIPSr6 was not supported (added in binutils commit
7361da2c952 during 2014 [2]).

Binutils codebase diverged so much over the last 18 years, it is
not possible to simply cherry-pick their changes, so fix it BEQZC /
BNEZC 21-bit signed branch displacement locally.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=opcodes/mips-dis.c;hb=refs/tags/gdb_6_1-branchpoint
[2] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=7361da2c952

Fixes: 31837be3ee ("target-mips: add compact and CP1 branches")
Signed-off-by: David Daney &lt;david.daney@fungible.com&gt;
Reviewed-by: Marcin Nowakowski &lt;marcin.nowakowski@fungible.com&gt;
[PMD: Added commit description]
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@fungible.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20221014112322.61119-1-philmd@fungible.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>disas/nanomips: Rename nanomips.cpp to nanomips.c</title>
<updated>2022-10-31T10:32:07+00:00</updated>
<author>
<name>Milica Lazarevic</name>
</author>
<published>2022-09-12T12:26:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2413e000bb6efd47fda78ae1dfebd946323e3d9d'/>
<id>urn:sha1:2413e000bb6efd47fda78ae1dfebd946323e3d9d</id>
<content type='text'>
Now that everything has been converted to C code the nanomips.cpp file
has been renamed. Therefore, meson.build file is also changed.

Signed-off-by: Milica Lazarevic &lt;milica.lazarevic@syrmia.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220912122635.74032-25-milica.lazarevic@syrmia.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
</content>
</entry>
</feed>
