Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // | |
|
Søren Thygesen Gjesse
2010/01/19 22:59:12
You can safely remove this file as using a control
Alexandre
2010/01/22 23:08:42
Removed
On 2010/01/19 22:59:12, Søren Gjesse wrote
| |
| 2 //// FROM ARM code | |
| 3 // | |
| 4 //#include "v8.h" | |
| 5 // | |
| 6 //#include "cfg.h" | |
| 7 //#include "codegen-inl.h" | |
| 8 //#include "codegen-mips.h" // Include after codegen-inl.h. | |
| 9 //#include "macro-assembler-mips.h" | |
| 10 // | |
| 11 //namespace v8 { | |
| 12 //namespace internal { | |
| 13 // | |
| 14 //#define __ ACCESS_MASM(masm) | |
| 15 // | |
| 16 //void InstructionBlock::Compile(MacroAssembler* masm) { | |
| 17 // UNIMPLEMENTED(); | |
| 18 //// ASSERT(!is_marked()); | |
| 19 //// is_marked_ = true; | |
| 20 //// { | |
| 21 //// Comment cmt(masm, "[ InstructionBlock"); | |
| 22 //// for (int i = 0, len = instructions_.length(); i < len; i++) { | |
| 23 //// // If the location of the current instruction is a temp, then the | |
| 24 //// // instruction cannot be in tail position in the block. Allocate the | |
| 25 //// // temp based on peeking ahead to the next instruction. | |
| 26 //// Instruction* instr = instructions_[i]; | |
| 27 //// Location* loc = instr->location(); | |
| 28 //// if (loc->is_temporary()) { | |
| 29 //// instructions_[i+1]->FastAllocate(TempLocation::cast(loc)); | |
| 30 //// } | |
| 31 //// instructions_[i]->Compile(masm); | |
| 32 //// } | |
| 33 //// } | |
| 34 //// successor_->Compile(masm); | |
| 35 //} | |
| 36 //// | |
| 37 //// | |
| 38 //void EntryNode::Compile(MacroAssembler* masm) { | |
| 39 // UNIMPLEMENTED(); | |
| 40 //// ASSERT(!is_marked()); | |
| 41 //// is_marked_ = true; | |
| 42 //// { | |
| 43 //// Comment cmnt(masm, "[ EntryNode"); | |
| 44 //// __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | |
| 45 //// __ add(fp, sp, Operand(2 * kPointerSize)); | |
| 46 //// int count = CfgGlobals::current()->fun()->scope()->num_stack_slots(); | |
| 47 //// if (count > 0) { | |
| 48 //// __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | |
| 49 //// for (int i = 0; i < count; i++) { | |
| 50 //// __ push(ip); | |
| 51 //// } | |
| 52 //// } | |
| 53 //// if (FLAG_trace) { | |
| 54 //// __ CallRuntime(Runtime::kTraceEnter, 0); | |
| 55 //// } | |
| 56 //// if (FLAG_check_stack) { | |
| 57 //// StackCheckStub stub; | |
| 58 //// __ CallStub(&stub); | |
| 59 //// } | |
| 60 //// } | |
| 61 //// successor_->Compile(masm); | |
| 62 //} | |
| 63 //// | |
| 64 //// | |
| 65 //void ExitNode::Compile(MacroAssembler* masm) { | |
| 66 // UNIMPLEMENTED(); | |
| 67 //// ASSERT(!is_marked()); | |
| 68 //// is_marked_ = true; | |
| 69 //// Comment cmnt(masm, "[ ExitNode"); | |
| 70 //// if (FLAG_trace) { | |
| 71 //// __ push(r0); | |
| 72 //// __ CallRuntime(Runtime::kTraceExit, 1); | |
| 73 //// } | |
| 74 //// __ mov(sp, fp); | |
| 75 //// __ ldm(ia_w, sp, fp.bit() | lr.bit()); | |
| 76 //// int count = CfgGlobals::current()->fun()->scope()->num_parameters(); | |
| 77 //// __ add(sp, sp, Operand((count + 1) * kPointerSize)); | |
| 78 //// __ Jump(lr); | |
| 79 //} | |
| 80 //// | |
| 81 //// | |
| 82 //void PropLoadInstr::Compile(MacroAssembler* masm) { | |
| 83 // UNIMPLEMENTED(); | |
| 84 //// // The key should not be on the stack---if it is a compiler-generated | |
| 85 //// // temporary it is in the accumulator. | |
| 86 //// ASSERT(!key()->is_on_stack()); | |
| 87 //// | |
| 88 //// Comment cmnt(masm, "[ Load from Property"); | |
| 89 //// // If the key is known at compile-time we may be able to use a load IC. | |
| 90 //// bool is_keyed_load = true; | |
| 91 //// if (key()->is_constant()) { | |
| 92 //// // Still use the keyed load IC if the key can be parsed as an integer so | |
| 93 //// // we will get into the case that handles [] on string objects. | |
| 94 //// Handle<Object> key_val = Constant::cast(key())->handle(); | |
| 95 //// uint32_t ignored; | |
| 96 //// if (key_val->IsSymbol() && | |
| 97 //// !String::cast(*key_val)->AsArrayIndex(&ignored)) { | |
| 98 //// is_keyed_load = false; | |
| 99 //// } | |
| 100 //// } | |
| 101 //// | |
| 102 //// if (!object()->is_on_stack()) object()->Push(masm); | |
| 103 //// | |
| 104 //// if (is_keyed_load) { | |
| 105 //// key()->Push(masm); | |
| 106 //// Handle<Code> ic(Builtins::builtin(Builtins::KeyedLoadIC_Initialize)); | |
| 107 //// __ Call(ic, RelocInfo::CODE_TARGET); | |
| 108 //// // Discard key and receiver. | |
| 109 //// __ add(sp, sp, Operand(2 * kPointerSize)); | |
| 110 //// } else { | |
| 111 //// key()->Get(masm, r2); | |
| 112 //// Handle<Code> ic(Builtins::builtin(Builtins::LoadIC_Initialize)); | |
| 113 //// __ Call(ic, RelocInfo::CODE_TARGET); | |
| 114 //// __ pop(); // Discard receiver. | |
| 115 //// } | |
| 116 //// location()->Set(masm, r0); | |
| 117 //} | |
| 118 //// | |
| 119 //// | |
| 120 //void BinaryOpInstr::Compile(MacroAssembler* masm) { | |
| 121 // UNIMPLEMENTED(); | |
| 122 //// // The right-hand value should not be on the stack---if it is a | |
| 123 //// // compiler-generated temporary it is in the accumulator. | |
| 124 //// ASSERT(!right()->is_on_stack()); | |
| 125 //// | |
| 126 //// Comment cmnt(masm, "[ BinaryOpInstr"); | |
| 127 //// // We can overwrite one of the operands if it is a temporary. | |
| 128 //// OverwriteMode mode = NO_OVERWRITE; | |
| 129 //// if (left()->is_temporary()) { | |
| 130 //// mode = OVERWRITE_LEFT; | |
| 131 //// } else if (right()->is_temporary()) { | |
| 132 //// mode = OVERWRITE_RIGHT; | |
| 133 //// } | |
| 134 //// | |
| 135 //// // Move left to r1 and right to r0. | |
| 136 //// left()->Get(masm, r1); | |
| 137 //// right()->Get(masm, r0); | |
| 138 //// GenericBinaryOpStub stub(op(), mode); | |
| 139 //// __ CallStub(&stub); | |
| 140 //// location()->Set(masm, r0); | |
| 141 //} | |
| 142 //// | |
| 143 //// | |
| 144 //void ReturnInstr::Compile(MacroAssembler* masm) { | |
| 145 // UNIMPLEMENTED(); | |
| 146 //// // The location should be 'Effect'. As a side effect, move the value to | |
| 147 //// // the accumulator. | |
| 148 //// Comment cmnt(masm, "[ ReturnInstr"); | |
| 149 //// value()->Get(masm, r0); | |
| 150 //} | |
| 151 //// | |
| 152 //// | |
| 153 //void Constant::Get(MacroAssembler* masm, Register reg) { | |
| 154 // UNIMPLEMENTED(); | |
| 155 //// __ mov(reg, Operand(handle_)); | |
| 156 //} | |
| 157 //// | |
| 158 //// | |
| 159 //void Constant::Push(MacroAssembler* masm) { | |
| 160 // UNIMPLEMENTED(); | |
| 161 //// __ mov(ip, Operand(handle_)); | |
| 162 //// __ push(ip); | |
| 163 //} | |
| 164 // | |
| 165 // | |
| 166 ////static MemOperand ToMemOperand(SlotLocation* loc) { | |
| 167 //// UNIMPLEMENTED(); | |
| 168 //// switch (loc->type()) { | |
| 169 //// case Slot::PARAMETER: { | |
| 170 //// int count = CfgGlobals::current()->fun()->scope()->num_parameters(); | |
| 171 //// return MemOperand(fp, (1 + count - loc->index()) * kPointerSize); | |
| 172 //// } | |
| 173 //// case Slot::LOCAL: { | |
| 174 //// const int kOffset = JavaScriptFrameConstants::kLocal0Offset; | |
| 175 //// return MemOperand(fp, kOffset - loc->index() * kPointerSize); | |
| 176 //// } | |
| 177 //// default: | |
| 178 //// UNREACHABLE(); | |
| 179 //// return MemOperand(r0); | |
| 180 //// } | |
| 181 ////} | |
| 182 // | |
| 183 // | |
| 184 //void Constant::MoveToSlot(MacroAssembler* masm, SlotLocation* loc) { | |
| 185 // UNIMPLEMENTED(); | |
| 186 //// __ mov(ip, Operand(handle_)); | |
| 187 //// __ str(ip, ToMemOperand(loc)); | |
| 188 //} | |
| 189 //// | |
| 190 //// | |
| 191 //void SlotLocation::Get(MacroAssembler* masm, Register reg) { | |
| 192 // UNIMPLEMENTED(); | |
| 193 //// __ ldr(reg, ToMemOperand(this)); | |
| 194 //} | |
| 195 //// | |
| 196 //// | |
| 197 //void SlotLocation::Set(MacroAssembler* masm, Register reg) { | |
| 198 // UNIMPLEMENTED(); | |
| 199 //// __ str(reg, ToMemOperand(this)); | |
| 200 //} | |
| 201 //// | |
| 202 //// | |
| 203 //void SlotLocation::Push(MacroAssembler* masm) { | |
| 204 // UNIMPLEMENTED(); | |
| 205 //// __ ldr(ip, ToMemOperand(this)); | |
| 206 //// __ push(ip); // Push will not destroy ip. | |
| 207 //} | |
| 208 //// | |
| 209 //// | |
| 210 //void SlotLocation::Move(MacroAssembler* masm, Value* value) { | |
| 211 // UNIMPLEMENTED(); | |
| 212 //// // Double dispatch. | |
| 213 //// value->MoveToSlot(masm, this); | |
| 214 //} | |
| 215 //// | |
| 216 //// | |
| 217 //void SlotLocation::MoveToSlot(MacroAssembler* masm, SlotLocation* loc) { | |
| 218 // UNIMPLEMENTED(); | |
| 219 //// __ ldr(ip, ToMemOperand(this)); | |
| 220 //// __ str(ip, ToMemOperand(loc)); | |
| 221 //} | |
| 222 //// | |
| 223 //// | |
| 224 //void TempLocation::Get(MacroAssembler* masm, Register reg) { | |
| 225 // UNIMPLEMENTED(); | |
| 226 //// switch (where_) { | |
| 227 //// case ACCUMULATOR: | |
| 228 //// if (!reg.is(r0)) __ mov(reg, r0); | |
| 229 //// break; | |
| 230 //// case STACK: | |
| 231 //// __ pop(reg); | |
| 232 //// break; | |
| 233 //// case NOT_ALLOCATED: | |
| 234 //// UNREACHABLE(); | |
| 235 //// } | |
| 236 //} | |
| 237 //// | |
| 238 //// | |
| 239 //void TempLocation::Set(MacroAssembler* masm, Register reg) { | |
| 240 // UNIMPLEMENTED(); | |
| 241 //// switch (where_) { | |
| 242 //// case ACCUMULATOR: | |
| 243 //// if (!reg.is(r0)) __ mov(r0, reg); | |
| 244 //// break; | |
| 245 //// case STACK: | |
| 246 //// __ push(reg); | |
| 247 //// break; | |
| 248 //// case NOT_ALLOCATED: | |
| 249 //// UNREACHABLE(); | |
| 250 //// } | |
| 251 //} | |
| 252 //// | |
| 253 //// | |
| 254 //void TempLocation::Push(MacroAssembler* masm) { | |
| 255 // UNIMPLEMENTED(); | |
| 256 //// switch (where_) { | |
| 257 //// case ACCUMULATOR: | |
| 258 //// __ push(r0); | |
| 259 //// break; | |
| 260 //// case STACK: | |
| 261 //// case NOT_ALLOCATED: | |
| 262 //// UNREACHABLE(); | |
| 263 //// } | |
| 264 //} | |
| 265 //// | |
| 266 //// | |
| 267 //void TempLocation::Move(MacroAssembler* masm, Value* value) { | |
| 268 // UNIMPLEMENTED(); | |
| 269 //// switch (where_) { | |
| 270 //// case ACCUMULATOR: | |
| 271 //// value->Get(masm, r0); | |
| 272 //// case STACK: | |
| 273 //// value->Push(masm); | |
| 274 //// break; | |
| 275 //// case NOT_ALLOCATED: | |
| 276 //// UNREACHABLE(); | |
| 277 //// } | |
| 278 //} | |
| 279 //// | |
| 280 //// | |
| 281 //void TempLocation::MoveToSlot(MacroAssembler* masm, SlotLocation* loc) { | |
| 282 // UNIMPLEMENTED(); | |
| 283 //// switch (where_) { | |
| 284 //// case ACCUMULATOR: | |
| 285 //// __ str(r0, ToMemOperand(loc)); | |
| 286 //// case STACK: | |
| 287 //// __ pop(ip); | |
| 288 //// __ str(ip, ToMemOperand(loc)); | |
| 289 //// break; | |
| 290 //// case NOT_ALLOCATED: | |
| 291 //// UNREACHABLE(); | |
| 292 //// } | |
| 293 //} | |
| 294 //// | |
| 295 //#undef __ | |
| 296 // | |
| 297 //} } // namespace v8::internal | |
| OLD | NEW |