Convert bindcall to vasm
commit96b958d784db645e7b499f031983b7024c895ff4
authorEdwin Smith <smith@fb.com>
Wed, 15 Oct 2014 20:23:51 +0000 (15 13:23 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Tue, 21 Oct 2014 14:30:27 +0000 (21 07:30 -0700)
tree5626e9a669a12abaf15878f63082cf3833e2a4f0
parent8a2ae8341c78625d39780cb93ba4967ac3609724
Convert bindcall to vasm

Summary: Do bindcall using vasm, by converting emitBindCall to emit the
mainline vasm code to set up and call, and also generate the
REQ_BIND_CALL service request stub at codegen time. The stub
generation is done using a self-contained vasm unit, which we
lower to asm during codegen time.

Removed the Vout& vfrozen param from CodeGenerator, since it
was dead, but also pass in CodeBlock& frozen, since we need it
to generate the ephemeral service request stub. This would cause
an assert if vmain were actually pointing to frozen (marked Unused),
however we never do that.

Also, refactor x64::emitServiceReqImpl() to take a CodeBlock.
The tricky pointer manipulation is all for generating ephemeral
service request stubs, and it's simpler to just pass in a mutable
CodeBlock, which has meaningful base, frontier, and capacity members.

Reviewed By: @swtaarrs

Differential Revision: D1625531
17 files changed:
hphp/runtime/vm/jit/back-end-arm.cpp
hphp/runtime/vm/jit/back-end-x64.cpp
hphp/runtime/vm/jit/code-gen-arm.cpp
hphp/runtime/vm/jit/code-gen-arm.h
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/code-gen-x64.h
hphp/runtime/vm/jit/mc-generator.cpp
hphp/runtime/vm/jit/mc-generator.h
hphp/runtime/vm/jit/service-requests-arm.cpp
hphp/runtime/vm/jit/service-requests-arm.h
hphp/runtime/vm/jit/service-requests-x64.cpp
hphp/runtime/vm/jit/service-requests-x64.h
hphp/runtime/vm/jit/service-requests.h
hphp/runtime/vm/jit/vasm-arm.cpp
hphp/runtime/vm/jit/vasm-print.cpp
hphp/runtime/vm/jit/vasm-x64.cpp
hphp/runtime/vm/jit/vasm-x64.h