OLD | NEW |
---|---|
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 Loading... | |
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 #if ABI_USES_FUNCTION_DESCRIPTORS | |
Sven Panne
2015/01/08 10:13:53
Move the #if into function_descriptor() itself and
michael_dawson
2015/01/08 23:51:11
Will do
| |
95 __ function_descriptor(); | |
96 #endif | |
97 __ push(kRootRegister); | |
98 __ InitializeRootRegister(); | |
99 __ li(r3, Operand(key)); | |
100 __ GetNumberHash(r3, ip); | |
101 __ pop(kRootRegister); | |
102 __ blr(); | |
93 #else | 103 #else |
94 #error Unsupported architecture. | 104 #error Unsupported architecture. |
95 #endif | 105 #endif |
96 } | 106 } |
97 | 107 |
98 | 108 |
99 void check(uint32_t key) { | 109 void check(uint32_t key) { |
100 Isolate* isolate = CcTest::i_isolate(); | 110 Isolate* isolate = CcTest::i_isolate(); |
101 Factory* factory = isolate->factory(); | 111 Factory* factory = isolate->factory(); |
102 HandleScope scope(isolate); | 112 HandleScope scope(isolate); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
145 // Some pseudo-random numbers | 155 // Some pseudo-random numbers |
146 static const uint32_t kLimit = 1000; | 156 static const uint32_t kLimit = 1000; |
147 for (uint32_t i = 0; i < 5; i++) { | 157 for (uint32_t i = 0; i < 5; i++) { |
148 for (uint32_t j = 0; j < 5; j++) { | 158 for (uint32_t j = 0; j < 5; j++) { |
149 check(PseudoRandom(i, j) % kLimit); | 159 check(PseudoRandom(i, j) % kLimit); |
150 } | 160 } |
151 } | 161 } |
152 } | 162 } |
153 | 163 |
154 #undef __ | 164 #undef __ |
OLD | NEW |