expimp.asm 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ;Testname=O0; Arguments=-O0 -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
  2. ;Testname=O1; Arguments=-O1 -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
  3. ;Testname=Ox; Arguments=-Ox -fbin -oexpimp.bin; Files=stdout stderr expimp.bin
  4. ;Testname=error-O0; Arguments=-O0 -fbin -oexpimp.bin -DERROR; Files=stdout stderr expimp.bin
  5. ;Testname=error-Ox; Arguments=-Ox -fbin -oexpimp.bin -DERROR; Files=stdout stderr expimp.bin
  6. ;
  7. ; Test of explicitly and implicitly sized operands
  8. ;
  9. BITS 32
  10. add esi,2 ; Implicit
  11. add esi,123456h ; Implicit
  12. add esi,byte 2 ; Explicit
  13. add esi,dword 2 ; Explicit
  14. add esi,dword 123456h ; Explicit
  15. add esi,byte 123456h ; Explicit Truncation
  16. add esi,strict 2 ; Implicit Strict
  17. add esi,strict 123456h ; Implicit Strict
  18. add esi,strict byte 2 ; Explicit Strict
  19. add esi,strict dword 2 ; Explicit Strict
  20. add esi,strict dword 123456h ; Explicit Strict
  21. add esi,strict byte 123456h ; Explicit Strict Truncation
  22. add eax,2 ; Implicit
  23. add eax,123456h ; Implicit
  24. add eax,byte 2 ; Explicit
  25. add eax,dword 2 ; Explicit
  26. add eax,dword 123456h ; Explicit
  27. add eax,byte 123456h ; Explicit Truncation
  28. add eax,strict 2 ; Implicit Strict
  29. add eax,strict 123456h ; Implicit Strict
  30. add eax,strict byte 2 ; Explicit Strict
  31. add eax,strict dword 2 ; Explicit Strict
  32. add eax,strict dword 123456h ; Explicit Strict
  33. add eax,strict byte 123456h ; Explicit Strict Truncation
  34. imul dx,3 ; Implicit
  35. imul dx,byte 3 ; Explicit
  36. imul dx,word 3 ; Explicit
  37. imul dx,strict byte 3 ; Explicit Strict
  38. imul dx,strict word 3 ; Explicit Strict
  39. ;
  40. ; Same thing with branches
  41. ;
  42. start:
  43. jmp short start ; Explicit
  44. jmp near start ; Explicit
  45. jmp word start ; Explicit
  46. jmp dword start ; Explicit
  47. jmp short forward ; Explicit
  48. jmp near forward ; Explicit
  49. jmp word forward ; Explicit
  50. jmp dword forward ; Explicit
  51. %ifdef ERROR
  52. jmp short faraway ; Explicit (ERROR)
  53. %endif
  54. jmp near faraway ; Explicit
  55. jmp word faraway ; Explicit
  56. jmp dword faraway ; Explicit
  57. jmp start ; Implicit
  58. jmp forward ; Implicit
  59. jmp faraway ; Implicit
  60. jmp strict short start ; Explicit Strict
  61. jmp strict near start ; Explicit Strict
  62. jmp strict word start ; Explicit Strict
  63. jmp strict dword start ; Explicit Strict
  64. jmp strict short forward ; Explicit Strict
  65. jmp strict near forward ; Explicit Strict
  66. jmp strict word forward ; Explicit Strict
  67. jmp strict dword forward ; Explicit Strict
  68. %ifdef ERROR
  69. jmp strict short faraway ; Explicit (ERROR)
  70. %endif
  71. jmp strict near faraway ; Explicit Strict
  72. jmp strict word faraway ; Explicit Strict
  73. jmp strict dword faraway ; Explicit Strict
  74. jmp strict start ; Implicit Strict
  75. jmp strict forward ; Implicit Strict
  76. jmp strict faraway ; Implicit Strict
  77. forward:
  78. times 256 nop
  79. faraway: