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

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

Issue 3078033: Version 2.3.6 (Closed)
Patch Set: Created 10 years, 4 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
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 return CheckPositiveSmi(first); 875 return CheckPositiveSmi(first);
876 } 876 }
877 movq(kScratchRegister, first); 877 movq(kScratchRegister, first);
878 or_(kScratchRegister, second); 878 or_(kScratchRegister, second);
879 rol(kScratchRegister, Immediate(1)); 879 rol(kScratchRegister, Immediate(1));
880 testl(kScratchRegister, Immediate(0x03)); 880 testl(kScratchRegister, Immediate(0x03));
881 return zero; 881 return zero;
882 } 882 }
883 883
884 884
885 Condition MacroAssembler::CheckEitherSmi(Register first, Register second) { 885 Condition MacroAssembler::CheckEitherSmi(Register first,
886 Register second,
887 Register scratch) {
886 if (first.is(second)) { 888 if (first.is(second)) {
887 return CheckSmi(first); 889 return CheckSmi(first);
888 } 890 }
889 movl(kScratchRegister, first); 891 if (scratch.is(second)) {
890 andl(kScratchRegister, second); 892 andl(scratch, first);
891 testb(kScratchRegister, Immediate(kSmiTagMask)); 893 } else {
894 if (!scratch.is(first)) {
895 movl(scratch, first);
896 }
897 andl(scratch, second);
898 }
899 testb(scratch, Immediate(kSmiTagMask));
892 return zero; 900 return zero;
893 } 901 }
894 902
895 903
896 Condition MacroAssembler::CheckIsMinSmi(Register src) { 904 Condition MacroAssembler::CheckIsMinSmi(Register src) {
897 ASSERT(!src.is(kScratchRegister)); 905 ASSERT(!src.is(kScratchRegister));
898 // If we overflow by subtracting one, it's the minimal smi value. 906 // If we overflow by subtracting one, it's the minimal smi value.
899 cmpq(src, kSmiConstantRegister); 907 cmpq(src, kSmiConstantRegister);
900 return overflow; 908 return overflow;
901 } 909 }
(...skipping 2038 matching lines...) Expand 10 before | Expand all | Expand 10 after
2940 CPU::FlushICache(address_, size_); 2948 CPU::FlushICache(address_, size_);
2941 2949
2942 // Check that the code was patched as expected. 2950 // Check that the code was patched as expected.
2943 ASSERT(masm_.pc_ == address_ + size_); 2951 ASSERT(masm_.pc_ == address_ + size_);
2944 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); 2952 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap);
2945 } 2953 }
2946 2954
2947 } } // namespace v8::internal 2955 } } // namespace v8::internal
2948 2956
2949 #endif // V8_TARGET_ARCH_X64 2957 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698