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

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

Issue 27267: Experimental: periodic merge from the bleeding edge branch to the code... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
Patch Set: '' Created 11 years, 9 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 | « test/cctest/test-disasm-arm.cc ('k') | test/cctest/test-heap.cc » ('j') | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 #define __ assm. 50 #define __ assm.
51 51
52 52
53 static void DummyStaticFunction(Object* result) { 53 static void DummyStaticFunction(Object* result) {
54 } 54 }
55 55
56 56
57 TEST(DisasmIa320) { 57 TEST(DisasmIa320) {
58 InitializeVM(); 58 InitializeVM();
59 Serializer::disable(); // Needed for Probe when running without snapshot.
60 CpuFeatures::Probe();
61 v8::HandleScope scope; 59 v8::HandleScope scope;
62 v8::internal::byte buffer[1024]; 60 v8::internal::byte buffer[1024];
63 Assembler assm(buffer, sizeof buffer); 61 Assembler assm(buffer, sizeof buffer);
64 DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging) 62 DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging)
65 63
66 // Short immediate instructions 64 // Short immediate instructions
67 __ adc(eax, 12345678); 65 __ adc(eax, 12345678);
68 __ add(Operand(eax), Immediate(12345678)); 66 __ add(Operand(eax), Immediate(12345678));
69 __ or_(eax, 12345678); 67 __ or_(eax, 12345678);
70 __ sub(Operand(eax), Immediate(12345678)); 68 __ sub(Operand(eax), Immediate(12345678));
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 __ mulsd(xmm1, xmm0); 361 __ mulsd(xmm1, xmm0);
364 __ subsd(xmm1, xmm0); 362 __ subsd(xmm1, xmm0);
365 __ divsd(xmm1, xmm0); 363 __ divsd(xmm1, xmm0);
366 __ movdbl(xmm1, Operand(ebx, ecx, times_4, 10000)); 364 __ movdbl(xmm1, Operand(ebx, ecx, times_4, 10000));
367 __ movdbl(Operand(ebx, ecx, times_4, 10000), xmm1); 365 __ movdbl(Operand(ebx, ecx, times_4, 10000), xmm1);
368 } 366 }
369 __ ret(0); 367 __ ret(0);
370 368
371 CodeDesc desc; 369 CodeDesc desc;
372 assm.GetCode(&desc); 370 assm.GetCode(&desc);
373 Object* code = Heap::CreateCode(desc, NULL, Code::ComputeFlags(Code::STUB)); 371 Object* code = Heap::CreateCode(desc,
372 NULL,
373 Code::ComputeFlags(Code::STUB),
374 Handle<Object>(Heap::undefined_value()));
374 CHECK(code->IsCode()); 375 CHECK(code->IsCode());
375 #ifdef DEBUG 376 #ifdef DEBUG
376 Code::cast(code)->Print(); 377 Code::cast(code)->Print();
377 byte* begin = Code::cast(code)->instruction_start(); 378 byte* begin = Code::cast(code)->instruction_start();
378 byte* end = begin + Code::cast(code)->instruction_size(); 379 byte* end = begin + Code::cast(code)->instruction_size();
379 disasm::Disassembler::Disassemble(stdout, begin, end); 380 disasm::Disassembler::Disassemble(stdout, begin, end);
380 #endif 381 #endif
381 } 382 }
382 383
383 #undef __ 384 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-arm.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698