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

Side by Side Diff: src/x64/macro-assembler-x64.h

Issue 264973011: Update SmiShiftLeft, SmiShiftLogicalRight, SmiShiftArithmeticRight and SmiDiv to support x32 port. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 6 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/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_ 5 #ifndef V8_X64_MACRO_ASSEMBLER_X64_H_
6 #define V8_X64_MACRO_ASSEMBLER_X64_H_ 6 #define V8_X64_MACRO_ASSEMBLER_X64_H_
7 7
8 #include "assembler.h" 8 #include "assembler.h"
9 #include "frames.h" 9 #include "frames.h"
10 #include "globals.h" 10 #include "globals.h"
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 Condition CheckUInteger32ValidSmiValue(Register src); 463 Condition CheckUInteger32ValidSmiValue(Register src);
464 464
465 // Check whether src is a Smi, and set dst to zero if it is a smi, 465 // Check whether src is a Smi, and set dst to zero if it is a smi,
466 // and to one if it isn't. 466 // and to one if it isn't.
467 void CheckSmiToIndicator(Register dst, Register src); 467 void CheckSmiToIndicator(Register dst, Register src);
468 void CheckSmiToIndicator(Register dst, const Operand& src); 468 void CheckSmiToIndicator(Register dst, const Operand& src);
469 469
470 // Test-and-jump functions. Typically combines a check function 470 // Test-and-jump functions. Typically combines a check function
471 // above with a conditional jump. 471 // above with a conditional jump.
472 472
473 // Jump if the value can be represented by a smi.
474 void JumpIfValidSmiValue(Register src, Label* on_valid,
475 Label::Distance near_jump = Label::kFar);
476
473 // Jump if the value cannot be represented by a smi. 477 // Jump if the value cannot be represented by a smi.
474 void JumpIfNotValidSmiValue(Register src, Label* on_invalid, 478 void JumpIfNotValidSmiValue(Register src, Label* on_invalid,
475 Label::Distance near_jump = Label::kFar); 479 Label::Distance near_jump = Label::kFar);
476 480
481 // Jump if the unsigned integer value can be represented by a smi.
482 void JumpIfUIntValidSmiValue(Register src, Label* on_valid,
483 Label::Distance near_jump = Label::kFar);
484
477 // Jump if the unsigned integer value cannot be represented by a smi. 485 // Jump if the unsigned integer value cannot be represented by a smi.
478 void JumpIfUIntNotValidSmiValue(Register src, Label* on_invalid, 486 void JumpIfUIntNotValidSmiValue(Register src, Label* on_invalid,
479 Label::Distance near_jump = Label::kFar); 487 Label::Distance near_jump = Label::kFar);
480 488
481 // Jump to label if the value is a tagged smi. 489 // Jump to label if the value is a tagged smi.
482 void JumpIfSmi(Register src, 490 void JumpIfSmi(Register src,
483 Label* on_smi, 491 Label* on_smi,
484 Label::Distance near_jump = Label::kFar); 492 Label::Distance near_jump = Label::kFar);
485 493
486 // Jump to label if the value is not a tagged smi. 494 // Jump to label if the value is not a tagged smi.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 void SmiNot(Register dst, Register src); 632 void SmiNot(Register dst, Register src);
625 void SmiAnd(Register dst, Register src1, Register src2); 633 void SmiAnd(Register dst, Register src1, Register src2);
626 void SmiOr(Register dst, Register src1, Register src2); 634 void SmiOr(Register dst, Register src1, Register src2);
627 void SmiXor(Register dst, Register src1, Register src2); 635 void SmiXor(Register dst, Register src1, Register src2);
628 void SmiAndConstant(Register dst, Register src1, Smi* constant); 636 void SmiAndConstant(Register dst, Register src1, Smi* constant);
629 void SmiOrConstant(Register dst, Register src1, Smi* constant); 637 void SmiOrConstant(Register dst, Register src1, Smi* constant);
630 void SmiXorConstant(Register dst, Register src1, Smi* constant); 638 void SmiXorConstant(Register dst, Register src1, Smi* constant);
631 639
632 void SmiShiftLeftConstant(Register dst, 640 void SmiShiftLeftConstant(Register dst,
633 Register src, 641 Register src,
634 int shift_value); 642 int shift_value,
643 Label* on_not_smi_result = NULL,
644 Label::Distance near_jump = Label::kFar);
635 void SmiShiftLogicalRightConstant(Register dst, 645 void SmiShiftLogicalRightConstant(Register dst,
636 Register src, 646 Register src,
637 int shift_value, 647 int shift_value,
638 Label* on_not_smi_result, 648 Label* on_not_smi_result,
639 Label::Distance near_jump = Label::kFar); 649 Label::Distance near_jump = Label::kFar);
640 void SmiShiftArithmeticRightConstant(Register dst, 650 void SmiShiftArithmeticRightConstant(Register dst,
641 Register src, 651 Register src,
642 int shift_value); 652 int shift_value);
643 653
644 // Shifts a smi value to the left, and returns the result if that is a smi. 654 // Shifts a smi value to the left, and returns the result if that is a smi.
645 // Uses and clobbers rcx, so dst may not be rcx. 655 // Uses and clobbers rcx, so dst may not be rcx.
646 void SmiShiftLeft(Register dst, 656 void SmiShiftLeft(Register dst,
647 Register src1, 657 Register src1,
648 Register src2); 658 Register src2,
659 Label* on_not_smi_result = NULL,
660 Label::Distance near_jump = Label::kFar);
649 // Shifts a smi value to the right, shifting in zero bits at the top, and 661 // Shifts a smi value to the right, shifting in zero bits at the top, and
650 // returns the unsigned intepretation of the result if that is a smi. 662 // returns the unsigned intepretation of the result if that is a smi.
651 // Uses and clobbers rcx, so dst may not be rcx. 663 // Uses and clobbers rcx, so dst may not be rcx.
652 void SmiShiftLogicalRight(Register dst, 664 void SmiShiftLogicalRight(Register dst,
653 Register src1, 665 Register src1,
654 Register src2, 666 Register src2,
655 Label* on_not_smi_result, 667 Label* on_not_smi_result,
656 Label::Distance near_jump = Label::kFar); 668 Label::Distance near_jump = Label::kFar);
657 // Shifts a smi value to the right, sign extending the top, and 669 // Shifts a smi value to the right, sign extending the top, and
658 // returns the signed intepretation of the result. That will always 670 // returns the signed intepretation of the result. That will always
(...skipping 938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 masm->popfq(); \ 1609 masm->popfq(); \
1598 } \ 1610 } \
1599 masm-> 1611 masm->
1600 #else 1612 #else
1601 #define ACCESS_MASM(masm) masm-> 1613 #define ACCESS_MASM(masm) masm->
1602 #endif 1614 #endif
1603 1615
1604 } } // namespace v8::internal 1616 } } // namespace v8::internal
1605 1617
1606 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1618 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698