Module: YTLJit::VM::Node::MethodTopCodeGen

Includes:
AbsArch
Included in:
BlockTopNode, ClassTopNode, MethodTopNode, TopTopNode
Defined in:
lib/ytljit/vm_codegen.rb

Constant Summary

Constants included from AbsArch

AbsArch::AL, AbsArch::BL, AbsArch::CL, AbsArch::DL, AbsArch::FUNC_ARG, AbsArch::FUNC_ARG_YTL, AbsArch::FUNC_FLOAT_ARG, AbsArch::FUNC_FLOAT_ARG_YTL, AbsArch::INDIRECT_BPR, AbsArch::INDIRECT_RETR, AbsArch::INDIRECT_SPR, AbsArch::INDIRECT_TMPR, AbsArch::INDIRECT_TMPR2, AbsArch::INDIRECT_TMPR3

Constants included from SSE

SSE::XMM0, SSE::XMM1, SSE::XMM2, SSE::XMM3, SSE::XMM4, SSE::XMM5, SSE::XMM6, SSE::XMM7

Instance Method Summary collapse

Instance Method Details

#gen_method_prologue(context) ⇒ Object



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/ytljit/vm_codegen.rb', line 487

def gen_method_prologue(context)
  asm = context.assembler

  asm.with_retry do
    # Make linkage of frame pointer
    asm.push(BPR)
    asm.mov(BPR, SPR)
    asm.push(TMPR)
    asm.push(THEPR)
    asm.push(BPR)
    asm.mov(BPR, SPR)
  end
  context.cpustack_push(BPR)
  context.cpustack_push(TMPR)
  context.cpustack_push(THEPR)
  context.cpustack_push(SPR)
    
  context
end