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

Side by Side Diff: test/cctest/test-hashing.cc

Issue 817143002: Contribution of PowerPC port (continuation of 422063005) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Contribution of PowerPC port - rebase and address initial set of comments Created 5 years, 11 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
« no previous file with comments | « test/cctest/test-disasm-ppc.cc ('k') | test/cctest/test-heap.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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 __ Ret(); 83 __ Ret();
84 __ SetStackPointer(old_stack_pointer); 84 __ SetStackPointer(old_stack_pointer);
85 #elif V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 85 #elif V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
86 __ push(kRootRegister); 86 __ push(kRootRegister);
87 __ InitializeRootRegister(); 87 __ InitializeRootRegister();
88 __ li(v0, Operand(key)); 88 __ li(v0, Operand(key));
89 __ GetNumberHash(v0, t1); 89 __ GetNumberHash(v0, t1);
90 __ pop(kRootRegister); 90 __ pop(kRootRegister);
91 __ jr(ra); 91 __ jr(ra);
92 __ nop(); 92 __ nop();
93 #elif V8_TARGET_ARCH_PPC
94 __ function_descriptor();
95 __ push(kRootRegister);
96 __ InitializeRootRegister();
97 __ li(r3, Operand(key));
98 __ GetNumberHash(r3, ip);
99 __ pop(kRootRegister);
100 __ blr();
93 #else 101 #else
94 #error Unsupported architecture. 102 #error Unsupported architecture.
95 #endif 103 #endif
96 } 104 }
97 105
98 106
99 void check(uint32_t key) { 107 void check(uint32_t key) {
100 Isolate* isolate = CcTest::i_isolate(); 108 Isolate* isolate = CcTest::i_isolate();
101 Factory* factory = isolate->factory(); 109 Factory* factory = isolate->factory();
102 HandleScope scope(isolate); 110 HandleScope scope(isolate);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Some pseudo-random numbers 153 // Some pseudo-random numbers
146 static const uint32_t kLimit = 1000; 154 static const uint32_t kLimit = 1000;
147 for (uint32_t i = 0; i < 5; i++) { 155 for (uint32_t i = 0; i < 5; i++) {
148 for (uint32_t j = 0; j < 5; j++) { 156 for (uint32_t j = 0; j < 5; j++) {
149 check(PseudoRandom(i, j) % kLimit); 157 check(PseudoRandom(i, j) % kLimit);
150 } 158 }
151 } 159 }
152 } 160 }
153 161
154 #undef __ 162 #undef __
OLDNEW
« no previous file with comments | « test/cctest/test-disasm-ppc.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698