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

Side by Side Diff: src/x87/assembler-x87.cc

Issue 358363002: Move platform abstraction to base library (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "src/macro-assembler.h" 42 #include "src/macro-assembler.h"
43 #include "src/serialize.h" 43 #include "src/serialize.h"
44 44
45 namespace v8 { 45 namespace v8 {
46 namespace internal { 46 namespace internal {
47 47
48 // ----------------------------------------------------------------------------- 48 // -----------------------------------------------------------------------------
49 // Implementation of CpuFeatures 49 // Implementation of CpuFeatures
50 50
51 void CpuFeatures::ProbeImpl(bool cross_compile) { 51 void CpuFeatures::ProbeImpl(bool cross_compile) {
52 CPU cpu; 52 base::CPU cpu;
53 53
54 // Only use statically determined features for cross compile (snapshot). 54 // Only use statically determined features for cross compile (snapshot).
55 if (cross_compile) return; 55 if (cross_compile) return;
56 } 56 }
57 57
58 58
59 void CpuFeatures::PrintTarget() { } 59 void CpuFeatures::PrintTarget() { }
60 void CpuFeatures::PrintFeatures() { } 60 void CpuFeatures::PrintFeatures() { }
61 61
62 62
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 } 100 }
101 101
102 102
103 void RelocInfo::PatchCode(byte* instructions, int instruction_count) { 103 void RelocInfo::PatchCode(byte* instructions, int instruction_count) {
104 // Patch the code at the current address with the supplied instructions. 104 // Patch the code at the current address with the supplied instructions.
105 for (int i = 0; i < instruction_count; i++) { 105 for (int i = 0; i < instruction_count; i++) {
106 *(pc_ + i) = *(instructions + i); 106 *(pc_ + i) = *(instructions + i);
107 } 107 }
108 108
109 // Indicate that code has changed. 109 // Indicate that code has changed.
110 CPU::FlushICache(pc_, instruction_count); 110 CpuFeatures::FlushICache(pc_, instruction_count);
111 } 111 }
112 112
113 113
114 // Patch the code at the current PC with a call to the target address. 114 // Patch the code at the current PC with a call to the target address.
115 // Additional guard int3 instructions can be added if required. 115 // Additional guard int3 instructions can be added if required.
116 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) { 116 void RelocInfo::PatchCodeWithCall(Address target, int guard_bytes) {
117 // Call instruction takes up 5 bytes and int3 takes up one byte. 117 // Call instruction takes up 5 bytes and int3 takes up one byte.
118 static const int kCallCodeSize = 5; 118 static const int kCallCodeSize = 5;
119 int code_size = kCallCodeSize + guard_bytes; 119 int code_size = kCallCodeSize + guard_bytes;
120 120
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 fprintf(coverage_log, "%s\n", file_line); 2019 fprintf(coverage_log, "%s\n", file_line);
2020 fflush(coverage_log); 2020 fflush(coverage_log);
2021 } 2021 }
2022 } 2022 }
2023 2023
2024 #endif 2024 #endif
2025 2025
2026 } } // namespace v8::internal 2026 } } // namespace v8::internal
2027 2027
2028 #endif // V8_TARGET_ARCH_X87 2028 #endif // V8_TARGET_ARCH_X87
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698