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

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

Issue 16337005: Deprecate FACTORY helper macro. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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-dictionary.cc ('k') | test/cctest/test-func-name-inference.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 Assembler assm(isolate, buffer, sizeof buffer); 54 Assembler assm(isolate, buffer, sizeof buffer);
55 DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging) 55 DummyStaticFunction(NULL); // just bloody use it (DELETE; debugging)
56 56
57 // Short immediate instructions 57 // Short immediate instructions
58 __ adc(eax, 12345678); 58 __ adc(eax, 12345678);
59 __ add(eax, Immediate(12345678)); 59 __ add(eax, Immediate(12345678));
60 __ or_(eax, 12345678); 60 __ or_(eax, 12345678);
61 __ sub(eax, Immediate(12345678)); 61 __ sub(eax, Immediate(12345678));
62 __ xor_(eax, 12345678); 62 __ xor_(eax, 12345678);
63 __ and_(eax, 12345678); 63 __ and_(eax, 12345678);
64 Handle<FixedArray> foo = FACTORY->NewFixedArray(10, TENURED); 64 Handle<FixedArray> foo = isolate->factory()->NewFixedArray(10, TENURED);
65 __ cmp(eax, foo); 65 __ cmp(eax, foo);
66 66
67 // ---- This one caused crash 67 // ---- This one caused crash
68 __ mov(ebx, Operand(esp, ecx, times_2, 0)); // [esp+ecx*4] 68 __ mov(ebx, Operand(esp, ecx, times_2, 0)); // [esp+ecx*4]
69 69
70 // ---- All instructions that I can think of 70 // ---- All instructions that I can think of
71 __ add(edx, ebx); 71 __ add(edx, ebx);
72 __ add(edx, Operand(12, RelocInfo::NONE32)); 72 __ add(edx, Operand(12, RelocInfo::NONE32));
73 __ add(edx, Operand(ebx, 0)); 73 __ add(edx, Operand(ebx, 0));
74 __ add(edx, Operand(ebx, 16)); 74 __ add(edx, Operand(ebx, 16));
(...skipping 10 matching lines...) Expand all
85 __ add(ebx, Immediate(12)); 85 __ add(ebx, Immediate(12));
86 __ nop(); 86 __ nop();
87 __ adc(ecx, 12); 87 __ adc(ecx, 12);
88 __ adc(ecx, 1000); 88 __ adc(ecx, 1000);
89 __ nop(); 89 __ nop();
90 __ and_(edx, 3); 90 __ and_(edx, 3);
91 __ and_(edx, Operand(esp, 4)); 91 __ and_(edx, Operand(esp, 4));
92 __ cmp(edx, 3); 92 __ cmp(edx, 3);
93 __ cmp(edx, Operand(esp, 4)); 93 __ cmp(edx, Operand(esp, 4));
94 __ cmp(Operand(ebp, ecx, times_4, 0), Immediate(1000)); 94 __ cmp(Operand(ebp, ecx, times_4, 0), Immediate(1000));
95 Handle<FixedArray> foo2 = FACTORY->NewFixedArray(10, TENURED); 95 Handle<FixedArray> foo2 = isolate->factory()->NewFixedArray(10, TENURED);
96 __ cmp(ebx, foo2); 96 __ cmp(ebx, foo2);
97 __ cmpb(ebx, Operand(ebp, ecx, times_2, 0)); 97 __ cmpb(ebx, Operand(ebp, ecx, times_2, 0));
98 __ cmpb(Operand(ebp, ecx, times_2, 0), ebx); 98 __ cmpb(Operand(ebp, ecx, times_2, 0), ebx);
99 __ or_(edx, 3); 99 __ or_(edx, 3);
100 __ xor_(edx, 3); 100 __ xor_(edx, 3);
101 __ nop(); 101 __ nop();
102 { 102 {
103 CHECK(CpuFeatures::IsSupported(CPUID)); 103 CHECK(CpuFeatures::IsSupported(CPUID));
104 CpuFeatureScope fscope(&assm, CPUID); 104 CpuFeatureScope fscope(&assm, CPUID);
105 __ cpuid(); 105 __ cpuid();
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 CHECK(code->IsCode()); 457 CHECK(code->IsCode());
458 #ifdef OBJECT_PRINT 458 #ifdef OBJECT_PRINT
459 Code::cast(code)->Print(); 459 Code::cast(code)->Print();
460 byte* begin = Code::cast(code)->instruction_start(); 460 byte* begin = Code::cast(code)->instruction_start();
461 byte* end = begin + Code::cast(code)->instruction_size(); 461 byte* end = begin + Code::cast(code)->instruction_size();
462 disasm::Disassembler::Disassemble(stdout, begin, end); 462 disasm::Disassembler::Disassemble(stdout, begin, end);
463 #endif 463 #endif
464 } 464 }
465 465
466 #undef __ 466 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-func-name-inference.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698