Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 142693005: A64: Synchronize with r16918. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mksnapshot.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3202 matching lines...) Expand 10 before | Expand all | Expand 10 after
3213 lw(tmp, FieldMemOperand(src, i * kPointerSize)); 3213 lw(tmp, FieldMemOperand(src, i * kPointerSize));
3214 sw(tmp, FieldMemOperand(dst, i * kPointerSize)); 3214 sw(tmp, FieldMemOperand(dst, i * kPointerSize));
3215 } 3215 }
3216 } 3216 }
3217 3217
3218 3218
3219 void MacroAssembler::CopyBytes(Register src, 3219 void MacroAssembler::CopyBytes(Register src,
3220 Register dst, 3220 Register dst,
3221 Register length, 3221 Register length,
3222 Register scratch) { 3222 Register scratch) {
3223 Label align_loop, align_loop_1, word_loop, byte_loop, byte_loop_1, done; 3223 Label align_loop_1, word_loop, byte_loop, byte_loop_1, done;
3224 3224
3225 // Align src before copying in word size chunks. 3225 // Align src before copying in word size chunks.
3226 bind(&align_loop); 3226 Branch(&byte_loop, le, length, Operand(kPointerSize));
3227 Branch(&done, eq, length, Operand(zero_reg));
3228 bind(&align_loop_1); 3227 bind(&align_loop_1);
3229 And(scratch, src, kPointerSize - 1); 3228 And(scratch, src, kPointerSize - 1);
3230 Branch(&word_loop, eq, scratch, Operand(zero_reg)); 3229 Branch(&word_loop, eq, scratch, Operand(zero_reg));
3231 lbu(scratch, MemOperand(src)); 3230 lbu(scratch, MemOperand(src));
3232 Addu(src, src, 1); 3231 Addu(src, src, 1);
3233 sb(scratch, MemOperand(dst)); 3232 sb(scratch, MemOperand(dst));
3234 Addu(dst, dst, 1); 3233 Addu(dst, dst, 1);
3235 Subu(length, length, Operand(1)); 3234 Subu(length, length, Operand(1));
3236 Branch(&byte_loop_1, ne, length, Operand(zero_reg)); 3235 Branch(&align_loop_1, ne, length, Operand(zero_reg));
3237 3236
3238 // Copy bytes in word size chunks. 3237 // Copy bytes in word size chunks.
3239 bind(&word_loop); 3238 bind(&word_loop);
3240 if (emit_debug_code()) { 3239 if (emit_debug_code()) {
3241 And(scratch, src, kPointerSize - 1); 3240 And(scratch, src, kPointerSize - 1);
3242 Assert(eq, kExpectingAlignmentForCopyBytes, 3241 Assert(eq, kExpectingAlignmentForCopyBytes,
3243 scratch, Operand(zero_reg)); 3242 scratch, Operand(zero_reg));
3244 } 3243 }
3245 Branch(&byte_loop, lt, length, Operand(kPointerSize)); 3244 Branch(&byte_loop, lt, length, Operand(kPointerSize));
3246 lw(scratch, MemOperand(src)); 3245 lw(scratch, MemOperand(src));
(...skipping 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
5596 ExternalReference new_space_allocation_top = 5595 ExternalReference new_space_allocation_top =
5597 ExternalReference::new_space_allocation_top_address(isolate()); 5596 ExternalReference::new_space_allocation_top_address(isolate());
5598 Addu(scratch_reg, receiver_reg, 5597 Addu(scratch_reg, receiver_reg,
5599 Operand(JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag)); 5598 Operand(JSArray::kSize + AllocationMemento::kSize - kHeapObjectTag));
5600 Branch(&no_memento_available, lt, scratch_reg, Operand(new_space_start)); 5599 Branch(&no_memento_available, lt, scratch_reg, Operand(new_space_start));
5601 li(at, Operand(new_space_allocation_top)); 5600 li(at, Operand(new_space_allocation_top));
5602 lw(at, MemOperand(at)); 5601 lw(at, MemOperand(at));
5603 Branch(&no_memento_available, gt, scratch_reg, Operand(at)); 5602 Branch(&no_memento_available, gt, scratch_reg, Operand(at));
5604 lw(scratch_reg, MemOperand(scratch_reg, -AllocationMemento::kSize)); 5603 lw(scratch_reg, MemOperand(scratch_reg, -AllocationMemento::kSize));
5605 Branch(allocation_memento_present, cond, scratch_reg, 5604 Branch(allocation_memento_present, cond, scratch_reg,
5606 Operand(Handle<Map>(isolate()->heap()->allocation_memento_map()))); 5605 Operand(isolate()->factory()->allocation_memento_map()));
5607 bind(&no_memento_available); 5606 bind(&no_memento_available);
5608 } 5607 }
5609 5608
5610 5609
5611 Register GetRegisterThatIsNotOneOf(Register reg1, 5610 Register GetRegisterThatIsNotOneOf(Register reg1,
5612 Register reg2, 5611 Register reg2,
5613 Register reg3, 5612 Register reg3,
5614 Register reg4, 5613 Register reg4,
5615 Register reg5, 5614 Register reg5,
5616 Register reg6) { 5615 Register reg6) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
5692 opcode == BGTZL); 5691 opcode == BGTZL);
5693 opcode = (cond == eq) ? BEQ : BNE; 5692 opcode = (cond == eq) ? BEQ : BNE;
5694 instr = (instr & ~kOpcodeMask) | opcode; 5693 instr = (instr & ~kOpcodeMask) | opcode;
5695 masm_.emit(instr); 5694 masm_.emit(instr);
5696 } 5695 }
5697 5696
5698 5697
5699 } } // namespace v8::internal 5698 } } // namespace v8::internal
5700 5699
5701 #endif // V8_TARGET_ARCH_MIPS 5700 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.h ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698