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

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 6771052: Fix non-ia32 build. (Closed)
Patch Set: lint fix Created 9 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
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/regexp-macro-assembler-arm.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 21 matching lines...) Expand all
32 #if defined(V8_TARGET_ARCH_ARM) 32 #if defined(V8_TARGET_ARCH_ARM)
33 33
34 #include "bootstrapper.h" 34 #include "bootstrapper.h"
35 #include "codegen-inl.h" 35 #include "codegen-inl.h"
36 #include "debug.h" 36 #include "debug.h"
37 #include "runtime.h" 37 #include "runtime.h"
38 38
39 namespace v8 { 39 namespace v8 {
40 namespace internal { 40 namespace internal {
41 41
42 MacroAssembler::MacroAssembler(void* buffer, int size) 42 MacroAssembler::MacroAssembler(Isolate* arg_isolate, void* buffer, int size)
43 : Assembler(Isolate::Current(), buffer, size), 43 : Assembler(arg_isolate, buffer, size),
44 generating_stub_(false), 44 generating_stub_(false),
45 allow_stub_calls_(true), 45 allow_stub_calls_(true) {
46 code_object_(isolate()->heap()->undefined_value()) { 46 if (isolate() != NULL) {
47 code_object_ = Handle<Object>(isolate()->heap()->undefined_value(),
48 isolate());
49 }
47 } 50 }
48 51
49 52
50 // We always generate arm code, never thumb code, even if V8 is compiled to 53 // We always generate arm code, never thumb code, even if V8 is compiled to
51 // thumb, so we require inter-working support 54 // thumb, so we require inter-working support
52 #if defined(__thumb__) && !defined(USE_THUMB_INTERWORK) 55 #if defined(__thumb__) && !defined(USE_THUMB_INTERWORK)
53 #error "flag -mthumb-interwork missing" 56 #error "flag -mthumb-interwork missing"
54 #endif 57 #endif
55 58
56 59
(...skipping 2832 matching lines...) Expand 10 before | Expand all | Expand 10 after
2889 and_(result, result, Operand(kLdrOffsetMask)); 2892 and_(result, result, Operand(kLdrOffsetMask));
2890 add(result, ldr_location, Operand(result)); 2893 add(result, ldr_location, Operand(result));
2891 add(result, result, Operand(kPCRegOffset)); 2894 add(result, result, Operand(kPCRegOffset));
2892 } 2895 }
2893 2896
2894 2897
2895 CodePatcher::CodePatcher(byte* address, int instructions) 2898 CodePatcher::CodePatcher(byte* address, int instructions)
2896 : address_(address), 2899 : address_(address),
2897 instructions_(instructions), 2900 instructions_(instructions),
2898 size_(instructions * Assembler::kInstrSize), 2901 size_(instructions * Assembler::kInstrSize),
2899 masm_(address, size_ + Assembler::kGap) { 2902 masm_(Isolate::Current(), address, size_ + Assembler::kGap) {
2900 // Create a new macro assembler pointing to the address of the code to patch. 2903 // Create a new macro assembler pointing to the address of the code to patch.
2901 // The size is adjusted with kGap on order for the assembler to generate size 2904 // The size is adjusted with kGap on order for the assembler to generate size
2902 // bytes of instructions without failing with buffer size constraints. 2905 // bytes of instructions without failing with buffer size constraints.
2903 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2906 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2904 } 2907 }
2905 2908
2906 2909
2907 CodePatcher::~CodePatcher() { 2910 CodePatcher::~CodePatcher() {
2908 // Indicate that code has changed. 2911 // Indicate that code has changed.
2909 CPU::FlushICache(address_, size_); 2912 CPU::FlushICache(address_, size_);
(...skipping 17 matching lines...) Expand all
2927 void CodePatcher::EmitCondition(Condition cond) { 2930 void CodePatcher::EmitCondition(Condition cond) {
2928 Instr instr = Assembler::instr_at(masm_.pc_); 2931 Instr instr = Assembler::instr_at(masm_.pc_);
2929 instr = (instr & ~kCondMask) | cond; 2932 instr = (instr & ~kCondMask) | cond;
2930 masm_.emit(instr); 2933 masm_.emit(instr);
2931 } 2934 }
2932 2935
2933 2936
2934 } } // namespace v8::internal 2937 } } // namespace v8::internal
2935 2938
2936 #endif // V8_TARGET_ARCH_ARM 2939 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm/regexp-macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698