[PATCH 1/4] powerpc: Add a ppc_inst_as_str() helper

Michael Ellerman patch-notifications at ellerman.id.au
Fri Jul 24 23:24:49 AEST 2020


On Tue, 2 Jun 2020 15:27:25 +1000, Jordan Niethe wrote:
> 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.
> 
> [...]

Patches 1-2 applied to powerpc/next.

[1/4] powerpc: Add a ppc_inst_as_str() helper
      https://git.kernel.org/powerpc/c/50428fdc53ba48f6936b10dfdc0d644972403908
[2/4] powerpc/xmon: Improve dumping prefixed instructions
      https://git.kernel.org/powerpc/c/8b98afc117aaf825c66d7ddd59f1849e559b42cd

cheers


More information about the Linuxppc-dev mailing list