diff options
author | Maksim Panchenko <maks@fb.com> | 2015-09-29 22:09:16 +0000 |
---|---|---|
committer | Maksim Panchenko <maks@fb.com> | 2015-09-29 22:09:16 +0000 |
commit | 3b3752c898d041fcab9455581136ebc6de921610 (patch) | |
tree | 246cb0b831eba0625ab2e3affc81777bc500084c /utils/vim | |
parent | 5518a74f1f5e3f75e41fb2378c927218f6146f7e (diff) |
HHVM calling conventions.
HHVM calling convention, hhvmcc, is used by HHVM JIT for
functions in translated cache. We currently support LLVM back end to
generate code for X86-64 and may support other architectures in the
future.
In HHVM calling convention any GP register could be used to pass and
return values, with the exception of R12 which is reserved for
thread-local area and is callee-saved. Other than R12, we always
pass RBX and RBP as args, which are our virtual machine's stack pointer
and frame pointer respectively.
When we enter translation cache via hhvmcc function, we expect
the stack to be aligned at 16 bytes, i.e. skewed by 8 bytes as opposed
to standard ABI alignment. This affects stack object alignment and stack
adjustments for function calls.
One extra calling convention, hhvm_ccc, is used to call C++ helpers from
HHVM's translation cache. It is almost identical to standard C calling
convention with an exception of first argument which is passed in RBP
(before we use RDI, RSI, etc.)
Differential Revision: http://reviews.llvm.org/D12681
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248832 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/vim')
-rw-r--r-- | utils/vim/syntax/llvm.vim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/vim/syntax/llvm.vim b/utils/vim/syntax/llvm.vim index 8eaa0d6e3fc..422b0971ac8 100644 --- a/utils/vim/syntax/llvm.vim +++ b/utils/vim/syntax/llvm.vim @@ -42,10 +42,11 @@ syn keyword llvmKeyword arm_aapcscc arm_apcscc asm atomic available_externally syn keyword llvmKeyword blockaddress byval c catch cc ccc cleanup coldcc common syn keyword llvmKeyword constant datalayout declare default define deplibs syn keyword llvmKeyword distinct dllexport dllimport except extern_weak external -syn keyword llvmKeyword externally_initialized fastcc filter gc global hidden -syn keyword llvmKeyword initialexec inlinehint inreg intel_ocl_bicc inteldialect -syn keyword llvmKeyword internal linkonce linkonce_odr localdynamic localexec -syn keyword llvmKeyword minsize module monotonic msp430_intrcc naked nest +syn keyword llvmKeyword externally_initialized fastcc filter gc global hhvmcc +syn keyword llvmKeyword hhvm_ccc hidden initialexec inlinehint inreg +syn keyword llvmKeyword intel_ocl_bicc inteldialect internal linkonce +syn keyword llvmKeyword linkonce_odr localdynamic localexec minsize module +syn keyword llvmKeyword monotonic msp430_intrcc musttail naked nest syn keyword llvmKeyword noalias nocapture noimplicitfloat noinline nonlazybind syn keyword llvmKeyword noredzone noreturn nounwind optnone optsize personality syn keyword llvmKeyword private protected ptx_device ptx_kernel readnone |