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

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

Issue 6682026: Fix SmiCompare on 64 bit to distinguish between comparisons where... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 Register src, 271 Register src,
272 int power); 272 int power);
273 273
274 // Divide a positive smi's integer value by a power of two. 274 // Divide a positive smi's integer value by a power of two.
275 // Provides result as 32-bit integer value. 275 // Provides result as 32-bit integer value.
276 void PositiveSmiDivPowerOfTwoToInteger32(Register dst, 276 void PositiveSmiDivPowerOfTwoToInteger32(Register dst,
277 Register src, 277 Register src,
278 int power); 278 int power);
279 279
280 280
281 // Simple comparison of smis. 281 // Simple comparison of smis. Both sides must be known smis to use these,
282 void SmiCompare(Register dst, Register src); 282 // otherwise use Cmp.
283 void SmiCompare(Register smi1, Register smi2);
283 void SmiCompare(Register dst, Smi* src); 284 void SmiCompare(Register dst, Smi* src);
284 void SmiCompare(Register dst, const Operand& src); 285 void SmiCompare(Register dst, const Operand& src);
285 void SmiCompare(const Operand& dst, Register src); 286 void SmiCompare(const Operand& dst, Register src);
286 void SmiCompare(const Operand& dst, Smi* src); 287 void SmiCompare(const Operand& dst, Smi* src);
287 // Compare the int32 in src register to the value of the smi stored at dst. 288 // Compare the int32 in src register to the value of the smi stored at dst.
288 void SmiCompareInteger32(const Operand& dst, Register src); 289 void SmiCompareInteger32(const Operand& dst, Register src);
289 // Sets sign and zero flags depending on value of smi in register. 290 // Sets sign and zero flags depending on value of smi in register.
290 void SmiTest(Register src); 291 void SmiTest(Register src);
291 292
292 // Functions performing a check on a known or potential smi. Returns 293 // Functions performing a check on a known or potential smi. Returns
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 void Set(const Operand& dst, int64_t x); 603 void Set(const Operand& dst, int64_t x);
603 604
604 // Move if the registers are not identical. 605 // Move if the registers are not identical.
605 void Move(Register target, Register source); 606 void Move(Register target, Register source);
606 607
607 // Handle support 608 // Handle support
608 void Move(Register dst, Handle<Object> source); 609 void Move(Register dst, Handle<Object> source);
609 void Move(const Operand& dst, Handle<Object> source); 610 void Move(const Operand& dst, Handle<Object> source);
610 void Cmp(Register dst, Handle<Object> source); 611 void Cmp(Register dst, Handle<Object> source);
611 void Cmp(const Operand& dst, Handle<Object> source); 612 void Cmp(const Operand& dst, Handle<Object> source);
613 void Cmp(Register dst, Smi* src);
614 void Cmp(const Operand& dst, Smi* src);
612 void Push(Handle<Object> source); 615 void Push(Handle<Object> source);
613 616
614 // Emit code to discard a non-negative number of pointer-sized elements 617 // Emit code to discard a non-negative number of pointer-sized elements
615 // from the stack, clobbering only the rsp register. 618 // from the stack, clobbering only the rsp register.
616 void Drop(int stack_elements); 619 void Drop(int stack_elements);
617 620
618 void Call(Label* target) { call(target); } 621 void Call(Label* target) { call(target); }
619 622
620 // Control Flow 623 // Control Flow
621 void Jump(Address destination, RelocInfo::Mode rmode); 624 void Jump(Address destination, RelocInfo::Mode rmode);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 void FCmp(); 698 void FCmp();
696 699
697 // Abort execution if argument is not a number. Used in debug code. 700 // Abort execution if argument is not a number. Used in debug code.
698 void AbortIfNotNumber(Register object); 701 void AbortIfNotNumber(Register object);
699 702
700 // Abort execution if argument is a smi. Used in debug code. 703 // Abort execution if argument is a smi. Used in debug code.
701 void AbortIfSmi(Register object); 704 void AbortIfSmi(Register object);
702 705
703 // Abort execution if argument is not a smi. Used in debug code. 706 // Abort execution if argument is not a smi. Used in debug code.
704 void AbortIfNotSmi(Register object); 707 void AbortIfNotSmi(Register object);
708 void AbortIfNotSmi(const Operand& object);
705 709
706 // Abort execution if argument is a string. Used in debug code. 710 // Abort execution if argument is a string. Used in debug code.
707 void AbortIfNotString(Register object); 711 void AbortIfNotString(Register object);
708 712
709 // Abort execution if argument is not the root value with the given index. 713 // Abort execution if argument is not the root value with the given index.
710 void AbortIfNotRootValue(Register src, 714 void AbortIfNotRootValue(Register src,
711 Heap::RootListIndex root_value_index, 715 Heap::RootListIndex root_value_index,
712 const char* message); 716 const char* message);
713 717
714 // --------------------------------------------------------------------------- 718 // ---------------------------------------------------------------------------
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 Jump(adaptor, RelocInfo::CODE_TARGET); 1887 Jump(adaptor, RelocInfo::CODE_TARGET);
1884 } 1888 }
1885 bind(&invoke); 1889 bind(&invoke);
1886 } 1890 }
1887 } 1891 }
1888 1892
1889 1893
1890 } } // namespace v8::internal 1894 } } // namespace v8::internal
1891 1895
1892 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1896 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698