| 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_S390 |
| 94 __ push(kRootRegister); |
| 95 __ push(ip); |
| 96 __ InitializeRootRegister(); |
| 97 __ lhi(r2, Operand(key)); |
| 98 __ GetNumberHash(r2, ip); |
| 99 __ pop(ip); |
| 100 __ pop(kRootRegister); |
| 101 __ Ret(); |
| 93 #elif V8_TARGET_ARCH_PPC | 102 #elif V8_TARGET_ARCH_PPC |
| 94 __ function_descriptor(); | 103 __ function_descriptor(); |
| 95 __ push(kRootRegister); | 104 __ push(kRootRegister); |
| 96 __ InitializeRootRegister(); | 105 __ InitializeRootRegister(); |
| 97 __ li(r3, Operand(key)); | 106 __ li(r3, Operand(key)); |
| 98 __ GetNumberHash(r3, ip); | 107 __ GetNumberHash(r3, ip); |
| 99 __ pop(kRootRegister); | 108 __ pop(kRootRegister); |
| 100 __ blr(); | 109 __ blr(); |
| 101 #else | 110 #else |
| 102 #error Unsupported architecture. | 111 #error Unsupported architecture. |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // Some pseudo-random numbers | 163 // Some pseudo-random numbers |
| 155 static const uint32_t kLimit = 1000; | 164 static const uint32_t kLimit = 1000; |
| 156 for (uint32_t i = 0; i < 5; i++) { | 165 for (uint32_t i = 0; i < 5; i++) { |
| 157 for (uint32_t j = 0; j < 5; j++) { | 166 for (uint32_t j = 0; j < 5; j++) { |
| 158 check(PseudoRandom(i, j) % kLimit); | 167 check(PseudoRandom(i, j) % kLimit); |
| 159 } | 168 } |
| 160 } | 169 } |
| 161 } | 170 } |
| 162 | 171 |
| 163 #undef __ | 172 #undef __ |
| OLD | NEW |