OLD | NEW |
(Empty) | |
| 1 BITS: 32 |
| 2 OUTCOME: invalid |
| 3 |
| 4 # The following are examples of input sequences that almost look like |
| 5 # predefined nop instruction sequences, but differ by 1, just to show |
| 6 # that we do reject them. |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12 # This is the correct nop case. |
| 13 hex: 66 0f 1f 44 00 00 |
| 14 |
| 15 |
| 16 # This is an example where we have incremented the nop by 1. |
| 17 asm: nopw 0x1(%eax,%eax,1) |
| 18 hex: 66 0f 1f 44 00 01 |
| 19 nc_out: Undefined instruction |
| 20 |
| 21 |
| 22 # This is the (repeated) correct nop case. |
| 23 hex: 66 0f 1f 44 00 00 |
| 24 |
| 25 |
| 26 # This is an example where we have decremented the nop by 1. |
| 27 asm: data16; .byte 0xf; pop %ds; inc %ebx |
| 28 hex: 66 0f 1f 43 |
| 29 nc_out: Undefined instruction |
| 30 |
| 31 hex: ff ff |
| 32 nc_out: Undefined instruction |
| 33 |
| 34 |
| 35 # This is the (repeated) correct nop case. |
| 36 hex: 66 0f 1f 44 00 00 |
| 37 |
| 38 |
| 39 # Filler (add) to align block. |
| 40 hex: 00 00 |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 46 |
| 47 # This is an example of a different, correct, nop case. |
| 48 hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 49 |
| 50 |
| 51 # This is an example where we have incremented the nop by 1. |
| 52 asm: data16; data16; data16; data16; data16 |
| 53 hex: 66 66 66 66 66 |
| 54 nc_out: Bad prefix usage |
| 55 nc_out: Illegal instruction |
| 56 |
| 57 asm: nopl %cs:0x1000000(%eax,%eax,1); |
| 58 hex: 2e 0f 1f 84 00 00 00 00 01 |
| 59 nc_out: Bad prefix usage |
| 60 |
| 61 |
| 62 # Filler (move) to fill the rest of the block. |
| 63 asm: mov $0x7788,%di |
| 64 hex: 66 bf 88 77 |
| 65 |
| 66 |
| 67 # This is the (repeated) correct nop case. |
| 68 hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 69 |
| 70 |
| 71 # This is an example where we have decremented the nop by 1. |
| 72 asm: data16; data16; data16; data16; data16 |
| 73 hex: 66 66 66 66 66 |
| 74 nc_out: Bad prefix usage |
| 75 nc_out: Illegal instruction |
| 76 |
| 77 hex: 2e 0f 1f 83 ff ff ff ff ff |
| 78 nc_out: Bad prefix usage |
| 79 |
| 80 |
| 81 # Filler to realign the decoder. |
| 82 hex: 00 |
| 83 |
| 84 |
| 85 # Filler (add) to fill the rest of the block. |
| 86 asm: add (%eax,%eax,1),%al |
| 87 hex: 02 04 00 |
| 88 |
| 89 |
| 90 # This is the (repeated) correct nop case. |
| 91 hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 92 |
| 93 |
| 94 |
| 95 |
| 96 |
| 97 |
| 98 |
| 99 |
| 100 # This is the list of all nops, just to see if they validate. |
| 101 hex: 66 0f 1f 44 00 00 |
| 102 |
| 103 hex: 66 0f 1f 84 00 00 00 00 00 |
| 104 |
| 105 # Filler (add) to fill the rest of the block. |
| 106 asm: add (%eax,%eax,1),%al |
| 107 hex: 02 04 00 |
| 108 |
| 109 hex: 66 2e 0f 1f 84 00 00 00 00 00 |
| 110 |
| 111 hex: 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 112 |
| 113 # Filler (2 moves) to fill the rest of the block. |
| 114 asm: mov %ax,0x11223344 |
| 115 hex: 66 a3 44 33 22 11 |
| 116 |
| 117 asm: mov 0x11223344,%al |
| 118 hex: a0 44 33 22 11 |
| 119 |
| 120 hex: 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 121 |
| 122 hex: 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 123 |
| 124 # Filler (move, nop) to fill the rest of the block. |
| 125 asm: mov %ax,0x11223344 |
| 126 hex: 66 a3 44 33 22 11 |
| 127 |
| 128 asm: nop |
| 129 hex: 90 |
| 130 |
| 131 hex: 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 132 |
| 133 hex: 66 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 |
| 134 |
OLD | NEW |