| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 static void InitializeVM() { | 45 static void InitializeVM() { |
| 46 if (env.IsEmpty()) { | 46 if (env.IsEmpty()) { |
| 47 env = v8::Context::New(); | 47 env = v8::Context::New(); |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 | 51 |
| 52 bool DisassembleAndCompare(byte* pc, const char* compare_string) { | 52 bool DisassembleAndCompare(byte* pc, const char* compare_string) { |
| 53 disasm::Disassembler disasm; | 53 disasm::Disassembler disasm; |
| 54 char disasm_buffer[128]; | 54 EmbeddedVector<char, 128> disasm_buffer; |
| 55 | 55 |
| 56 disasm.InstructionDecode(disasm_buffer, sizeof disasm_buffer, pc); | 56 disasm.InstructionDecode(disasm_buffer, pc); |
| 57 | 57 |
| 58 if (strcmp(compare_string, disasm_buffer) != 0) { | 58 if (strcmp(compare_string, disasm_buffer.start()) != 0) { |
| 59 fprintf(stderr, | 59 fprintf(stderr, |
| 60 "expected: \n" | 60 "expected: \n" |
| 61 "%s\n" | 61 "%s\n" |
| 62 "disassembled: \n" | 62 "disassembled: \n" |
| 63 "%s\n\n", | 63 "%s\n\n", |
| 64 compare_string, disasm_buffer); | 64 compare_string, disasm_buffer.start()); |
| 65 return false; | 65 return false; |
| 66 } | 66 } |
| 67 return true; | 67 return true; |
| 68 } | 68 } |
| 69 | 69 |
| 70 | 70 |
| 71 #define SETUP() \ | 71 #define SETUP() \ |
| 72 InitializeVM(); \ | 72 InitializeVM(); \ |
| 73 Serializer::disable(); \ | 73 Serializer::disable(); \ |
| 74 v8::HandleScope scope; \ | 74 v8::HandleScope scope; \ |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 "e2244801 eor r4, r4, #65536"); | 263 "e2244801 eor r4, r4, #65536"); |
| 264 COMPARE(eor(r4, r3, Operand(0x00100000), SetCC), | 264 COMPARE(eor(r4, r3, Operand(0x00100000), SetCC), |
| 265 "e2334601 eors r4, r3, #1048576"); | 265 "e2334601 eors r4, r3, #1048576"); |
| 266 COMPARE(eor(r4, r2, Operand(0x01000000), LeaveCC, cs), | 266 COMPARE(eor(r4, r2, Operand(0x01000000), LeaveCC, cs), |
| 267 "22224401 eorcs r4, r2, #16777216"); | 267 "22224401 eorcs r4, r2, #16777216"); |
| 268 COMPARE(eor(r4, r1, Operand(0x10000000), SetCC, cc), | 268 COMPARE(eor(r4, r1, Operand(0x10000000), SetCC, cc), |
| 269 "32314201 eorccs r4, r1, #268435456"); | 269 "32314201 eorccs r4, r1, #268435456"); |
| 270 | 270 |
| 271 OUTPUT(); | 271 OUTPUT(); |
| 272 } | 272 } |
| OLD | NEW |