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 3144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3155 } | 3155 } |
3156 ASSERT(!tmp.is(no_reg)); | 3156 ASSERT(!tmp.is(no_reg)); |
3157 | 3157 |
3158 for (int i = 0; i < field_count; i++) { | 3158 for (int i = 0; i < field_count; i++) { |
3159 ldr(tmp, FieldMemOperand(src, i * kPointerSize)); | 3159 ldr(tmp, FieldMemOperand(src, i * kPointerSize)); |
3160 str(tmp, FieldMemOperand(dst, i * kPointerSize)); | 3160 str(tmp, FieldMemOperand(dst, i * kPointerSize)); |
3161 } | 3161 } |
3162 } | 3162 } |
3163 | 3163 |
3164 | 3164 |
3165 void MacroAssembler::VFPCopyFields(Register dst, Register src, int field_count, | |
3166 SwVfpRegister first, SwVfpRegister last) { | |
3167 ASSERT(CpuFeatures::IsEnabled(VFP2)); | |
3168 ASSERT_LE(first.code(), last.code()); | |
danno
2012/10/29 15:29:24
In debug mode, can you please actually verify in g
| |
3169 int available_words = last.code() - first.code() + 1; | |
3170 | |
3171 while (field_count > 0) { | |
3172 int words_to_copy = Min(field_count, available_words); | |
3173 SwVfpRegister copy_last = | |
3174 SwVfpRegister::from_code(first.code() + words_to_copy - 1); | |
3175 vldm(ia_w, src, first, copy_last); | |
3176 vstm(ia_w, dst, first, copy_last); | |
3177 field_count -= words_to_copy; | |
3178 } | |
3179 } | |
3180 | |
3165 void MacroAssembler::CopyBytes(Register src, | 3181 void MacroAssembler::CopyBytes(Register src, |
3166 Register dst, | 3182 Register dst, |
3167 Register length, | 3183 Register length, |
3168 Register scratch) { | 3184 Register scratch) { |
3169 Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; | 3185 Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; |
3170 | 3186 |
3171 // Align src before copying in word size chunks. | 3187 // Align src before copying in word size chunks. |
3172 bind(&align_loop); | 3188 bind(&align_loop); |
3173 cmp(length, Operand(0)); | 3189 cmp(length, Operand(0)); |
3174 b(eq, &done); | 3190 b(eq, &done); |
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3838 void CodePatcher::EmitCondition(Condition cond) { | 3854 void CodePatcher::EmitCondition(Condition cond) { |
3839 Instr instr = Assembler::instr_at(masm_.pc_); | 3855 Instr instr = Assembler::instr_at(masm_.pc_); |
3840 instr = (instr & ~kCondMask) | cond; | 3856 instr = (instr & ~kCondMask) | cond; |
3841 masm_.emit(instr); | 3857 masm_.emit(instr); |
3842 } | 3858 } |
3843 | 3859 |
3844 | 3860 |
3845 } } // namespace v8::internal | 3861 } } // namespace v8::internal |
3846 | 3862 |
3847 #endif // V8_TARGET_ARCH_ARM | 3863 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |