Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/cctest/test-disasm-arm.cc

Issue 1941: Fixed arm disassembler build problems. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/simulator-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/simulator-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698