| 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 27 matching lines...) Expand all Loading... |
| 38 #include "a64/utils-a64.h" | 38 #include "a64/utils-a64.h" |
| 39 | 39 |
| 40 using namespace v8::internal; | 40 using namespace v8::internal; |
| 41 | 41 |
| 42 #define TEST_(name) TEST(DISASM_##name) | 42 #define TEST_(name) TEST(DISASM_##name) |
| 43 | 43 |
| 44 #define EXP_SIZE (256) | 44 #define EXP_SIZE (256) |
| 45 #define INSTR_SIZE (1024) | 45 #define INSTR_SIZE (1024) |
| 46 #define SET_UP_CLASS(ASMCLASS) \ | 46 #define SET_UP_CLASS(ASMCLASS) \ |
| 47 InitializeVM(); \ | 47 InitializeVM(); \ |
| 48 v8::HandleScope scope; \ | 48 Isolate* isolate = Isolate::Current(); \ |
| 49 HandleScope scope(isolate); \ |
| 49 byte* buf = static_cast<byte*>(malloc(INSTR_SIZE)); \ | 50 byte* buf = static_cast<byte*>(malloc(INSTR_SIZE)); \ |
| 50 uint32_t encoding = 0; \ | 51 uint32_t encoding = 0; \ |
| 51 ASMCLASS* assm = new ASMCLASS(Isolate::Current(), buf, INSTR_SIZE); \ | 52 ASMCLASS* assm = new ASMCLASS(isolate, buf, INSTR_SIZE); \ |
| 52 Decoder* decoder = new Decoder(); \ | 53 Decoder* decoder = new Decoder(); \ |
| 53 Disassembler* disasm = new Disassembler(); \ | 54 Disassembler* disasm = new Disassembler(); \ |
| 54 decoder->AppendVisitor(disasm) | 55 decoder->AppendVisitor(disasm) |
| 55 | 56 |
| 56 #define SET_UP() SET_UP_CLASS(Assembler) | 57 #define SET_UP() SET_UP_CLASS(Assembler) |
| 57 | 58 |
| 58 #define COMPARE(ASM, EXP) \ | 59 #define COMPARE(ASM, EXP) \ |
| 59 assm->Reset(); \ | 60 assm->Reset(); \ |
| 60 assm->ASM; \ | 61 assm->ASM; \ |
| 61 assm->GetCode(NULL); \ | 62 assm->GetCode(NULL); \ |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); | 1753 COMPARE(Dsb(InnerShareable, BarrierOther), "dsb sy (0b1000)"); |
| 1753 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); | 1754 COMPARE(Dsb(NonShareable, BarrierOther), "dsb sy (0b0100)"); |
| 1754 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); | 1755 COMPARE(Dsb(OuterShareable, BarrierOther), "dsb sy (0b0000)"); |
| 1755 | 1756 |
| 1756 // ISB | 1757 // ISB |
| 1757 COMPARE(Isb(), "isb"); | 1758 COMPARE(Isb(), "isb"); |
| 1758 | 1759 |
| 1759 CLEANUP(); | 1760 CLEANUP(); |
| 1760 } | 1761 } |
| 1761 | 1762 |
| OLD | NEW |