OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 assm->ASM; \ | 76 assm->ASM; \ |
77 assm->GetCode(NULL); \ | 77 assm->GetCode(NULL); \ |
78 decoder->Decode(reinterpret_cast<Instruction*>(buf)); \ | 78 decoder->Decode(reinterpret_cast<Instruction*>(buf)); \ |
79 encoding = *reinterpret_cast<uint32_t*>(buf); \ | 79 encoding = *reinterpret_cast<uint32_t*>(buf); \ |
80 if (strncmp(disasm->GetOutput(), EXP, strlen(EXP)) != 0) { \ | 80 if (strncmp(disasm->GetOutput(), EXP, strlen(EXP)) != 0) { \ |
81 printf("%u : Encoding: %08" PRIx32 "\nExpected: %s\nFound: %s\n", \ | 81 printf("%u : Encoding: %08" PRIx32 "\nExpected: %s\nFound: %s\n", \ |
82 __LINE__, encoding, EXP, disasm->GetOutput()); \ | 82 __LINE__, encoding, EXP, disasm->GetOutput()); \ |
83 abort(); \ | 83 abort(); \ |
84 } | 84 } |
85 | 85 |
86 #define CLEANUP() \ | 86 #define CLEANUP() \ |
87 delete disasm; \ | 87 delete disasm; \ |
88 delete decoder; \ | 88 delete decoder; \ |
89 delete assm | 89 delete assm; \ |
| 90 free(buf) |
90 | 91 |
91 | 92 |
92 static bool vm_initialized = false; | 93 static bool vm_initialized = false; |
93 | 94 |
94 | 95 |
95 static void InitializeVM() { | 96 static void InitializeVM() { |
96 if (!vm_initialized) { | 97 if (!vm_initialized) { |
97 CcTest::InitializeVM(); | 98 CcTest::InitializeVM(); |
98 vm_initialized = true; | 99 vm_initialized = true; |
99 } | 100 } |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1759 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); | 1760 COMPARE(Dsb(FullSystem, BarrierOther), "dsb sy (0b1100)"); |
1760 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); | 1761 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); |
1761 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); | 1762 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); |
1762 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); | 1763 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); |
1763 | 1764 |
1764 // ISB | 1765 // ISB |
1765 COMPARE(Isb(), "isb"); | 1766 COMPARE(Isb(), "isb"); |
1766 | 1767 |
1767 CLEANUP(); | 1768 CLEANUP(); |
1768 } | 1769 } |
OLD | NEW |