mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-29 12:19:39 +00:00
![Jordan Niethe](/assets/img/avatar_default.png)
Currently unsigned ints are used to represent instructions on powerpc. This has worked well as instructions have always been 4 byte words. However, ISA v3.1 introduces some changes to instructions that mean this scheme will no longer work as well. This change is Prefixed Instructions. A prefixed instruction is made up of a word prefix followed by a word suffix to make an 8 byte double word instruction. No matter the endianness of the system the prefix always comes first. Prefixed instructions are only planned for powerpc64. Introduce a ppc_inst type to represent both prefixed and word instructions on powerpc64 while keeping it possible to exclusively have word instructions on powerpc32. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> [mpe: Fix compile error in emulate_spe()] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200506034050.24806-12-jniethe5@gmail.com
14 lines
346 B
C
14 lines
346 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef XMON_BPTS_H
|
|
#define XMON_BPTS_H
|
|
|
|
#define NBPTS 256
|
|
#ifndef __ASSEMBLY__
|
|
#include <asm/inst.h>
|
|
#define BPT_SIZE (sizeof(struct ppc_inst) * 2)
|
|
#define BPT_WORDS (BPT_SIZE / sizeof(struct ppc_inst))
|
|
|
|
extern unsigned int bpt_table[NBPTS * BPT_WORDS];
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* XMON_BPTS_H */
|