| OLD | NEW |
| 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 Condition cond) { | 290 Condition cond) { |
| 291 if (!src2.is_reg() && | 291 if (!src2.is_reg() && |
| 292 !src2.must_use_constant_pool() && | 292 !src2.must_use_constant_pool() && |
| 293 src2.immediate() == 0) { | 293 src2.immediate() == 0) { |
| 294 mov(dst, Operand(0, RelocInfo::NONE), LeaveCC, cond); | 294 mov(dst, Operand(0, RelocInfo::NONE), LeaveCC, cond); |
| 295 | 295 |
| 296 } else if (!src2.is_single_instruction() && | 296 } else if (!src2.is_single_instruction() && |
| 297 !src2.must_use_constant_pool() && | 297 !src2.must_use_constant_pool() && |
| 298 CpuFeatures::IsSupported(ARMv7) && | 298 CpuFeatures::IsSupported(ARMv7) && |
| 299 IsPowerOf2(src2.immediate() + 1)) { | 299 IsPowerOf2(src2.immediate() + 1)) { |
| 300 ubfx(dst, src1, 0, | 300 ubfx(dst, src1, 0, WhichPowerOf2(src2.immediate() + 1), cond); |
| 301 WhichPowerOf2(static_cast<uint32_t>(src2.immediate()) + 1), cond); | |
| 302 | 301 |
| 303 } else { | 302 } else { |
| 304 and_(dst, src1, src2, LeaveCC, cond); | 303 and_(dst, src1, src2, LeaveCC, cond); |
| 305 } | 304 } |
| 306 } | 305 } |
| 307 | 306 |
| 308 | 307 |
| 309 void MacroAssembler::Ubfx(Register dst, Register src1, int lsb, int width, | 308 void MacroAssembler::Ubfx(Register dst, Register src1, int lsb, int width, |
| 310 Condition cond) { | 309 Condition cond) { |
| 311 ASSERT(lsb < 32); | 310 ASSERT(lsb < 32); |
| (...skipping 2615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2927 void CodePatcher::EmitCondition(Condition cond) { | 2926 void CodePatcher::EmitCondition(Condition cond) { |
| 2928 Instr instr = Assembler::instr_at(masm_.pc_); | 2927 Instr instr = Assembler::instr_at(masm_.pc_); |
| 2929 instr = (instr & ~kCondMask) | cond; | 2928 instr = (instr & ~kCondMask) | cond; |
| 2930 masm_.emit(instr); | 2929 masm_.emit(instr); |
| 2931 } | 2930 } |
| 2932 | 2931 |
| 2933 | 2932 |
| 2934 } } // namespace v8::internal | 2933 } } // namespace v8::internal |
| 2935 | 2934 |
| 2936 #endif // V8_TARGET_ARCH_ARM | 2935 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |