mov16.asm 800 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ;;; Test JIT optimization of opcodes 0x89 and 0x8b
  2. global _start
  3. section .data
  4. align 16
  5. mydword:
  6. dd 0xcafebabe
  7. myaddress:
  8. dd 0xdeadbeef
  9. %include "header.inc"
  10. ;; Load 32-bit values to confirm that the 16-bit movs do not overwrite existing values here
  11. mov eax, 0xcafeb055
  12. mov esi, 0x1bada551
  13. mov ecx, [mydword]
  14. mov edx, [myaddress]
  15. mov [myaddress], cx
  16. mov [mydword], dx
  17. ;; The following db's are used since mov reg, reg can be accomplished with several opcodes but
  18. ;; we want to test these specific ones
  19. ;; mov cx, si
  20. db 0x66
  21. db 0x89
  22. db 0xf1
  23. ;; mov dx, di
  24. db 0x66
  25. db 0x89
  26. db 0xfa
  27. ;; mov dx, ax
  28. db 0x66
  29. db 0x8b
  30. db 0xd0
  31. ;; mov ax, cx
  32. db 0x66
  33. db 0x8b
  34. db 0xc1
  35. %include "footer.inc"