OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3209 } | 3209 } |
3210 ASSERT(!tmp.is(no_reg)); | 3210 ASSERT(!tmp.is(no_reg)); |
3211 | 3211 |
3212 for (int i = 0; i < field_count; i++) { | 3212 for (int i = 0; i < field_count; i++) { |
3213 ldr(tmp, FieldMemOperand(src, i * kPointerSize)); | 3213 ldr(tmp, FieldMemOperand(src, i * kPointerSize)); |
3214 str(tmp, FieldMemOperand(dst, i * kPointerSize)); | 3214 str(tmp, FieldMemOperand(dst, i * kPointerSize)); |
3215 } | 3215 } |
3216 } | 3216 } |
3217 | 3217 |
3218 | 3218 |
3219 void MacroAssembler::VFPCopyFields(Register dst, Register src, int field_count, | |
3220 SwVfpRegister first, SwVfpRegister last) { | |
3221 ASSERT(CpuFeatures::IsEnabled(VFP2)); | |
3222 ASSERT_LE(first.code(), last.code()); | |
3223 | |
3224 if (FLAG_debug_code) { | |
3225 tst(dst, Operand(kHeapObjectTag)); | |
3226 tst(src, Operand(kHeapObjectTag), eq); | |
3227 stop("src and dst for VFPCopyFields must be untagged", ne); | |
3228 } | |
3229 | |
3230 int available_words = last.code() - first.code() + 1; | |
3231 while (field_count > 0) { | |
3232 int words_to_copy = Min(field_count, available_words); | |
3233 SwVfpRegister copy_last = | |
3234 SwVfpRegister::from_code(first.code() + words_to_copy - 1); | |
3235 vldm(ia_w, src, first, copy_last); | |
3236 vstm(ia_w, dst, first, copy_last); | |
3237 field_count -= words_to_copy; | |
3238 } | |
3239 } | |
danno
2012/10/30 14:28:59
nit: two spaces
| |
3240 | |
3219 void MacroAssembler::CopyBytes(Register src, | 3241 void MacroAssembler::CopyBytes(Register src, |
3220 Register dst, | 3242 Register dst, |
3221 Register length, | 3243 Register length, |
3222 Register scratch) { | 3244 Register scratch) { |
3223 Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; | 3245 Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; |
3224 | 3246 |
3225 // Align src before copying in word size chunks. | 3247 // Align src before copying in word size chunks. |
3226 bind(&align_loop); | 3248 bind(&align_loop); |
3227 cmp(length, Operand(0)); | 3249 cmp(length, Operand(0)); |
3228 b(eq, &done); | 3250 b(eq, &done); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3867 void CodePatcher::EmitCondition(Condition cond) { | 3889 void CodePatcher::EmitCondition(Condition cond) { |
3868 Instr instr = Assembler::instr_at(masm_.pc_); | 3890 Instr instr = Assembler::instr_at(masm_.pc_); |
3869 instr = (instr & ~kCondMask) | cond; | 3891 instr = (instr & ~kCondMask) | cond; |
3870 masm_.emit(instr); | 3892 masm_.emit(instr); |
3871 } | 3893 } |
3872 | 3894 |
3873 | 3895 |
3874 } } // namespace v8::internal | 3896 } } // namespace v8::internal |
3875 | 3897 |
3876 #endif // V8_TARGET_ARCH_ARM | 3898 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |