Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #include "masks.h" | |
| 2 .syntax unified | |
| 3 .code 16 | |
| 4 .thumb_func | |
| 5 .global _start | |
| 6 _start: | |
| 7 // Test legit behavior | |
| 8 cmp r0, r0 | |
| 9 ite eq | |
| 10 moveq r0, r0 | |
| 11 movne r0, r0 | |
| 12 | |
| 13 // Pad to right before bundle boundary | |
| 14 mov r0, r0 | |
| 15 mov r0, r0 | |
| 16 mov r0, r0 | |
| 17 | |
| 18 // Test bundle issues. | |
| 19 ite ne | |
| 20 movne r0, r0 | |
| 21 moveq r0, r0 | |
| 22 | |
| 23 // Next bundle | |
| 24 mov r0, r0 | |
| 25 mov r0, r0 | |
| 26 mov r0, r0 | |
| 27 mov r0, r0 | |
| 28 mov r0, r0 | |
| 29 mov r0, r0 | |
| 30 | |
| 31 | |
| 32 // Test legal branch | |
| 33 ittt ne | |
| 34 bicne r0, HIGH_TWO | |
| 35 orrne r0, LOW_FOUR | |
| 36 bxne r0 | |
| 37 | |
| 38 // Moving to next bundle for room... | |
| 39 mov r0, r0 | |
| 40 mov r0, r0 | |
| 41 | |
| 42 // Test illegal branch | |
| 43 itet eq | |
| 44 biceq r0, HIGH_TWO | |
| 45 orrne r0, LOW_FOUR | |
| 46 bxeq r0 | |
| 47 | |
| 48 // Moving to the next bundle again | |
| 49 // (and partway in so we're not always aligned) | |
| 50 mov r0, r0 | |
| 51 mov r0, r0 | |
| 52 mov r0, r0 | |
| 53 mov r0, r0 | |
| 54 | |
| 55 // Test legal data write | |
| 56 itt cc | |
| 57 biccc r0, HIGH_TWO | |
| 58 strcc r1, [r0] | |
| 59 | |
| 60 // Pad | |
| 61 mov r0, r0 | |
| 62 mov r0, r0 | |
| 63 | |
| 64 // Test illegal data write | |
| 65 ite cc | |
| 66 biccc r0, HIGH_TWO | |
| 67 strcs r1, [r0] | |
| 68 | |
| 69 // TODO(mrm) Manually add a sequence that will fire the it_safety issue. | |
|
bsy
2011/09/21 22:32:17
mrm
| |
| 70 // Not doing this now because the assembler will reject all such sequences, | |
| 71 // so I will have to enter the hex manually. | |
| OLD | NEW |