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

Side by Side Diff: src/ia32/assembler-ia32.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/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-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 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 EMIT(data); 2914 EMIT(data);
2915 } 2915 }
2916 2916
2917 2917
2918 void Assembler::dd(uint32_t data) { 2918 void Assembler::dd(uint32_t data) {
2919 EnsureSpace ensure_space(this); 2919 EnsureSpace ensure_space(this);
2920 emit(data); 2920 emit(data);
2921 } 2921 }
2922 2922
2923 2923
2924 void Assembler::dq(uint64_t data) {
2925 EnsureSpace ensure_space(this);
2926 emit_q(data);
2927 }
2928
2929
2924 void Assembler::dd(Label* label) { 2930 void Assembler::dd(Label* label) {
2925 EnsureSpace ensure_space(this); 2931 EnsureSpace ensure_space(this);
2926 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); 2932 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
2927 emit_label(label); 2933 emit_label(label);
2928 } 2934 }
2929 2935
2930 2936
2931 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) { 2937 void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
2932 DCHECK(!RelocInfo::IsNone(rmode)); 2938 DCHECK(!RelocInfo::IsNone(rmode));
2933 // Don't record external references unless the heap will be serialized. 2939 // Don't record external references unless the heap will be serialized.
2934 if (rmode == RelocInfo::EXTERNAL_REFERENCE && 2940 if (rmode == RelocInfo::EXTERNAL_REFERENCE &&
2935 !serializer_enabled() && !emit_debug_code()) { 2941 !serializer_enabled() && !emit_debug_code()) {
2936 return; 2942 return;
2937 } 2943 }
2938 RelocInfo rinfo(pc_, rmode, data, NULL); 2944 RelocInfo rinfo(pc_, rmode, data, NULL);
2939 reloc_info_writer.Write(&rinfo); 2945 reloc_info_writer.Write(&rinfo);
2940 } 2946 }
2941 2947
2942 2948
2943 Handle<ConstantPoolArray> Assembler::NewConstantPool(Isolate* isolate) {
2944 // No out-of-line constant pool support.
2945 DCHECK(!FLAG_enable_ool_constant_pool);
2946 return isolate->factory()->empty_constant_pool_array();
2947 }
2948
2949
2950 void Assembler::PopulateConstantPool(ConstantPoolArray* constant_pool) {
2951 // No out-of-line constant pool support.
2952 DCHECK(!FLAG_enable_ool_constant_pool);
2953 return;
2954 }
2955
2956
2957 #ifdef GENERATED_CODE_COVERAGE 2949 #ifdef GENERATED_CODE_COVERAGE
2958 static FILE* coverage_log = NULL; 2950 static FILE* coverage_log = NULL;
2959 2951
2960 2952
2961 static void InitCoverageLog() { 2953 static void InitCoverageLog() {
2962 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG"); 2954 char* file_name = getenv("V8_GENERATED_CODE_COVERAGE_LOG");
2963 if (file_name != NULL) { 2955 if (file_name != NULL) {
2964 coverage_log = fopen(file_name, "aw+"); 2956 coverage_log = fopen(file_name, "aw+");
2965 } 2957 }
2966 } 2958 }
2967 2959
2968 2960
2969 void LogGeneratedCodeCoverage(const char* file_line) { 2961 void LogGeneratedCodeCoverage(const char* file_line) {
2970 const char* return_address = (&file_line)[-1]; 2962 const char* return_address = (&file_line)[-1];
2971 char* push_insn = const_cast<char*>(return_address - 12); 2963 char* push_insn = const_cast<char*>(return_address - 12);
2972 push_insn[0] = 0xeb; // Relative branch insn. 2964 push_insn[0] = 0xeb; // Relative branch insn.
2973 push_insn[1] = 13; // Skip over coverage insns. 2965 push_insn[1] = 13; // Skip over coverage insns.
2974 if (coverage_log != NULL) { 2966 if (coverage_log != NULL) {
2975 fprintf(coverage_log, "%s\n", file_line); 2967 fprintf(coverage_log, "%s\n", file_line);
2976 fflush(coverage_log); 2968 fflush(coverage_log);
2977 } 2969 }
2978 } 2970 }
2979 2971
2980 #endif 2972 #endif
2981 2973
2982 } // namespace internal 2974 } // namespace internal
2983 } // namespace v8 2975 } // namespace v8
2984 2976
2985 #endif // V8_TARGET_ARCH_IA32 2977 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/assembler-ia32-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698