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

Unified Diff: test/cctest/test-hashing.cc

Issue 18014003: Add X32 port into V8 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/test-hashing.cc
===================================================================
--- test/cctest/test-hashing.cc (revision 15486)
+++ test/cctest/test-hashing.cc (working copy)
@@ -82,6 +82,23 @@
__ pop(rbx);
__ pop(kRootRegister);
__ Ret();
+#elif V8_TARGET_ARCH_X32
+ __ push(kRootRegister);
+ __ InitializeRootRegister();
+ __ push(rbx);
+ __ push(rcx);
+ __ movl(rax, Immediate(0));
+ __ movl(rbx, Immediate(string.at(0)));
+ StringHelper::GenerateHashInit(masm, rax, rbx, rcx);
+ for (int i = 1; i < string.length(); i++) {
+ __ movl(rbx, Immediate(string.at(i)));
+ StringHelper::GenerateHashAddCharacter(masm, rax, rbx, rcx);
+ }
+ StringHelper::GenerateHashGetHash(masm, rax, rcx);
+ __ pop(rcx);
+ __ pop(rbx);
+ __ pop(kRootRegister);
+ __ Ret();
#elif V8_TARGET_ARCH_ARM
__ push(kRootRegister);
__ InitializeRootRegister();
@@ -131,6 +148,15 @@
__ pop(rbx);
__ pop(kRootRegister);
__ Ret();
+#elif V8_TARGET_ARCH_X32
+ __ push(kRootRegister);
+ __ InitializeRootRegister();
+ __ push(rbx);
+ __ movl(rax, Immediate(key));
+ __ GetNumberHash(rax, rbx);
+ __ pop(rbx);
+ __ pop(kRootRegister);
+ __ Ret();
#elif V8_TARGET_ARCH_ARM
__ push(kRootRegister);
__ InitializeRootRegister();

Powered by Google App Engine
This is Rietveld 408576698