Add wamrc AoT compiler building support for Windows(MSVC) (#332)

This commit is contained in:
sophy228
2020-08-11 11:30:51 +08:00
committed by GitHub
parent 3be29c3f46
commit 8ad9c1775f
23 changed files with 1186 additions and 23 deletions

View File

@ -0,0 +1,27 @@
;
; Copyright (C) 2019 Intel Corporation. All rights reserved.
; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
;
.386
.model flat
.code
_invokeNative PROC
push ebp
mov ebp,esp
mov ecx, [ebp+16] ; ecx = argc */
mov edx, [ebp+12] ; edx = argv */
test ecx, ecx
jz skip_push_args ; if ecx == 0, skip pushing arguments */
lea edx, [edx+ecx*4-4] ; edx = edx + ecx * 4 - 4 */
sub edx,esp ; edx = edx - esp */
loop_push:
push [esp+edx]
loop loop_push ; loop ecx counts */
skip_push_args:
mov edx, [ebp+8] ; edx = func_ptr */
call edx
leave
ret
_invokeNative ENDP
END