| Index: test/cctest/test-hashing.cc
|
| diff --git a/test/cctest/test-hashing.cc b/test/cctest/test-hashing.cc
|
| index 9857f9d88a248c6756dfe8713783ef046034534b..97d5918172a6e293a0a069adbbc5f4a971ebb8b7 100644
|
| --- a/test/cctest/test-hashing.cc
|
| +++ b/test/cctest/test-hashing.cc
|
| @@ -129,6 +129,24 @@ void generate(MacroAssembler* masm, i::Vector<const uint8_t> string) {
|
| __ pop(kRootRegister);
|
| __ jr(ra);
|
| __ nop();
|
| +#elif V8_TARGET_ARCH_PPC
|
| +#if ABI_USES_FUNCTION_DESCRIPTORS
|
| + __ function_descriptor();
|
| +#endif
|
| +
|
| + __ push(kRootRegister);
|
| + __ InitializeRootRegister();
|
| +
|
| + __ li(r3, Operand::Zero());
|
| + __ li(ip, Operand(string.at(0)));
|
| + StringHelper::GenerateHashInit(masm, r3, ip, r0);
|
| + for (int i = 1; i < string.length(); i++) {
|
| + __ li(ip, Operand(string.at(i)));
|
| + StringHelper::GenerateHashAddCharacter(masm, r3, ip, r0);
|
| + }
|
| + StringHelper::GenerateHashGetHash(masm, r3, r0);
|
| + __ pop(kRootRegister);
|
| + __ blr();
|
| #else
|
| #error Unsupported architecture.
|
| #endif
|
| @@ -178,6 +196,16 @@ void generate(MacroAssembler* masm, uint32_t key) {
|
| __ pop(kRootRegister);
|
| __ jr(ra);
|
| __ nop();
|
| +#elif V8_TARGET_ARCH_PPC
|
| +#if ABI_USES_FUNCTION_DESCRIPTORS
|
| + __ function_descriptor();
|
| +#endif
|
| + __ push(kRootRegister);
|
| + __ InitializeRootRegister();
|
| + __ li(r3, Operand(key));
|
| + __ GetNumberHash(r3, ip);
|
| + __ pop(kRootRegister);
|
| + __ blr();
|
| #else
|
| #error Unsupported architecture.
|
| #endif
|
|
|