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 2939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2950 b(eq, &done); | 2950 b(eq, &done); |
2951 bind(&byte_loop_1); | 2951 bind(&byte_loop_1); |
2952 ldrb(scratch, MemOperand(src, 1, PostIndex)); | 2952 ldrb(scratch, MemOperand(src, 1, PostIndex)); |
2953 strb(scratch, MemOperand(dst, 1, PostIndex)); | 2953 strb(scratch, MemOperand(dst, 1, PostIndex)); |
2954 sub(length, length, Operand(1), SetCC); | 2954 sub(length, length, Operand(1), SetCC); |
2955 b(ne, &byte_loop_1); | 2955 b(ne, &byte_loop_1); |
2956 bind(&done); | 2956 bind(&done); |
2957 } | 2957 } |
2958 | 2958 |
2959 | 2959 |
| 2960 void MacroAssembler::InitializeFieldsWithFiller(Register start_offset, |
| 2961 Register end_offset, |
| 2962 Register filler) { |
| 2963 Label loop, entry; |
| 2964 b(&entry); |
| 2965 bind(&loop); |
| 2966 str(filler, MemOperand(start_offset, kPointerSize, PostIndex)); |
| 2967 bind(&entry); |
| 2968 cmp(start_offset, end_offset); |
| 2969 b(lt, &loop); |
| 2970 } |
| 2971 |
| 2972 |
2960 void MacroAssembler::CountLeadingZeros(Register zeros, // Answer. | 2973 void MacroAssembler::CountLeadingZeros(Register zeros, // Answer. |
2961 Register source, // Input. | 2974 Register source, // Input. |
2962 Register scratch) { | 2975 Register scratch) { |
2963 ASSERT(!zeros.is(source) || !source.is(scratch)); | 2976 ASSERT(!zeros.is(source) || !source.is(scratch)); |
2964 ASSERT(!zeros.is(scratch)); | 2977 ASSERT(!zeros.is(scratch)); |
2965 ASSERT(!scratch.is(ip)); | 2978 ASSERT(!scratch.is(ip)); |
2966 ASSERT(!source.is(ip)); | 2979 ASSERT(!source.is(ip)); |
2967 ASSERT(!zeros.is(ip)); | 2980 ASSERT(!zeros.is(ip)); |
2968 #ifdef CAN_USE_ARMV5_INSTRUCTIONS | 2981 #ifdef CAN_USE_ARMV5_INSTRUCTIONS |
2969 clz(zeros, source); // This instruction is only supported after ARM5. | 2982 clz(zeros, source); // This instruction is only supported after ARM5. |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3297 void CodePatcher::EmitCondition(Condition cond) { | 3310 void CodePatcher::EmitCondition(Condition cond) { |
3298 Instr instr = Assembler::instr_at(masm_.pc_); | 3311 Instr instr = Assembler::instr_at(masm_.pc_); |
3299 instr = (instr & ~kCondMask) | cond; | 3312 instr = (instr & ~kCondMask) | cond; |
3300 masm_.emit(instr); | 3313 masm_.emit(instr); |
3301 } | 3314 } |
3302 | 3315 |
3303 | 3316 |
3304 } } // namespace v8::internal | 3317 } } // namespace v8::internal |
3305 | 3318 |
3306 #endif // V8_TARGET_ARCH_ARM | 3319 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |