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

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

Issue 9378006: Make sure that top bits are zero when storing untagged 32 bit values (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 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/x64/macro-assembler-x64.h ('k') | no next file » | 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 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 Assert(is_smi, "Operand is not a smi"); 2863 Assert(is_smi, "Operand is not a smi");
2864 } 2864 }
2865 2865
2866 2866
2867 void MacroAssembler::AbortIfNotSmi(const Operand& object) { 2867 void MacroAssembler::AbortIfNotSmi(const Operand& object) {
2868 Condition is_smi = CheckSmi(object); 2868 Condition is_smi = CheckSmi(object);
2869 Assert(is_smi, "Operand is not a smi"); 2869 Assert(is_smi, "Operand is not a smi");
2870 } 2870 }
2871 2871
2872 2872
2873 void MacroAssembler::AbortIfNotZeroExtended(Register int32_register) {
2874 ASSERT(!int32_register.is(kScratchRegister));
2875 movq(kScratchRegister, 0x100000000l, RelocInfo::NONE);
2876 cmpq(kScratchRegister, int32_register);
2877 Assert(above_equal, "32 bit value in register is not zero-extended");
2878 }
2879
2880
2873 void MacroAssembler::AbortIfNotString(Register object) { 2881 void MacroAssembler::AbortIfNotString(Register object) {
2874 testb(object, Immediate(kSmiTagMask)); 2882 testb(object, Immediate(kSmiTagMask));
2875 Assert(not_equal, "Operand is not a string"); 2883 Assert(not_equal, "Operand is not a string");
2876 push(object); 2884 push(object);
2877 movq(object, FieldOperand(object, HeapObject::kMapOffset)); 2885 movq(object, FieldOperand(object, HeapObject::kMapOffset));
2878 CmpInstanceType(object, FIRST_NONSTRING_TYPE); 2886 CmpInstanceType(object, FIRST_NONSTRING_TYPE);
2879 pop(object); 2887 pop(object);
2880 Assert(below, "Operand is not a string"); 2888 Assert(below, "Operand is not a string");
2881 } 2889 }
2882 2890
(...skipping 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after
4378 4386
4379 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask)); 4387 and_(bitmap_scratch, Immediate(~Page::kPageAlignmentMask));
4380 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length); 4388 addl(Operand(bitmap_scratch, MemoryChunk::kLiveBytesOffset), length);
4381 4389
4382 bind(&done); 4390 bind(&done);
4383 } 4391 }
4384 4392
4385 } } // namespace v8::internal 4393 } } // namespace v8::internal
4386 4394
4387 #endif // V8_TARGET_ARCH_X64 4395 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698