mpx-64.asm 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. ;Testname=mpx-64; Arguments=-felf64 -ompx-64.o -O0; Files=stdout stderr mpx-64.o
  2. BITS 64
  3. bndmk bnd1, [r11]
  4. bndmk bnd1, [rax]
  5. bndmk bnd1, [0x399]
  6. bndmk bnd1, [r9+0x3]
  7. bndmk bnd1, [rax+0x3]
  8. bndmk bnd1, [3,1*r12]
  9. bndmk bnd1, [rax+rcx]
  10. bndmk bnd1, [r11+1*rax+0x3]
  11. bndmk bnd1, [rbx+1*r9+0x3]
  12. ; bndmov
  13. bndmov bnd1, [r11]
  14. bndmov bnd1, [rax]
  15. bndmov bnd1, [0x399]
  16. bndmov bnd2, [r9+0x3]
  17. bndmov bnd2, [rax+0x3]
  18. bndmov bnd0, [1*r12+0x3]
  19. bndmov bnd2, [rax+rdx]
  20. bndmov bnd1, [r11+1*rax+0x3]
  21. bndmov bnd1, [rbx+1*r9+0x3]
  22. bndmov bnd0, bnd2
  23. bndmov [r11], bnd1
  24. bndmov [rax], bnd1
  25. bndmov [0x399], bnd1
  26. bndmov [r9+0x3], bnd2
  27. bndmov [rax+0x3], bnd2
  28. bndmov [1*r12+0x3], bnd0
  29. bndmov [rax+rdx], bnd2
  30. bndmov [r11+1*rax+0x3], bnd1
  31. bndmov [rbx+1*r9+0x3], bnd1
  32. bndmov bnd2, bnd0
  33. ; bndcl
  34. bndcl bnd1, [r11]
  35. bndcl bnd1, [rax]
  36. bndcl bnd1, r11
  37. bndcl bnd1, rcx
  38. bndcl bnd1, [0x399]
  39. bndcl bnd1, [r9+0x3]
  40. bndcl bnd1, [rax+0x3]
  41. bndcl bnd1, [1*r12+0x3]
  42. bndcl bnd1, [rax+rcx]
  43. bndcl bnd1, [r11+1*rax+0x3]
  44. bndcl bnd1, [rbx+1*r9+0x3]
  45. ; bndcu
  46. bndcu bnd1, [r11]
  47. bndcu bnd1, [rax]
  48. bndcu bnd1, r11
  49. bndcu bnd1, rcx
  50. bndcu bnd1, [0x399]
  51. bndcu bnd1, [r9+0x3]
  52. bndcu bnd1, [rax+0x3]
  53. bndcu bnd1, [1*r12+0x3]
  54. bndcu bnd1, [rax+rcx]
  55. bndcu bnd1, [r11+1*rax+0x3]
  56. bndcu bnd1, [rbx+1*r9+0x3]
  57. ; bndcn
  58. bndcn bnd1, [r11]
  59. bndcn bnd1, [rax]
  60. bndcn bnd1, r11
  61. bndcn bnd1, rcx
  62. bndcn bnd1, [0x399]
  63. bndcn bnd1, [r9+0x3]
  64. bndcn bnd1, [rax+0x3]
  65. bndcn bnd1, [1*r9+0x3]
  66. bndcn bnd1, [rax+rcx]
  67. bndcn bnd1, [r11+1*rax+0x3]
  68. bndcn bnd1, [rbx+1*r9+0x3]
  69. ; bndstx
  70. ; next 5 lines should be parsed same
  71. bndstx [rax+0x3,rbx], bnd0 ; NASM - split EA
  72. bndstx [rax+rbx*1+0x3], bnd0 ; GAS
  73. bndstx [rax+rbx+3], bnd0 ; GAS
  74. bndstx [rax+0x3], bnd0, rbx ; ICC-1
  75. bndstx [rax+0x3], rbx, bnd0 ; ICC-2
  76. ; next 5 lines should be parsed same
  77. bndstx [,rcx*1], bnd2 ; NASM
  78. bndstx [0,rcx*1], bnd2 ; NASM
  79. bndstx [0], bnd2, rcx ; ICC-1
  80. bndstx [0], rcx, bnd2 ; ICC-2
  81. bndstx [rcx*1], bnd2 ; GAS - rcx is encoded as index only when it is mib
  82. ; next 3 lines should be parsed same
  83. bndstx [3,1*r12], bnd2 ; NASM
  84. bndstx [1*r12+3], bnd2 ; GAS
  85. bndstx [3], r12, bnd2 ; ICC
  86. bndstx [r12+0x399], bnd3
  87. bndstx [r11+0x1234], bnd1
  88. bndstx [rbx+0x1234], bnd2
  89. bndstx [rdx], bnd1
  90. ; bndldx
  91. bndldx bnd0, [rax+rbx*1+0x3]
  92. bndldx bnd2, [rbx+rdx+3]
  93. bndldx bnd3, [r12+0x399]
  94. bndldx bnd1, [r11+0x1234]
  95. bndldx bnd2, [rbx+0x1234]
  96. bndldx bnd2, [1*rbx+3]
  97. bndldx bnd2, [1*r12+3]
  98. bndldx bnd1, [rdx]
  99. ; bnd
  100. bnd ret
  101. bnd call foo
  102. bnd jmp foo ; when it becomes a Jb form - short jmp (eb),
  103. ; bnd prefix is silently dropped
  104. bnd jmp near 0 ; near jmp (opcode e9)
  105. ; bnd jmp short 0 ; explicit short jmp (opcode eb) : error
  106. bnd jno foo
  107. foo: bnd ret