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

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

Issue 149403003: A64: Synchronize with r19234. (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/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.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 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 } 1556 }
1557 1557
1558 1558
1559 void MacroAssembler::Branch(Label* L, Condition cond, Register rs, 1559 void MacroAssembler::Branch(Label* L, Condition cond, Register rs,
1560 const Operand& rt, 1560 const Operand& rt,
1561 BranchDelaySlot bdslot) { 1561 BranchDelaySlot bdslot) {
1562 if (L->is_bound()) { 1562 if (L->is_bound()) {
1563 if (is_near(L)) { 1563 if (is_near(L)) {
1564 BranchShort(L, cond, rs, rt, bdslot); 1564 BranchShort(L, cond, rs, rt, bdslot);
1565 } else { 1565 } else {
1566 Label skip; 1566 if (cond != cc_always) {
1567 Condition neg_cond = NegateCondition(cond); 1567 Label skip;
1568 BranchShort(&skip, neg_cond, rs, rt); 1568 Condition neg_cond = NegateCondition(cond);
1569 Jr(L, bdslot); 1569 BranchShort(&skip, neg_cond, rs, rt);
1570 bind(&skip); 1570 Jr(L, bdslot);
1571 bind(&skip);
1572 } else {
1573 Jr(L, bdslot);
1574 }
1571 } 1575 }
1572 } else { 1576 } else {
1573 if (is_trampoline_emitted()) { 1577 if (is_trampoline_emitted()) {
1574 Label skip; 1578 if (cond != cc_always) {
1575 Condition neg_cond = NegateCondition(cond); 1579 Label skip;
1576 BranchShort(&skip, neg_cond, rs, rt); 1580 Condition neg_cond = NegateCondition(cond);
1577 Jr(L, bdslot); 1581 BranchShort(&skip, neg_cond, rs, rt);
1578 bind(&skip); 1582 Jr(L, bdslot);
1583 bind(&skip);
1584 } else {
1585 Jr(L, bdslot);
1586 }
1579 } else { 1587 } else {
1580 BranchShort(L, cond, rs, rt, bdslot); 1588 BranchShort(L, cond, rs, rt, bdslot);
1581 } 1589 }
1582 } 1590 }
1583 } 1591 }
1584 1592
1585 1593
1586 void MacroAssembler::Branch(Label* L, 1594 void MacroAssembler::Branch(Label* L,
1587 Condition cond, 1595 Condition cond,
1588 Register rs, 1596 Register rs,
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after
3424 jmp(&done); 3432 jmp(&done);
3425 3433
3426 bind(&maybe_nan); 3434 bind(&maybe_nan);
3427 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise 3435 // Could be NaN or Infinity. If fraction is not zero, it's NaN, otherwise
3428 // it's an Infinity, and the non-NaN code path applies. 3436 // it's an Infinity, and the non-NaN code path applies.
3429 Branch(&is_nan, gt, exponent_reg, Operand(scratch1)); 3437 Branch(&is_nan, gt, exponent_reg, Operand(scratch1));
3430 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset)); 3438 lw(mantissa_reg, FieldMemOperand(value_reg, HeapNumber::kMantissaOffset));
3431 Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg)); 3439 Branch(&have_double_value, eq, mantissa_reg, Operand(zero_reg));
3432 bind(&is_nan); 3440 bind(&is_nan);
3433 // Load canonical NaN for storing into the double array. 3441 // Load canonical NaN for storing into the double array.
3434 uint64_t nan_int64 = BitCast<uint64_t>( 3442 LoadRoot(at, Heap::kNanValueRootIndex);
3435 FixedDoubleArray::canonical_not_the_hole_nan_as_double()); 3443 lw(mantissa_reg, FieldMemOperand(at, HeapNumber::kMantissaOffset));
3436 li(mantissa_reg, Operand(static_cast<uint32_t>(nan_int64))); 3444 lw(exponent_reg, FieldMemOperand(at, HeapNumber::kExponentOffset));
3437 li(exponent_reg, Operand(static_cast<uint32_t>(nan_int64 >> 32)));
3438 jmp(&have_double_value); 3445 jmp(&have_double_value);
3439 3446
3440 bind(&smi_value); 3447 bind(&smi_value);
3441 Addu(scratch1, elements_reg, 3448 Addu(scratch1, elements_reg,
3442 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag - 3449 Operand(FixedDoubleArray::kHeaderSize - kHeapObjectTag -
3443 elements_offset)); 3450 elements_offset));
3444 sll(scratch2, key_reg, kDoubleSizeLog2 - kSmiTagSize); 3451 sll(scratch2, key_reg, kDoubleSizeLog2 - kSmiTagSize);
3445 Addu(scratch1, scratch1, scratch2); 3452 Addu(scratch1, scratch1, scratch2);
3446 // scratch1 is now effective address of the double element 3453 // scratch1 is now effective address of the double element
3447 3454
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after
5743 opcode == BGTZL); 5750 opcode == BGTZL);
5744 opcode = (cond == eq) ? BEQ : BNE; 5751 opcode = (cond == eq) ? BEQ : BNE;
5745 instr = (instr & ~kOpcodeMask) | opcode; 5752 instr = (instr & ~kOpcodeMask) | opcode;
5746 masm_.emit(instr); 5753 masm_.emit(instr);
5747 } 5754 }
5748 5755
5749 5756
5750 } } // namespace v8::internal 5757 } } // namespace v8::internal
5751 5758
5752 #endif // V8_TARGET_ARCH_MIPS 5759 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips/stub-cache-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698