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

Side by Side Diff: src/mips/cpu-mips.cc

Issue 258993002: Simplified CPU/CpuFeatures a bit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 29 matching lines...) Expand all
40 40
41 #include "cpu.h" 41 #include "cpu.h"
42 #include "macro-assembler.h" 42 #include "macro-assembler.h"
43 43
44 #include "simulator.h" // For cache flushing. 44 #include "simulator.h" // For cache flushing.
45 45
46 namespace v8 { 46 namespace v8 {
47 namespace internal { 47 namespace internal {
48 48
49 49
50 void CPU::SetUp() {
51 CpuFeatures::Probe();
52 }
53
54
55 bool CPU::SupportsCrankshaft() {
56 return CpuFeatures::IsSupported(FPU);
57 }
58
59
60 void CPU::FlushICache(void* start, size_t size) { 50 void CPU::FlushICache(void* start, size_t size) {
61 // Nothing to do, flushing no instructions. 51 // Nothing to do, flushing no instructions.
62 if (size == 0) { 52 if (size == 0) {
63 return; 53 return;
64 } 54 }
65 55
66 #if !defined (USE_SIMULATOR) 56 #if !defined (USE_SIMULATOR)
67 #if defined(ANDROID) 57 #if defined(ANDROID)
68 // Bionic cacheflush can typically run in userland, avoiding kernel call. 58 // Bionic cacheflush can typically run in userland, avoiding kernel call.
69 char *end = reinterpret_cast<char *>(start) + size; 59 char *end = reinterpret_cast<char *>(start) + size;
(...skipping 13 matching lines...) Expand all
83 // that the Icache was flushed. 73 // that the Icache was flushed.
84 // None of this code ends up in the snapshot so there are no issues 74 // None of this code ends up in the snapshot so there are no issues
85 // around whether or not to generate the code when building snapshots. 75 // around whether or not to generate the code when building snapshots.
86 Simulator::FlushICache(Isolate::Current()->simulator_i_cache(), start, size); 76 Simulator::FlushICache(Isolate::Current()->simulator_i_cache(), start, size);
87 #endif // USE_SIMULATOR. 77 #endif // USE_SIMULATOR.
88 } 78 }
89 79
90 } } // namespace v8::internal 80 } } // namespace v8::internal
91 81
92 #endif // V8_TARGET_ARCH_MIPS 82 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« src/arm/assembler-arm.cc ('K') | « src/mips/assembler-mips.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698