dis.h 636 B

123456789101112131415161718192021222324252627282930
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Disassemble s390 instructions.
  4. *
  5. * Copyright IBM Corp. 2007
  6. * Author(s): Martin Schwidefsky ([email protected]),
  7. */
  8. #ifndef __ASM_S390_DIS_H__
  9. #define __ASM_S390_DIS_H__
  10. #include <asm/dis-defs.h>
  11. static inline int insn_length(unsigned char code)
  12. {
  13. return ((((int) code + 64) >> 7) + 1) << 1;
  14. }
  15. struct pt_regs;
  16. void show_code(struct pt_regs *regs);
  17. void print_fn_code(unsigned char *code, unsigned long len);
  18. struct s390_insn *find_insn(unsigned char *code);
  19. static inline int is_known_insn(unsigned char *code)
  20. {
  21. return !!find_insn(code);
  22. }
  23. #endif /* __ASM_S390_DIS_H__ */