OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-assembler.h" | 5 #include "src/compiler/code-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 Node* CodeAssembler::WordShr(Node* value, int shift) { | 213 Node* CodeAssembler::WordShr(Node* value, int shift) { |
214 return (shift != 0) ? raw_assembler_->WordShr(value, IntPtrConstant(shift)) | 214 return (shift != 0) ? raw_assembler_->WordShr(value, IntPtrConstant(shift)) |
215 : value; | 215 : value; |
216 } | 216 } |
217 | 217 |
218 Node* CodeAssembler::Word32Shr(Node* value, int shift) { | 218 Node* CodeAssembler::Word32Shr(Node* value, int shift) { |
219 return (shift != 0) ? raw_assembler_->Word32Shr(value, IntPtrConstant(shift)) | 219 return (shift != 0) ? raw_assembler_->Word32Shr(value, IntPtrConstant(shift)) |
220 : value; | 220 : value; |
221 } | 221 } |
222 | 222 |
223 Node* CodeAssembler::IsWordAligned(Node* value) { | |
224 /* return WordNotEqual(IntPtrConstant(0), */ | |
Igor Sheludko
2016/10/18 14:22:18
?
| |
225 /* WordAnd(value, IntPtrConstant((1 << kPointerSizeLog2)-1))); */ | |
226 return WordEqual(value, | |
227 WordShl(WordShr(value, kPointerSizeLog2), kPointerSizeLog2)); | |
228 } | |
229 | |
223 Node* CodeAssembler::ChangeUint32ToWord(Node* value) { | 230 Node* CodeAssembler::ChangeUint32ToWord(Node* value) { |
224 if (raw_assembler_->machine()->Is64()) { | 231 if (raw_assembler_->machine()->Is64()) { |
225 value = raw_assembler_->ChangeUint32ToUint64(value); | 232 value = raw_assembler_->ChangeUint32ToUint64(value); |
226 } | 233 } |
227 return value; | 234 return value; |
228 } | 235 } |
229 | 236 |
230 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) { | 237 Node* CodeAssembler::ChangeInt32ToIntPtr(Node* value) { |
231 if (raw_assembler_->machine()->Is64()) { | 238 if (raw_assembler_->machine()->Is64()) { |
232 value = raw_assembler_->ChangeInt32ToInt64(value); | 239 value = raw_assembler_->ChangeInt32ToInt64(value); |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1117 } | 1124 } |
1118 } | 1125 } |
1119 } | 1126 } |
1120 | 1127 |
1121 bound_ = true; | 1128 bound_ = true; |
1122 } | 1129 } |
1123 | 1130 |
1124 } // namespace compiler | 1131 } // namespace compiler |
1125 } // namespace internal | 1132 } // namespace internal |
1126 } // namespace v8 | 1133 } // namespace v8 |
OLD | NEW |