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

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

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/lithium-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 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 offset + kHeapObjectTag, 249 offset + kHeapObjectTag,
250 value, 250 value,
251 scratch, 251 scratch,
252 save_fp, 252 save_fp,
253 remembered_set_action, 253 remembered_set_action,
254 smi_check); 254 smi_check);
255 } 255 }
256 256
257 // Notify the garbage collector that we wrote a pointer into a fixed array. 257 // Notify the garbage collector that we wrote a pointer into a fixed array.
258 // |array| is the array being stored into, |value| is the 258 // |array| is the array being stored into, |value| is the
259 // object being stored. |index| is the array index represented as a 259 // object being stored. |index| is the array index represented as a non-smi.
260 // Smi. All registers are clobbered by the operation RecordWriteArray 260 // All registers are clobbered by the operation RecordWriteArray
261 // filters out smis so it does not update the write barrier if the 261 // filters out smis so it does not update the write barrier if the
262 // value is a smi. 262 // value is a smi.
263 void RecordWriteArray( 263 void RecordWriteArray(
264 Register array, 264 Register array,
265 Register value, 265 Register value,
266 Register index, 266 Register index,
267 SaveFPRegsMode save_fp, 267 SaveFPRegsMode save_fp,
268 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 268 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
269 SmiCheck smi_check = INLINE_SMI_CHECK); 269 SmiCheck smi_check = INLINE_SMI_CHECK);
270 270
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 // Push and pop the registers that can hold pointers. 313 // Push and pop the registers that can hold pointers.
314 void PushSafepointRegisters() { Pushad(); } 314 void PushSafepointRegisters() { Pushad(); }
315 void PopSafepointRegisters() { Popad(); } 315 void PopSafepointRegisters() { Popad(); }
316 // Store the value in register src in the safepoint register stack 316 // Store the value in register src in the safepoint register stack
317 // slot for register dst. 317 // slot for register dst.
318 void StoreToSafepointRegisterSlot(Register dst, Register src); 318 void StoreToSafepointRegisterSlot(Register dst, Register src);
319 void LoadFromSafepointRegisterSlot(Register dst, Register src); 319 void LoadFromSafepointRegisterSlot(Register dst, Register src);
320 320
321 void InitializeRootRegister() { 321 void InitializeRootRegister() {
322 ExternalReference roots_address = 322 ExternalReference roots_array_start =
323 ExternalReference::roots_address(isolate()); 323 ExternalReference::roots_array_start(isolate());
324 movq(kRootRegister, roots_address); 324 movq(kRootRegister, roots_array_start);
325 addq(kRootRegister, Immediate(kRootRegisterBias)); 325 addq(kRootRegister, Immediate(kRootRegisterBias));
326 } 326 }
327 327
328 // --------------------------------------------------------------------------- 328 // ---------------------------------------------------------------------------
329 // JavaScript invokes 329 // JavaScript invokes
330 330
331 // Setup call kind marking in rcx. The method takes rcx as an 331 // Setup call kind marking in rcx. The method takes rcx as an
332 // explicit first parameter to make the code more readable at the 332 // explicit first parameter to make the code more readable at the
333 // call sites. 333 // call sites.
334 void SetCallKind(Register dst, CallKind kind); 334 void SetCallKind(Register dst, CallKind kind);
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 720
721 void Move(const Operand& dst, Smi* source) { 721 void Move(const Operand& dst, Smi* source) {
722 Register constant = GetSmiConstant(source); 722 Register constant = GetSmiConstant(source);
723 movq(dst, constant); 723 movq(dst, constant);
724 } 724 }
725 725
726 void Push(Smi* smi); 726 void Push(Smi* smi);
727 void Test(const Operand& dst, Smi* source); 727 void Test(const Operand& dst, Smi* source);
728 728
729
729 // --------------------------------------------------------------------------- 730 // ---------------------------------------------------------------------------
730 // String macros. 731 // String macros.
731 732
732 // If object is a string, its map is loaded into object_map. 733 // If object is a string, its map is loaded into object_map.
733 void JumpIfNotString(Register object, 734 void JumpIfNotString(Register object,
734 Register object_map, 735 Register object_map,
735 Label* not_string, 736 Label* not_string,
736 Label::Distance near_jump = Label::kFar); 737 Label::Distance near_jump = Label::kFar);
737 738
738 739
(...skipping 25 matching lines...) Expand all
764 // --------------------------------------------------------------------------- 765 // ---------------------------------------------------------------------------
765 // Macro instructions. 766 // Macro instructions.
766 767
767 // Load a register with a long value as efficiently as possible. 768 // Load a register with a long value as efficiently as possible.
768 void Set(Register dst, int64_t x); 769 void Set(Register dst, int64_t x);
769 void Set(const Operand& dst, int64_t x); 770 void Set(const Operand& dst, int64_t x);
770 771
771 // Move if the registers are not identical. 772 // Move if the registers are not identical.
772 void Move(Register target, Register source); 773 void Move(Register target, Register source);
773 774
775 // Bit-field support.
776 void TestBit(const Operand& dst, int bit_index);
777
774 // Handle support 778 // Handle support
775 void Move(Register dst, Handle<Object> source); 779 void Move(Register dst, Handle<Object> source);
776 void Move(const Operand& dst, Handle<Object> source); 780 void Move(const Operand& dst, Handle<Object> source);
777 void Cmp(Register dst, Handle<Object> source); 781 void Cmp(Register dst, Handle<Object> source);
778 void Cmp(const Operand& dst, Handle<Object> source); 782 void Cmp(const Operand& dst, Handle<Object> source);
779 void Cmp(Register dst, Smi* src); 783 void Cmp(Register dst, Smi* src);
780 void Cmp(const Operand& dst, Smi* src); 784 void Cmp(const Operand& dst, Smi* src);
781 void Push(Handle<Object> source); 785 void Push(Handle<Object> source);
782 786
783 // Emit code to discard a non-negative number of pointer-sized elements 787 // Emit code to discard a non-negative number of pointer-sized elements
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 Label* fail, 857 Label* fail,
854 Label::Distance distance = Label::kFar); 858 Label::Distance distance = Label::kFar);
855 859
856 // Check if a map for a JSObject indicates that the object has fast smi only 860 // Check if a map for a JSObject indicates that the object has fast smi only
857 // elements. Jump to the specified label if it does not. 861 // elements. Jump to the specified label if it does not.
858 void CheckFastSmiOnlyElements(Register map, 862 void CheckFastSmiOnlyElements(Register map,
859 Label* fail, 863 Label* fail,
860 Label::Distance distance = Label::kFar); 864 Label::Distance distance = Label::kFar);
861 865
862 // Check to see if maybe_number can be stored as a double in 866 // Check to see if maybe_number can be stored as a double in
863 // FastDoubleElements. If it can, store it at the index specified by key in 867 // FastDoubleElements. If it can, store it at the index specified by index in
864 // the FastDoubleElements array elements, otherwise jump to fail. 868 // the FastDoubleElements array elements, otherwise jump to fail. Note that
865 // Note that key must not be smi-tagged. 869 // index must not be smi-tagged.
866 void StoreNumberToDoubleElements(Register maybe_number, 870 void StoreNumberToDoubleElements(Register maybe_number,
867 Register elements, 871 Register elements,
868 Register key, 872 Register index,
869 XMMRegister xmm_scratch, 873 XMMRegister xmm_scratch,
870 Label* fail); 874 Label* fail);
871 875
872 // Check if the map of an object is equal to a specified map and 876 // Check if the map of an object is equal to a specified map and
873 // branch to label if not. Skip the smi check if not required 877 // branch to label if not. Skip the smi check if not required
874 // (object is known to be a heap object) 878 // (object is known to be a heap object)
875 void CheckMap(Register obj, 879 void CheckMap(Register obj,
876 Handle<Map> map, 880 Handle<Map> map,
877 Label* fail, 881 Label* fail,
878 SmiCheckType smi_check_type); 882 SmiCheckType smi_check_type);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1067 void NegativeZeroTest(Register result, Register op1, Register op2, 1071 void NegativeZeroTest(Register result, Register op1, Register op2,
1068 Register scratch, Label* then_label); 1072 Register scratch, Label* then_label);
1069 1073
1070 // Try to get function prototype of a function and puts the value in 1074 // Try to get function prototype of a function and puts the value in
1071 // the result register. Checks that the function really is a 1075 // the result register. Checks that the function really is a
1072 // function and jumps to the miss label if the fast checks fail. The 1076 // function and jumps to the miss label if the fast checks fail. The
1073 // function register will be untouched; the other register may be 1077 // function register will be untouched; the other register may be
1074 // clobbered. 1078 // clobbered.
1075 void TryGetFunctionPrototype(Register function, 1079 void TryGetFunctionPrototype(Register function,
1076 Register result, 1080 Register result,
1077 Label* miss); 1081 Label* miss,
1082 bool miss_on_bound_function = false);
1078 1083
1079 // Generates code for reporting that an illegal operation has 1084 // Generates code for reporting that an illegal operation has
1080 // occurred. 1085 // occurred.
1081 void IllegalOperation(int num_arguments); 1086 void IllegalOperation(int num_arguments);
1082 1087
1083 // Picks out an array index from the hash field. 1088 // Picks out an array index from the hash field.
1084 // Register use: 1089 // Register use:
1085 // hash - holds the index's hash. Clobbered. 1090 // hash - holds the index's hash. Clobbered.
1086 // index - holds the overwritten index on exit. 1091 // index - holds the overwritten index on exit.
1087 void IndexFromHash(Register hash, Register index); 1092 void IndexFromHash(Register hash, Register index);
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 masm->popfd(); \ 1447 masm->popfd(); \
1443 } \ 1448 } \
1444 masm-> 1449 masm->
1445 #else 1450 #else
1446 #define ACCESS_MASM(masm) masm-> 1451 #define ACCESS_MASM(masm) masm->
1447 #endif 1452 #endif
1448 1453
1449 } } // namespace v8::internal 1454 } } // namespace v8::internal
1450 1455
1451 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1456 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698