| Index: src/compiler/ppc/code-generator-ppc.cc
|
| diff --git a/src/compiler/ppc/code-generator-ppc.cc b/src/compiler/ppc/code-generator-ppc.cc
|
| index 1c2246a43e11701b4470547f64e54ea8dc1e6be2..455b0ae97e8c500049fe6ed0290127054474b31b 100644
|
| --- a/src/compiler/ppc/code-generator-ppc.cc
|
| +++ b/src/compiler/ppc/code-generator-ppc.cc
|
| @@ -2028,8 +2028,8 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
| void Generate() final {
|
| PPCOperandConverter i(gen_, instr_);
|
|
|
| - Runtime::FunctionId trap_id = static_cast<Runtime::FunctionId>(
|
| - i.InputInt32(instr_->InputCount() - 1));
|
| + Builtins::Name trap_id =
|
| + static_cast<Builtins::Name>(i.InputInt32(instr_->InputCount() - 1));
|
| bool old_has_frame = __ has_frame();
|
| if (frame_elided_) {
|
| __ set_has_frame(true);
|
| @@ -2042,8 +2042,8 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
| }
|
|
|
| private:
|
| - void GenerateCallToTrap(Runtime::FunctionId trap_id) {
|
| - if (trap_id == Runtime::kNumFunctions) {
|
| + void GenerateCallToTrap(Builtins::Name trap_id) {
|
| + if (trap_id == Builtins::builtin_count) {
|
| // We cannot test calls to the runtime in cctest/test-run-wasm.
|
| // Therefore we emit a call to C here instead of a call to the runtime.
|
| // We use the context register as the scratch register, because we do
|
| @@ -2055,9 +2055,9 @@ void CodeGenerator::AssembleArchTrap(Instruction* instr,
|
| __ LeaveFrame(StackFrame::WASM_COMPILED);
|
| __ Ret();
|
| } else {
|
| - __ Move(cp, Smi::kZero);
|
| gen_->AssembleSourcePosition(instr_);
|
| - __ CallRuntime(trap_id);
|
| + __ Call(handle(isolate()->builtins()->builtin(trap_id), isolate()),
|
| + RelocInfo::CODE_TARGET);
|
| ReferenceMap* reference_map =
|
| new (gen_->zone()) ReferenceMap(gen_->zone());
|
| gen_->RecordSafepoint(reference_map, Safepoint::kSimple, 0,
|
|
|