OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 VirtualFrame::SpilledScope spilled_scope; | 1115 VirtualFrame::SpilledScope spilled_scope; |
1116 ASSERT(has_cc()); | 1116 ASSERT(has_cc()); |
1117 Condition cc = if_true ? cc_reg_ : NegateCondition(cc_reg_); | 1117 Condition cc = if_true ? cc_reg_ : NegateCondition(cc_reg_); |
1118 target->Branch(cc); | 1118 target->Branch(cc); |
1119 cc_reg_ = al; | 1119 cc_reg_ = al; |
1120 } | 1120 } |
1121 | 1121 |
1122 | 1122 |
1123 void CodeGenerator::CheckStack() { | 1123 void CodeGenerator::CheckStack() { |
1124 VirtualFrame::SpilledScope spilled_scope; | 1124 VirtualFrame::SpilledScope spilled_scope; |
1125 if (FLAG_check_stack) { | 1125 Comment cmnt(masm_, "[ check stack"); |
1126 Comment cmnt(masm_, "[ check stack"); | 1126 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
1127 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 1127 // Put the lr setup instruction in the delay slot. kInstrSize is added to |
1128 // Put the lr setup instruction in the delay slot. kInstrSize is added to | 1128 // the implicit 8 byte offset that always applies to operations with pc and |
1129 // the implicit 8 byte offset that always applies to operations with pc and | 1129 // gives a return address 12 bytes down. |
1130 // gives a return address 12 bytes down. | 1130 masm_->add(lr, pc, Operand(Assembler::kInstrSize)); |
1131 masm_->add(lr, pc, Operand(Assembler::kInstrSize)); | 1131 masm_->cmp(sp, Operand(ip)); |
1132 masm_->cmp(sp, Operand(ip)); | 1132 StackCheckStub stub; |
1133 StackCheckStub stub; | 1133 // Call the stub if lower. |
1134 // Call the stub if lower. | 1134 masm_->mov(pc, |
1135 masm_->mov(pc, | 1135 Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()), |
1136 Operand(reinterpret_cast<intptr_t>(stub.GetCode().location()), | 1136 RelocInfo::CODE_TARGET), |
1137 RelocInfo::CODE_TARGET), | 1137 LeaveCC, |
1138 LeaveCC, | 1138 lo); |
1139 lo); | |
1140 } | |
1141 } | 1139 } |
1142 | 1140 |
1143 | 1141 |
1144 void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) { | 1142 void CodeGenerator::VisitStatements(ZoneList<Statement*>* statements) { |
1145 #ifdef DEBUG | 1143 #ifdef DEBUG |
1146 int original_height = frame_->height(); | 1144 int original_height = frame_->height(); |
1147 #endif | 1145 #endif |
1148 VirtualFrame::SpilledScope spilled_scope; | 1146 VirtualFrame::SpilledScope spilled_scope; |
1149 for (int i = 0; frame_ != NULL && i < statements->length(); i++) { | 1147 for (int i = 0; frame_ != NULL && i < statements->length(); i++) { |
1150 VisitAndSpill(statements->at(i)); | 1148 VisitAndSpill(statements->at(i)); |
(...skipping 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6263 int CompareStub::MinorKey() { | 6261 int CompareStub::MinorKey() { |
6264 // Encode the two parameters in a unique 16 bit value. | 6262 // Encode the two parameters in a unique 16 bit value. |
6265 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); | 6263 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); |
6266 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); | 6264 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); |
6267 } | 6265 } |
6268 | 6266 |
6269 | 6267 |
6270 #undef __ | 6268 #undef __ |
6271 | 6269 |
6272 } } // namespace v8::internal | 6270 } } // namespace v8::internal |
OLD | NEW |