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

Side by Side Diff: src/x64/codegen-x64.h

Issue 1858002: Port inlined version of swap primitive for sorting from ia32 to x64.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 7 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/ia32/codegen-ia32.h ('k') | src/x64/codegen-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 void GenerateRegExpExec(ZoneList<Expression*>* args); 587 void GenerateRegExpExec(ZoneList<Expression*>* args);
588 588
589 void GenerateRegExpConstructResult(ZoneList<Expression*>* args); 589 void GenerateRegExpConstructResult(ZoneList<Expression*>* args);
590 590
591 // Support for fast native caches. 591 // Support for fast native caches.
592 void GenerateGetFromCache(ZoneList<Expression*>* args); 592 void GenerateGetFromCache(ZoneList<Expression*>* args);
593 593
594 // Fast support for number to string. 594 // Fast support for number to string.
595 void GenerateNumberToString(ZoneList<Expression*>* args); 595 void GenerateNumberToString(ZoneList<Expression*>* args);
596 596
597 // Fast swapping of elements. 597 // Fast swapping of elements. Takes three expressions, the object and two
598 // indices. This should only be used if the indices are known to be
599 // non-negative and within bounds of the elements array at the call site.
598 void GenerateSwapElements(ZoneList<Expression*>* args); 600 void GenerateSwapElements(ZoneList<Expression*>* args);
599 601
600 // Fast call for custom callbacks. 602 // Fast call for custom callbacks.
601 void GenerateCallFunction(ZoneList<Expression*>* args); 603 void GenerateCallFunction(ZoneList<Expression*>* args);
602 604
603 // Fast call to math functions. 605 // Fast call to math functions.
604 void GenerateMathPow(ZoneList<Expression*>* args); 606 void GenerateMathPow(ZoneList<Expression*>* args);
605 void GenerateMathSin(ZoneList<Expression*>* args); 607 void GenerateMathSin(ZoneList<Expression*>* args);
606 void GenerateMathCos(ZoneList<Expression*>* args); 608 void GenerateMathCos(ZoneList<Expression*>* args);
607 void GenerateMathSqrt(ZoneList<Expression*>* args); 609 void GenerateMathSqrt(ZoneList<Expression*>* args);
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 const char* GetName() { return "NumberToStringStub"; } 993 const char* GetName() { return "NumberToStringStub"; }
992 994
993 #ifdef DEBUG 995 #ifdef DEBUG
994 void Print() { 996 void Print() {
995 PrintF("NumberToStringStub\n"); 997 PrintF("NumberToStringStub\n");
996 } 998 }
997 #endif 999 #endif
998 }; 1000 };
999 1001
1000 1002
1003 class RecordWriteStub : public CodeStub {
1004 public:
1005 RecordWriteStub(Register object, Register addr, Register scratch)
1006 : object_(object), addr_(addr), scratch_(scratch) { }
1007
1008 void Generate(MacroAssembler* masm);
1009
1010 private:
1011 Register object_;
1012 Register addr_;
1013 Register scratch_;
1014
1015 #ifdef DEBUG
1016 void Print() {
1017 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n",
1018 object_.code(), addr_.code(), scratch_.code());
1019 }
1020 #endif
1021
1022 // Minor key encoding in 12 bits of three registers (object, address and
1023 // scratch) OOOOAAAASSSS.
1024 class ScratchBits : public BitField<uint32_t, 0, 4> {};
1025 class AddressBits : public BitField<uint32_t, 4, 4> {};
1026 class ObjectBits : public BitField<uint32_t, 8, 4> {};
1027
1028 Major MajorKey() { return RecordWrite; }
1029
1030 int MinorKey() {
1031 // Encode the registers.
1032 return ObjectBits::encode(object_.code()) |
1033 AddressBits::encode(addr_.code()) |
1034 ScratchBits::encode(scratch_.code());
1035 }
1036 };
1037
1038
1001 } } // namespace v8::internal 1039 } } // namespace v8::internal
1002 1040
1003 #endif // V8_X64_CODEGEN_X64_H_ 1041 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/ia32/codegen-ia32.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698