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

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

Issue 1131783003: Embedded constant pools. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix debug-mode Arm issue. Created 5 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
« no previous file with comments | « src/x87/assembler-x87.h ('k') | src/x87/assembler-x87-inl.h » ('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 (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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after
2021 EMIT(data); 2021 EMIT(data);
2022 } 2022 }
2023 2023
2024 2024
2025 void Assembler::dd(uint32_t data) { 2025 void Assembler::dd(uint32_t data) {
2026 EnsureSpace ensure_space(this); 2026 EnsureSpace ensure_space(this);
2027 emit(data); 2027 emit(data);
2028 } 2028 }
2029 2029
2030 2030
2031 void Assembler::dq(uint64_t data) {
2032 EnsureSpace ensure_space(this);
2033 emit_q(data);
2034 }
2035
2036
2031 void Assembler::dd(Label* label) { 2037 void Assembler::dd(Label* label) {
2032 EnsureSpace ensure_space(this); 2038 EnsureSpace ensure_space(this);
2033 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); 2039 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
2034 emit_label(label); 2040 emit_label(label);
2035 } 2041 }
2036 2042
2037 2043
2038 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 2044 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2039 DCHECK(!RelocInfo::IsNone(rmode)); 2045 DCHECK(!RelocInfo::IsNone(rmode));
2040 // Don't record external references unless the heap will be serialized. 2046 // Don't record external references unless the heap will be serialized.
2041 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 2047 if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
2042 !serializer_enabled() && !emit_debug_code()) { 2048 !serializer_enabled() && !emit_debug_code()) {
2043 return; 2049 return;
2044 } 2050 }
2045 RelocInfo rinfo(pc_, rmode, data, NULL); 2051 RelocInfo rinfo(pc_, rmode, data, NULL);
2046 reloc_info_writer.Write(&rinfo); 2052 reloc_info_writer.Write(&rinfo);
2047 } 2053 }
2048 2054
2049 2055
2050 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) {
2051 // No out-of-line constant pool support.
2052 DCHECK(!FLAG_enable_ool_constant_pool);
2053 return isolate->factory()->empty_constant_pool_array();
2054 }
2055
2056
2057 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2058 // No out-of-line constant pool support.
2059 DCHECK(!FLAG_enable_ool_constant_pool);
2060 return;
2061 }
2062
2063
2064 #ifdef GENERATED_CODE_COVERAGE 2056 #ifdef GENERATED_CODE_COVERAGE
2065 static FILE* coverage_log = NULL; 2057 static FILE* coverage_log = NULL;
2066 2058
2067 2059
2068 static void InitCoverageLog() { 2060 static void InitCoverageLog() {
2069 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG"); 2061 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
2070 if (file_name != NULL) { 2062 if (file_name != NULL) {
2071 coverage_log = fopen(file_name, "aw+"); 2063 coverage_log = fopen(file_name, "aw+");
2072 } 2064 }
2073 } 2065 }
2074 2066
2075 2067
2076 void LogGeneratedCodeCoverage(const char* file_line) { 2068 void LogGeneratedCodeCoverage(const char* file_line) {
2077 const char* return_address = (&file_line)[-1]; 2069 const char* return_address = (&file_line)[-1];
2078 char* push_insn = const_cast<char*>(return_address - 12); 2070 char* push_insn = const_cast<char*>(return_address - 12);
2079 push_insn[0] = 0xeb; // Relative branch insn. 2071 push_insn[0] = 0xeb; // Relative branch insn.
2080 push_insn[1] = 13; // Skip over coverage insns. 2072 push_insn[1] = 13; // Skip over coverage insns.
2081 if (coverage_log != NULL) { 2073 if (coverage_log != NULL) {
2082 fprintf(coverage_log, "%s\n", file_line); 2074 fprintf(coverage_log, "%s\n", file_line);
2083 fflush(coverage_log); 2075 fflush(coverage_log);
2084 } 2076 }
2085 } 2077 }
2086 2078
2087 #endif 2079 #endif
2088 2080
2089 } // namespace internal 2081 } // namespace internal
2090 } // namespace v8 2082 } // namespace v8
2091 2083
2092 #endif // V8_TARGET_ARCH_X87 2084 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/assembler-x87.h ('k') | src/x87/assembler-x87-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698