insn.h 563 B

123456789101112131415161718192021222324252627282930
  1. #ifndef __ASM_ARM_INSN_H
  2. #define __ASM_ARM_INSN_H
  3. static inline unsigned long
  4. arm_gen_nop(void)
  5. {
  6. #ifdef CONFIG_THUMB2_KERNEL
  7. return 0xf3af8000; /* nop.w */
  8. #else
  9. return 0xe1a00000; /* mov r0, r0 */
  10. #endif
  11. }
  12. unsigned long
  13. __arm_gen_branch(unsigned long pc, unsigned long addr, bool link);
  14. static inline unsigned long
  15. arm_gen_branch(unsigned long pc, unsigned long addr)
  16. {
  17. return __arm_gen_branch(pc, addr, false);
  18. }
  19. static inline unsigned long
  20. arm_gen_branch_link(unsigned long pc, unsigned long addr)
  21. {
  22. return __arm_gen_branch(pc, addr, true);
  23. }
  24. #endif