@@ -735,82 +735,6 @@ void translateLoadThreadState(Environ* env, const Instruction* instr) {
735735#endif
736736}
737737
738- void translateYieldInitial (Environ* env, const Instruction* instr) {
739- #if defined(CINDER_X86_64)
740- arch::Builder* as = env->as ;
741-
742- // Load tstate into RDI for call to
743- // JITRT_UnlinkGenFrameAndReturnGenDataFooter.
744-
745- // Consider avoiding reloading the tstate in from memory if it was already in
746- // a register before spilling. Still needs to be in memory though so it can be
747- // recovered after calling JITRT_MakeGenObject* which will trash it.
748- PhyLocation tstate = instr->getInput (0 )->getStackSlot ();
749- as->mov (x86::rdi, x86::ptr (x86::rbp, tstate.loc ));
750-
751- emitCall (
752- *env,
753- reinterpret_cast <uint64_t >(JITRT_UnlinkGenFrameAndReturnGenDataFooter),
754- instr);
755- // This will return pointers to a generator in RAX and JIT data in RDX.
756-
757- // Arbitrary scratch register for use in emitStoreGenYieldPoint(). Any
758- // caller-saved register not used in this scope will do because we're on the
759- // exit path now.
760- auto scratch_r = x86::r9;
761- env->pending_yield_resume_label = as->newLabel ();
762- emitStoreGenYieldPoint (
763- as,
764- env,
765- instr,
766- env->pending_yield_resume_label ,
767- x86::rdx,
768- scratch_r,
769- false /* is_yield_from */ );
770-
771- // The jmp to exit and resume label binding are handled by separate
772- // kBranchToYieldExit and kResumeGenYield instructions.
773- #elif defined(CINDER_AARCH64)
774- arch::Builder* as = env->as ;
775-
776- // Load tstate into X0 for call to
777- // JITRT_UnlinkGenFrameAndReturnGenDataFooter.
778-
779- // Consider avoiding reloading the tstate in from memory if it was already in
780- // a register before spilling. Still needs to be in memory though so it can be
781- // recovered after calling JITRT_MakeGenObject* which will trash it.
782- PhyLocation tstate = instr->getInput (0 )->getStackSlot ();
783- as->ldr (
784- a64::x0,
785- arch::ptr_resolve (as, arch::fp, tstate.loc , arch::reg_scratch_0));
786-
787- emitCall (
788- *env,
789- reinterpret_cast <uint64_t >(JITRT_UnlinkGenFrameAndReturnGenDataFooter),
790- instr);
791- // This will return pointers to a generator in X0 and JIT data in X1.
792-
793- // Arbitrary scratch register for use in emitStoreGenYieldPoint(). Any
794- // caller-saved register not used in this scope will do because we're on the
795- // exit path now.
796- auto scratch_r = arch::reg_scratch_0;
797- env->pending_yield_resume_label = as->newLabel ();
798- emitStoreGenYieldPoint (
799- as,
800- env,
801- instr,
802- env->pending_yield_resume_label ,
803- a64::x1,
804- scratch_r,
805- false /* is_yield_from */ );
806-
807- // The jmp to exit and resume label binding are handled by separate
808- // kBranchToYieldExit and kResumeGenYield instructions.
809- #else
810- CINDER_UNSUPPORTED
811- #endif
812- }
813-
814738void translateStoreGenYieldPoint (Environ* env, const Instruction* instr) {
815739#if defined(CINDER_X86_64)
816740 arch::Builder* as = env->as ;
@@ -2502,9 +2426,6 @@ void AutoTranslator::translateInstr(Environ* env, const Instruction* instr)
25022426 case Instruction::kLoadThreadState :
25032427 translateLoadThreadState (env, instr);
25042428 return ;
2505- case Instruction::kYieldInitial :
2506- translateYieldInitial (env, instr);
2507- return ;
25082429 case Instruction::kStoreGenYieldPoint :
25092430 translateStoreGenYieldPoint (env, instr);
25102431 return ;
@@ -2952,9 +2873,6 @@ void AutoTranslator::translateInstr(Environ* env, const Instruction* instr)
29522873 case Instruction::kLoadThreadState :
29532874 translateLoadThreadState (env, instr);
29542875 return ;
2955- case Instruction::kYieldInitial :
2956- translateYieldInitial (env, instr);
2957- return ;
29582876 case Instruction::kStoreGenYieldPoint :
29592877 translateStoreGenYieldPoint (env, instr);
29602878 return ;
0 commit comments