VASM part 5: decrefs, cgBinaryIntOp, cgBinaryDblOp, less m_rScratch
commit2896895e2ec78e93ff465ce36174314442d41359
authorEdwin Smith <smith@fb.com>
Fri, 16 May 2014 03:40:38 +0000 (15 20:40 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Mon, 18 Aug 2014 20:30:33 +0000 (18 13:30 -0700)
tree947dc5faf070f67969b9c7437ca3ba6144f02f85
parent6338853fb613db7c3fc7d2590dd8d19a70c28d6a
VASM part 5: decrefs, cgBinaryIntOp, cgBinaryDblOp, less m_rScratch

Summary: Converted the decref family of functions. Instead of emitting code
with an unpatched forward jump, and patching it later, the vasm version
creates the "done" block early, and passes it down to the various decref
helpers as the target to use if there's no decrement needed. (cleaner).

Converted cgCallNative so all CALL_OPCODE opcodes are converted.
vasm-ified cgBinaryIntOp and cgBinaryDblOp, and simplified them somewhat
by de-inlining special cases (noncommutative or overflow-detecting).
(these look more complicated now, but get simpler again in patches
higher in the stack).

Reviewed By: @alexmalyshev

Differential Revision: D1460408
hphp/runtime/vm/jit/code-gen-helpers-x64.cpp
hphp/runtime/vm/jit/code-gen-helpers-x64.h
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/code-gen-x64.h
hphp/runtime/vm/jit/mc-generator-internal.h