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

Side by Side Diff: src/a64/macro-assembler-a64-inl.h

Issue 194473005: A64: Rename k<Y>RegSize to k<Y>RegSizeInBits, and k<Y>RegSizeInBytes to k<Y>RegSize. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/a64/macro-assembler-a64.cc ('k') | src/a64/regexp-macro-assembler-a64.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 if ((fd.Is64Bits() && IsImmFP64(imm)) || 740 if ((fd.Is64Bits() && IsImmFP64(imm)) ||
741 (fd.Is32Bits() && IsImmFP32(imm)) || 741 (fd.Is32Bits() && IsImmFP32(imm)) ||
742 ((imm == 0.0) && (copysign(1.0, imm) == 1.0))) { 742 ((imm == 0.0) && (copysign(1.0, imm) == 1.0))) {
743 // These cases can be handled by the Assembler. 743 // These cases can be handled by the Assembler.
744 fmov(fd, imm); 744 fmov(fd, imm);
745 } else { 745 } else {
746 UseScratchRegisterScope temps(this); 746 UseScratchRegisterScope temps(this);
747 // TODO(all): The Assembler would try to relocate the immediate with 747 // TODO(all): The Assembler would try to relocate the immediate with
748 // Assembler::ldr(const FPRegister& ft, double imm) but it is not 748 // Assembler::ldr(const FPRegister& ft, double imm) but it is not
749 // implemented yet. 749 // implemented yet.
750 if (fd.SizeInBits() == kDRegSize) { 750 if (fd.SizeInBits() == kDRegSizeInBits) {
751 Register tmp = temps.AcquireX(); 751 Register tmp = temps.AcquireX();
752 Mov(tmp, double_to_rawbits(imm)); 752 Mov(tmp, double_to_rawbits(imm));
753 Fmov(fd, tmp); 753 Fmov(fd, tmp);
754 } else { 754 } else {
755 ASSERT(fd.SizeInBits() == kSRegSize); 755 ASSERT(fd.SizeInBits() == kSRegSizeInBits);
756 Register tmp = temps.AcquireW(); 756 Register tmp = temps.AcquireW();
757 Mov(tmp, float_to_rawbits(static_cast<float>(imm))); 757 Mov(tmp, float_to_rawbits(static_cast<float>(imm)));
758 Fmov(fd, tmp); 758 Fmov(fd, tmp);
759 } 759 }
760 } 760 }
761 } 761 }
762 762
763 763
764 void MacroAssembler::Fmov(Register rd, FPRegister fn) { 764 void MacroAssembler::Fmov(Register rd, FPRegister fn) {
765 ASSERT(allow_macro_instructions_); 765 ASSERT(allow_macro_instructions_);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 } 1469 }
1470 1470
1471 1471
1472 void MacroAssembler::Claim(const Register& count, uint64_t unit_size) { 1472 void MacroAssembler::Claim(const Register& count, uint64_t unit_size) {
1473 ASSERT(IsPowerOf2(unit_size)); 1473 ASSERT(IsPowerOf2(unit_size));
1474 1474
1475 if (unit_size == 0) { 1475 if (unit_size == 0) {
1476 return; 1476 return;
1477 } 1477 }
1478 1478
1479 const int shift = CountTrailingZeros(unit_size, kXRegSize); 1479 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits);
1480 const Operand size(count, LSL, shift); 1480 const Operand size(count, LSL, shift);
1481 1481
1482 if (size.IsZero()) { 1482 if (size.IsZero()) {
1483 return; 1483 return;
1484 } 1484 }
1485 1485
1486 if (!csp.Is(StackPointer())) { 1486 if (!csp.Is(StackPointer())) {
1487 BumpSystemStackPointer(size); 1487 BumpSystemStackPointer(size);
1488 } 1488 }
1489 1489
1490 Sub(StackPointer(), StackPointer(), size); 1490 Sub(StackPointer(), StackPointer(), size);
1491 } 1491 }
1492 1492
1493 1493
1494 void MacroAssembler::ClaimBySMI(const Register& count_smi, uint64_t unit_size) { 1494 void MacroAssembler::ClaimBySMI(const Register& count_smi, uint64_t unit_size) {
1495 ASSERT(IsPowerOf2(unit_size)); 1495 ASSERT(IsPowerOf2(unit_size));
1496 const int shift = CountTrailingZeros(unit_size, kXRegSize) - kSmiShift; 1496 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift;
1497 const Operand size(count_smi, 1497 const Operand size(count_smi,
1498 (shift >= 0) ? (LSL) : (LSR), 1498 (shift >= 0) ? (LSL) : (LSR),
1499 (shift >= 0) ? (shift) : (-shift)); 1499 (shift >= 0) ? (shift) : (-shift));
1500 1500
1501 if (size.IsZero()) { 1501 if (size.IsZero()) {
1502 return; 1502 return;
1503 } 1503 }
1504 1504
1505 if (!csp.Is(StackPointer())) { 1505 if (!csp.Is(StackPointer())) {
1506 BumpSystemStackPointer(size); 1506 BumpSystemStackPointer(size);
(...skipping 23 matching lines...) Expand all
1530 } 1530 }
1531 1531
1532 1532
1533 void MacroAssembler::Drop(const Register& count, uint64_t unit_size) { 1533 void MacroAssembler::Drop(const Register& count, uint64_t unit_size) {
1534 ASSERT(IsPowerOf2(unit_size)); 1534 ASSERT(IsPowerOf2(unit_size));
1535 1535
1536 if (unit_size == 0) { 1536 if (unit_size == 0) {
1537 return; 1537 return;
1538 } 1538 }
1539 1539
1540 const int shift = CountTrailingZeros(unit_size, kXRegSize); 1540 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits);
1541 const Operand size(count, LSL, shift); 1541 const Operand size(count, LSL, shift);
1542 1542
1543 if (size.IsZero()) { 1543 if (size.IsZero()) {
1544 return; 1544 return;
1545 } 1545 }
1546 1546
1547 Add(StackPointer(), StackPointer(), size); 1547 Add(StackPointer(), StackPointer(), size);
1548 1548
1549 if (!csp.Is(StackPointer()) && emit_debug_code()) { 1549 if (!csp.Is(StackPointer()) && emit_debug_code()) {
1550 // It is safe to leave csp where it is when unwinding the JavaScript stack, 1550 // It is safe to leave csp where it is when unwinding the JavaScript stack,
1551 // but if we keep it matching StackPointer, the simulator can detect memory 1551 // but if we keep it matching StackPointer, the simulator can detect memory
1552 // accesses in the now-free part of the stack. 1552 // accesses in the now-free part of the stack.
1553 Mov(csp, StackPointer()); 1553 Mov(csp, StackPointer());
1554 } 1554 }
1555 } 1555 }
1556 1556
1557 1557
1558 void MacroAssembler::DropBySMI(const Register& count_smi, uint64_t unit_size) { 1558 void MacroAssembler::DropBySMI(const Register& count_smi, uint64_t unit_size) {
1559 ASSERT(IsPowerOf2(unit_size)); 1559 ASSERT(IsPowerOf2(unit_size));
1560 const int shift = CountTrailingZeros(unit_size, kXRegSize) - kSmiShift; 1560 const int shift = CountTrailingZeros(unit_size, kXRegSizeInBits) - kSmiShift;
1561 const Operand size(count_smi, 1561 const Operand size(count_smi,
1562 (shift >= 0) ? (LSL) : (LSR), 1562 (shift >= 0) ? (LSL) : (LSR),
1563 (shift >= 0) ? (shift) : (-shift)); 1563 (shift >= 0) ? (shift) : (-shift));
1564 1564
1565 if (size.IsZero()) { 1565 if (size.IsZero()) {
1566 return; 1566 return;
1567 } 1567 }
1568 1568
1569 Add(StackPointer(), StackPointer(), size); 1569 Add(StackPointer(), StackPointer(), size);
1570 1570
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 // characters are reserved for controlling features of the instrumentation. 1649 // characters are reserved for controlling features of the instrumentation.
1650 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1])); 1650 ASSERT(isprint(marker_name[0]) && isprint(marker_name[1]));
1651 1651
1652 InstructionAccurateScope scope(this, 1); 1652 InstructionAccurateScope scope(this, 1);
1653 movn(xzr, (marker_name[1] << 8) | marker_name[0]); 1653 movn(xzr, (marker_name[1] << 8) | marker_name[0]);
1654 } 1654 }
1655 1655
1656 } } // namespace v8::internal 1656 } } // namespace v8::internal
1657 1657
1658 #endif // V8_A64_MACRO_ASSEMBLER_A64_INL_H_ 1658 #endif // V8_A64_MACRO_ASSEMBLER_A64_INL_H_
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | src/a64/regexp-macro-assembler-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698