diff --git a/core/iwasm/app-samples/hello-world/build.sh b/core/iwasm/app-samples/hello-world/build.sh new file mode 100755 index 000000000..c856b5d99 --- /dev/null +++ b/core/iwasm/app-samples/hello-world/build.sh @@ -0,0 +1,17 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +emcc -g -O3 *.c -s WASM=1 -s SIDE_MODULE=1 -s ASSERTIONS=1 -s STACK_OVERFLOW_CHECK=2 \ + -s TOTAL_MEMORY=65536 -s TOTAL_STACK=4096 -o test.wasm +#./jeffdump -o test_wasm.h -n wasm_test_file test.wasm diff --git a/core/iwasm/app-samples/hello-world/main.c b/core/iwasm/app-samples/hello-world/main.c new file mode 100644 index 000000000..0db9659b1 --- /dev/null +++ b/core/iwasm/app-samples/hello-world/main.c @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +int main(int argc, char **argv) +{ + char *buf; + + printf("Hello world!\n"); + + buf = malloc(1024); + if (!buf) { + printf("malloc buf failed\n"); + return -1; + } + + printf("buf ptr: %p\n", buf); + + sprintf(buf, "%s", "1234\n"); + printf("buf: %s", buf); + + free(buf); + return 0; +} diff --git a/core/iwasm/lib/app-libs/base/bh_platform.c b/core/iwasm/lib/app-libs/base/bh_platform.c new file mode 100644 index 000000000..0bddcd6ef --- /dev/null +++ b/core/iwasm/lib/app-libs/base/bh_platform.c @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include +#include +#include + +/* + * + * + */ + +static bool is_little_endian() +{ + long i = 0x01020304; + unsigned char* c = (unsigned char*) &i; + return (*c == 0x04) ? true : false; +} + +static void swap32(uint8* pData) +{ + uint8 value = *pData; + *pData = *(pData + 3); + *(pData + 3) = value; + + value = *(pData + 1); + *(pData + 1) = *(pData + 2); + *(pData + 2) = value; +} + +static void swap16(uint8* pData) +{ + uint8 value = *pData; + *(pData) = *(pData + 1); + *(pData + 1) = value; +} + +uint32 htonl(uint32 value) +{ + uint32 ret; + if (is_little_endian()) { + ret = value; + swap32((uint8*) &ret); + return ret; + } + + return value; +} + +uint32 ntohl(uint32 value) +{ + return htonl(value); +} + +uint16 htons(uint16 value) +{ + uint16 ret; + if (is_little_endian()) { + ret = value; + swap16(&ret); + return ret; + } + + return value; +} + +uint16 ntohs(uint16 value) +{ + return htons(value); +} + +char *wa_strdup(const char *s) +{ + char *s1 = NULL; + if (s && (s1 = wa_malloc(strlen(s) + 1))) + memcpy(s1, s, strlen(s) + 1); + return s1; +} + +#define RSIZE_MAX 0x7FFFFFFF +int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, unsigned int n) +{ + char *dest = (char*) s1; + char *src = (char*) s2; + if (n == 0) { + return 0; + } + + if (s1 == NULL || s1max > RSIZE_MAX) { + return -1; + } + if (s2 == NULL || n > s1max) { + memset(dest, 0, s1max); + return -1; + } + memcpy(dest, src, n); + return 0; +} diff --git a/core/iwasm/lib/app-libs/base/bh_platform.h b/core/iwasm/lib/app-libs/base/bh_platform.h new file mode 100755 index 000000000..7d12983bb --- /dev/null +++ b/core/iwasm/lib/app-libs/base/bh_platform.h @@ -0,0 +1,59 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEPS_IWASM_APP_LIBS_BASE_BH_PLATFORM_H_ +#define DEPS_IWASM_APP_LIBS_BASE_BH_PLATFORM_H_ + +#include + +typedef unsigned char uint8; +typedef char int8; +typedef unsigned short uint16; +typedef short int16; +typedef unsigned int uint32; +typedef int int32; + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +#ifndef __cplusplus +#define true 1 +#define false 0 +#define inline __inline +#endif + +// all wasm-app<->native shared source files should use wa_malloc/wa_free. +// they will be mapped to different implementations in each side +#ifndef wa_malloc +#define wa_malloc malloc +#endif + +#ifndef wa_free +#define wa_free free +#endif + +char *wa_strdup(const char *s); + +uint32 htonl(uint32 value); +uint32 ntohl(uint32 value); +uint16 htons(uint16 value); +uint16 ntohs(uint16 value); + +int +b_memcpy_s(void * s1, unsigned int s1max, const void * s2, unsigned int n); + +#endif /* DEPS_IWASM_APP_LIBS_BASE_BH_PLATFORM_H_ */ diff --git a/core/iwasm/lib/app-libs/base/request.c b/core/iwasm/lib/app-libs/base/request.c new file mode 100644 index 000000000..a1611fbfd --- /dev/null +++ b/core/iwasm/lib/app-libs/base/request.c @@ -0,0 +1,357 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "attr-container.h" +#include "request.h" +#include "shared_utils.h" +#include "wasm_app.h" + +#define TRANSACTION_TIMEOUT_MS 5000 + +typedef enum { + Reg_Event, Reg_Request +} reg_type_t; + +typedef struct _res_register { + struct _res_register *next; + const char * url; + reg_type_t reg_type; + void (*request_handler)(request_t *); +} res_register_t; + +typedef struct transaction { + struct transaction *next; + int mid; + unsigned int time; /* start time */ + response_handler_f handler; + void *user_data; +} transaction_t; + +static res_register_t * g_resources = NULL; + +static transaction_t *g_transactions = NULL; + +static user_timer_t g_trans_timer = NULL; + +static transaction_t *transaction_find(int mid) +{ + transaction_t *t = g_transactions; + + while (t) { + if (t->mid == mid) + return t; + t = t->next; + } + + return NULL; +} + +/* + * new transaction is added to the tail of the list, so the list + * is sorted by expiry time naturally. + */ +static void transaction_add(transaction_t *trans) +{ + transaction_t *t; + + if (g_transactions == NULL) { + g_transactions = trans; + return; + } + + t = g_transactions; + while (t) { + if (t->next == NULL) { + t->next = trans; + return; + } + } +} + +static void transaction_remove(transaction_t *trans) +{ + transaction_t *prev = NULL, *current = g_transactions; + + while (current) { + if (current == trans) { + if (prev == NULL) { + g_transactions = current->next; + free(current); + return; + } + prev->next = current->next; + free(current); + return; + } + prev = current; + current = current->next; + } +} + +bool is_event_type(request_t * req) +{ + return req->action == COAP_EVENT; +} + +static bool register_url_handler(const char *url, + request_handler_f request_handler, reg_type_t reg_type) +{ + res_register_t * r = g_resources; + + while (r) { + if (reg_type == r->reg_type && strcmp(r->url, url) == 0) { + r->request_handler = request_handler; + return true; + } + r = r->next; + } + + r = (res_register_t *) malloc(sizeof(res_register_t)); + if (r == NULL) + return false; + + memset(r, 0, sizeof(*r)); + + r->url = strdup(url); + if (!r->url) { + free(r); + return false; + } + + r->request_handler = request_handler; + r->reg_type = reg_type; + r->next = g_resources; + g_resources = r; + + // tell app mgr to route this url to me + if (reg_type == Reg_Request) + wasm_register_resource(url); + else + wasm_sub_event(url); + + return true; +} + +bool api_register_resource_handler(const char *url, + request_handler_f request_handler) +{ + return register_url_handler(url, request_handler, Reg_Request); +} + +static void transaction_timeout_handler(user_timer_t timer) +{ + transaction_t *cur, *expired = NULL; + unsigned int elpased_ms, now = wasm_get_sys_tick_ms(); + + /* + * Since he transaction list is sorted by expiry time naturally, + * we can easily get all expired transactions. + * */ + cur = g_transactions; + while (cur) { + if (now < cur->time) + elpased_ms = now + (0xFFFFFFFF - cur->time) + 1; + else + elpased_ms = now - cur->time; + + if (elpased_ms >= TRANSACTION_TIMEOUT_MS) { + g_transactions = cur->next; + cur->next = expired; + expired = cur; + cur = g_transactions; + } else { + break; + } + } + + /* call each transaction's handler with response set to NULL */ + cur = expired; + while (cur) { + transaction_t *tmp = cur; + cur->handler(NULL, cur->user_data); + cur = cur->next; + free(tmp); + } + + /* + * If the transaction list is not empty, restart the timer according + * to the first transaction. Otherwise, stop the timer. + */ + if (g_transactions != NULL) { + unsigned int elpased_ms, ms_to_expiry, now = wasm_get_sys_tick_ms(); + if (now < g_transactions->time) { + elpased_ms = now + (0xFFFFFFFF - g_transactions->time) + 1; + } else { + elpased_ms = now - g_transactions->time; + } + ms_to_expiry = TRANSACTION_TIMEOUT_MS - elpased_ms; + api_timer_restart(g_trans_timer, ms_to_expiry); + } else { + api_timer_cancel(g_trans_timer); + g_trans_timer = NULL; + } +} + +void api_send_request(request_t * request, response_handler_f response_handler, + void * user_data) +{ + int size; + char *buffer; + transaction_t *trans; + + if ((trans = (transaction_t *) malloc(sizeof(transaction_t))) == NULL) { + printf( + "send request: allocate memory for request transaction failed!\n"); + return; + } + + memset(trans, 0, sizeof(transaction_t)); + trans->handler = response_handler; + trans->mid = request->mid; + trans->time = wasm_get_sys_tick_ms(); + trans->user_data = user_data; + + if ((buffer = pack_request(request, &size)) == NULL) { + printf("send request: pack request failed!\n"); + free(trans); + return; + } + + transaction_add(trans); + + /* if the trans is the 1st one, start the timer */ + if (trans == g_transactions) { + /* assert(g_trans_timer == NULL); */ + if (g_trans_timer == NULL) { + g_trans_timer = api_timer_create(TRANSACTION_TIMEOUT_MS, + false, + true, transaction_timeout_handler); + } + } + + wasm_post_request(buffer, size); + + free_req_resp_packet(buffer); +} + +/* + * + * APIs for the native layers to callback for request/response arrived to this app + * + */ + +void on_response(char * buffer, int size) +{ + response_t response[1]; + transaction_t *trans; + + if (NULL == unpack_response(buffer, size, response)) { + printf("unpack response failed\n"); + return; + } + + if ((trans = transaction_find(response->mid)) == NULL) { + printf("cannot find the transaction\n"); + return; + } + + /* + * When the 1st transaction get response: + * 1. If the 2nd trans exist, restart the timer according to its expiry time; + * 2. Otherwise, stop the timer since there is no more transactions; + */ + if (trans == g_transactions) { + if (trans->next != NULL) { + unsigned int elpased_ms, ms_to_expiry, now = wasm_get_sys_tick_ms(); + if (now < trans->next->time) { + elpased_ms = now + (0xFFFFFFFF - trans->next->time) + 1; + } else { + elpased_ms = now - trans->next->time; + } + ms_to_expiry = TRANSACTION_TIMEOUT_MS - elpased_ms; + api_timer_restart(g_trans_timer, ms_to_expiry); + } else { + api_timer_cancel(g_trans_timer); + g_trans_timer = NULL; + } + } + + trans->handler(response, trans->user_data); + transaction_remove(trans); +} + +void on_request(char *buffer, int size) +{ + request_t request[1]; + bool is_event; + res_register_t *r = g_resources; + + if (NULL == unpack_request(buffer, size, request)) { + printf("unpack request failed\n"); + return; + } + + is_event = is_event_type(request); + + while (r) { + if ((is_event && r->reg_type == Reg_Event) + || (!is_event && r->reg_type == Reg_Request)) { + if (check_url_start(request->url, strlen(request->url), r->url) + > 0) { + r->request_handler(request); + return; + } + } + + r = r->next; + } + + printf("on_request: exit. no service handler\n"); +} + +void api_response_send(response_t *response) +{ + int size; + char * buffer = pack_response(response, &size); + if (buffer == NULL) + return; + + wasm_response_send(buffer, size); + free_req_resp_packet(buffer); +} + +/// event api + +bool api_publish_event(const char *url, int fmt, void *payload, int payload_len) +{ + int size; + request_t request[1]; + init_request(request, url, COAP_EVENT, fmt, payload, payload_len); + char * buffer = pack_request(request, &size); + if (buffer == NULL) + return false; + wasm_post_request(buffer, size); + + free_req_resp_packet(buffer); + + return true; +} + +bool api_subscribe_event(const char * url, request_handler_f handler) +{ + return register_url_handler(url, handler, Reg_Event); +} + diff --git a/core/iwasm/lib/app-libs/base/request.h b/core/iwasm/lib/app-libs/base/request.h new file mode 100644 index 000000000..29bc8fd0f --- /dev/null +++ b/core/iwasm/lib/app-libs/base/request.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AEE_REQUEST_H_ +#define _AEE_REQUEST_H_ + +#include "native_interface.h" +#include "shared_utils.h" + +#ifdef __cplusplus +extern "C" { +#endif + +bool is_event_type(request_t * req); + +typedef void (*request_handler_f)(request_t *); +typedef void (*response_handler_f)(response_t *, void *); + +// Request APIs +bool api_register_resource_handler(const char *url, request_handler_f); +void api_send_request(request_t * request, response_handler_f response_handler, + void * user_data); + +void api_response_send(response_t *response); + +// event API +bool api_publish_event(const char *url, int fmt, void *payload, + int payload_len); + +bool api_subscribe_event(const char * url, request_handler_f handler); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/lib/app-libs/base/timer.c b/core/iwasm/lib/app-libs/base/timer.c new file mode 100644 index 000000000..a86ce39d8 --- /dev/null +++ b/core/iwasm/lib/app-libs/base/timer.c @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "timer_wasm_app.h" +#include "native_interface.h" + +#include +#include + +#if 1 +#include +#else +#define printf (...) +#endif + +struct user_timer { + struct user_timer * next; + int timer_id; + void (*user_timer_callback)(user_timer_t); +}; + +struct user_timer * g_timers = NULL; + +user_timer_t api_timer_create(int interval, bool is_period, bool auto_start, + void (*on_timer_update)(user_timer_t)) +{ + + int timer_id = wasm_create_timer(interval, is_period, auto_start); + + //TODO + struct user_timer * timer = (struct user_timer *) malloc( + sizeof(struct user_timer)); + if (timer == NULL) { + // TODO: remove the timer_id + printf("### api_timer_create malloc faild!!! \n"); + return NULL; + } + + memset(timer, 0, sizeof(*timer)); + timer->timer_id = timer_id; + timer->user_timer_callback = on_timer_update; + + if (g_timers == NULL) + g_timers = timer; + else { + timer->next = g_timers; + g_timers = timer; + } + + return timer; +} + +void api_timer_cancel(user_timer_t timer) +{ + user_timer_t t = g_timers, prev = NULL; + + wasm_timer_cancel(timer->timer_id); + + while (t) { + if (t == timer) { + if (prev == NULL) { + g_timers = t->next; + free(t); + } else { + prev->next = t->next; + free(t); + } + return; + } else { + prev = t; + t = t->next; + } + } +} + +void api_timer_restart(user_timer_t timer, int interval) +{ + wasm_timer_restart(timer->timer_id, interval); +} + +void on_timer_callback(int timer_id) +{ + struct user_timer * t = g_timers; + + while (t) { + if (t->timer_id == timer_id) { + t->user_timer_callback(t); + break; + } + t = t->next; + } +} + diff --git a/core/iwasm/lib/app-libs/base/timer_wasm_app.h b/core/iwasm/lib/app-libs/base/timer_wasm_app.h new file mode 100644 index 000000000..ad8326647 --- /dev/null +++ b/core/iwasm/lib/app-libs/base/timer_wasm_app.h @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AEE_TIMER_H_ +#define _AEE_TIMER_H_ + +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +//TODO: +#define bh_queue_t void + +/* board producer define user_timer */ +struct user_timer; +typedef struct user_timer * user_timer_t; + +// Timer APIs +user_timer_t api_timer_create(int interval, bool is_period, bool auto_start, + void (*on_user_timer_update)(user_timer_t)); +void api_timer_cancel(user_timer_t timer); +void api_timer_restart(user_timer_t timer, int interval); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/lib/app-libs/base/wasm_app.h b/core/iwasm/lib/app-libs/base/wasm_app.h new file mode 100644 index 000000000..5fa9276cb --- /dev/null +++ b/core/iwasm/lib/app-libs/base/wasm_app.h @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2013, Institute for Pervasive Computing, ETH Zurich + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of the Contiki operating system. + */ + +#ifndef _LIB_AEE_H_ +#define _LIB_AEE_H_ + +#include "native_interface.h" +#include "shared_utils.h" +#include "attr-container.h" +#include "request.h" +#include "sensor.h" +#include "timer_wasm_app.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* CoAP request method codes */ +typedef enum { + COAP_GET = 1, COAP_POST, COAP_PUT, COAP_DELETE, COAP_EVENT = (COAP_DELETE + + 2) +} coap_method_t; + +/* CoAP response codes */ +typedef enum { + NO_ERROR = 0, + + CREATED_2_01 = 65, /* CREATED */ + DELETED_2_02 = 66, /* DELETED */ + VALID_2_03 = 67, /* NOT_MODIFIED */ + CHANGED_2_04 = 68, /* CHANGED */ + CONTENT_2_05 = 69, /* OK */ + CONTINUE_2_31 = 95, /* CONTINUE */ + + BAD_REQUEST_4_00 = 128, /* BAD_REQUEST */ + UNAUTHORIZED_4_01 = 129, /* UNAUTHORIZED */ + BAD_OPTION_4_02 = 130, /* BAD_OPTION */ + FORBIDDEN_4_03 = 131, /* FORBIDDEN */ + NOT_FOUND_4_04 = 132, /* NOT_FOUND */ + METHOD_NOT_ALLOWED_4_05 = 133, /* METHOD_NOT_ALLOWED */ + NOT_ACCEPTABLE_4_06 = 134, /* NOT_ACCEPTABLE */ + PRECONDITION_FAILED_4_12 = 140, /* BAD_REQUEST */ + REQUEST_ENTITY_TOO_LARGE_4_13 = 141, /* REQUEST_ENTITY_TOO_LARGE */ + UNSUPPORTED_MEDIA_TYPE_4_15 = 143, /* UNSUPPORTED_MEDIA_TYPE */ + + INTERNAL_SERVER_ERROR_5_00 = 160, /* INTERNAL_SERVER_ERROR */ + NOT_IMPLEMENTED_5_01 = 161, /* NOT_IMPLEMENTED */ + BAD_GATEWAY_5_02 = 162, /* BAD_GATEWAY */ + SERVICE_UNAVAILABLE_5_03 = 163, /* SERVICE_UNAVAILABLE */ + GATEWAY_TIMEOUT_5_04 = 164, /* GATEWAY_TIMEOUT */ + PROXYING_NOT_SUPPORTED_5_05 = 165, /* PROXYING_NOT_SUPPORTED */ + + /* Erbium errors */ + MEMORY_ALLOCATION_ERROR = 192, PACKET_SERIALIZATION_ERROR, + + /* Erbium hooks */ + MANUAL_RESPONSE, PING_RESPONSE +} coap_status_t; + +#ifdef __cplusplus +} +#endif + +#endif /* end of _LIB_AEE_H_ */ diff --git a/core/iwasm/lib/app-libs/extension/sensor/sensor.c b/core/iwasm/lib/app-libs/extension/sensor/sensor.c new file mode 100644 index 000000000..fc05ae664 --- /dev/null +++ b/core/iwasm/lib/app-libs/extension/sensor/sensor.c @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "sensor.h" +#include "native_interface.h" + +typedef struct _sensor { + struct _sensor * next; + char *name; + uint32 handle; + void (*sensor_callback)(sensor_t, attr_container_t *, void *); + void *user_data; +} sensor; + +static sensor_t g_sensors = NULL; + +sensor_t sensor_open(const char* name, int index, + void (*sensor_event_handler)(sensor_t, attr_container_t *, void *), + void *user_data) +{ + uint32 id = wasm_sensor_open(name, index); + if (id == -1) + return NULL; + + //create local node for holding the user callback + sensor_t sensor = (sensor_t) malloc(sizeof(struct _sensor)); + if (sensor == NULL) + return NULL; + + memset(sensor, 0, sizeof(struct _sensor)); + sensor->handle = id; + sensor->name = strdup(name); + sensor->user_data = user_data; + sensor->sensor_callback = sensor_event_handler; + + if (!sensor->name) { + free(sensor); + return NULL; + } + + if (g_sensors == NULL) { + g_sensors = sensor; + } else { + sensor->next = g_sensors; + g_sensors = sensor; + } + + return sensor; +} + +bool sensor_config_with_attr_container(sensor_t sensor, attr_container_t *cfg) +{ + char * buffer; + int len; + + bool ret = wasm_sensor_config_with_attr_container(sensor->handle, buffer, + len); + return ret; +} + +bool sensor_config(sensor_t sensor, int interval, int bit_cfg, int delay) +{ + bool ret = wasm_sensor_config(sensor->handle, interval, bit_cfg, delay); + return ret; +} + +bool sensor_close(sensor_t sensor) +{ + + wasm_sensor_close(sensor->handle); + + // remove local node + sensor_t s = g_sensors; + sensor_t prev = NULL; + while (s) { + if (s == sensor) { + if (prev == NULL) { + g_sensors = s->next; + } else { + prev->next = s->next; + } + free(s->name); + free(s); + return true; + } else { + prev = s; + s = s->next; + } + } + + return false; +} + +/* + * + * API for native layer to callback for sensor events + * + */ + +void on_sensor_event(uint32 sensor_id, char * buffer, int len) +{ + attr_container_t * sensor_data = (attr_container_t *) buffer; + + // ??? use buffer or the attributs struct? + + // lookup the sensor and call the handlers + sensor_t s = g_sensors; + sensor_t prev = NULL; + while (s) { + if (s->handle == sensor_id) { + s->sensor_callback(s, sensor_data, s->user_data); + break; + } + + s = s->next; + } +} diff --git a/core/iwasm/lib/app-libs/extension/sensor/sensor.h b/core/iwasm/lib/app-libs/extension/sensor/sensor.h new file mode 100644 index 000000000..a9295d5f9 --- /dev/null +++ b/core/iwasm/lib/app-libs/extension/sensor/sensor.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _AEE_SENSOR_H_ +#define _AEE_SENSOR_H_ + +#include "attr-container.h" + +#ifdef __cplusplus +extern "C" { +#endif + +//TODO: +#define bh_queue_t void + +/* board producer define sensor */ +struct _sensor; +typedef struct _sensor *sensor_t; + +// Sensor APIs +sensor_t sensor_open(const char* name, int index, + void (*on_sensor_event)(sensor_t, attr_container_t *, void *), + void *user_data); +bool sensor_config(sensor_t sensor, int interval, int bit_cfg, int delay); +bool sensor_config_with_attr_container(sensor_t sensor, attr_container_t *cfg); +bool sensor_close(sensor_t sensor); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/lib/app-libs/libc/lib-base.h b/core/iwasm/lib/app-libs/libc/lib-base.h new file mode 100644 index 000000000..35e4a83d2 --- /dev/null +++ b/core/iwasm/lib/app-libs/libc/lib-base.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LIB_BASE_H_ +#define _LIB_BASE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +void *malloc(size_t size); +void *calloc(size_t n, size_t size); +void free(void *ptr); +int memcmp(const void *s1, const void *s2, size_t n); +void *memcpy(void *dest, const void *src, size_t n); +void *memmove(void *dest, const void *src, size_t n); +void *memset(void *s, int c, size_t n); +int putchar(int c); +int snprintf(char *str, size_t size, const char *format, ...); +int sprintf(char *str, const char *format, ...); +char *strchr(const char *s, int c); +int strcmp(const char *s1, const char *s2); +char *strcpy(char *dest, const char *src); +size_t strlen(const char *s); +int strncmp(const char * str1, const char * str2, size_t n); +char *strncpy(char *dest, const char *src, unsigned long n); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/lib/native-interface/attr-container.c b/core/iwasm/lib/native-interface/attr-container.c new file mode 100644 index 000000000..ed49ceea5 --- /dev/null +++ b/core/iwasm/lib/native-interface/attr-container.c @@ -0,0 +1,841 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "attr-container.h" + +typedef union jvalue { + bool z; + int8_t b; + uint16_t c; + int16_t s; + int32_t i; + int64_t j; + float f; + double d; +} jvalue; + +#define bh_memcpy_s(dest, dlen, src, slen) do { \ + int _ret = slen == 0 ? 0 : b_memcpy_s (dest, dlen, src, slen); \ + (void)_ret; \ + } while (0) + +static inline int16_t get_int16(const char *buf) +{ + int16_t ret; + bh_memcpy_s(&ret, sizeof(int16_t), buf, sizeof(int16_t)); + return ret; +} + +static inline uint16_t get_uint16(const char *buf) +{ + return get_int16(buf); +} + +static inline int32_t get_int32(const char *buf) +{ + int32_t ret; + bh_memcpy_s(&ret, sizeof(int32_t), buf, sizeof(int32_t)); + return ret; +} + +static inline uint32_t get_uint32(const char *buf) +{ + return get_int32(buf); +} + +static inline int64_t get_int64(const char *buf) +{ + int64_t ret; + bh_memcpy_s(&ret, sizeof(int64_t), buf, sizeof(int64_t)); + return ret; +} + +static inline uint64_t get_uint64(const char *buf) +{ + return get_int64(buf); +} + +static inline void set_int16(char *buf, int16_t v) +{ + bh_memcpy_s(buf, sizeof(int16_t), &v, sizeof(int16_t)); +} + +static inline void set_uint16(char *buf, uint16_t v) +{ + bh_memcpy_s(buf, sizeof(uint16_t), &v, sizeof(uint16_t)); +} + +static inline void set_int32(char *buf, int32_t v) +{ + bh_memcpy_s(buf, sizeof(int32_t), &v, sizeof(int32_t)); +} + +static inline void set_uint32(char *buf, uint32_t v) +{ + bh_memcpy_s(buf, sizeof(uint32_t), &v, sizeof(uint32_t)); +} + +static inline void set_int64(char *buf, int64_t v) +{ + bh_memcpy_s(buf, sizeof(int64_t), &v, sizeof(int64_t)); +} + +static inline void set_uint64(char *buf, uint64_t v) +{ + bh_memcpy_s(buf, sizeof(uint64_t), &v, sizeof(uint64_t)); +} + +char* +attr_container_get_attr_begin(const attr_container_t *attr_cont, + uint32_t *p_total_length, uint16_t *p_attr_num) +{ + char *p = (char*) attr_cont->buf; + uint16_t str_len, attr_num; + uint32_t total_length; + + /* skip total length */ + total_length = get_uint32(p); + p += sizeof(uint32_t); + if (!total_length) + return NULL; + + /* tag length */ + str_len = get_uint16(p); + p += sizeof(uint16_t); + if (!str_len) + return NULL; + + /* tag content */ + p += str_len; + if (p - attr_cont->buf >= total_length) + return NULL; + + /* attribute num */ + attr_num = get_uint16(p); + p += sizeof(uint16_t); + if (p - attr_cont->buf >= total_length) + return NULL; + + if (p_total_length) + *p_total_length = total_length; + + if (p_attr_num) + *p_attr_num = attr_num; + + /* first attribute */ + return p; +} + +static char* +attr_container_get_attr_next(const char *curr_attr) +{ + char *p = (char*) curr_attr; + uint8_t type; + + /* key length and key */ + p += sizeof(uint16_t) + get_uint16(p); + type = *p++; + + /* Short type to Boolean type */ + if (type >= ATTR_TYPE_SHORT && type <= ATTR_TYPE_BOOLEAN) { + p += 1 << (type & 3); + return p; + } + /* String type */ + else if (type == ATTR_TYPE_STRING) { + p += sizeof(uint16_t) + get_uint16(p); + return p; + } + /* ByteArray type */ + else if (type == ATTR_TYPE_BYTEARRAY) { + p += sizeof(uint32_t) + get_uint32(p); + return p; + } + + return NULL; +} + +static const char* +attr_container_find_attr(const attr_container_t *attr_cont, const char *key) +{ + uint32_t total_length; + uint16_t str_len, attr_num, i; + const char *p = attr_cont->buf; + + if (!key) + return NULL; + + if (!(p = attr_container_get_attr_begin(attr_cont, &total_length, &attr_num))) + return NULL; + + for (i = 0; i < attr_num; i++) { + /* key length */ + if (!(str_len = get_uint16(p))) + return NULL; + + if (str_len == strlen(key) + 1 + && memcmp(p + sizeof(uint16_t), key, str_len) == 0) { + if (p + sizeof(uint16_t) + str_len - attr_cont->buf >= total_length) + return NULL; + return p; + } + + if (!(p = attr_container_get_attr_next(p))) + return NULL; + } + + return NULL; +} + +char* +attr_container_get_attr_end(const attr_container_t *attr_cont) +{ + uint32_t total_length; + uint16_t attr_num, i; + char *p; + + if (!(p = attr_container_get_attr_begin(attr_cont, &total_length, &attr_num))) + return NULL; + + for (i = 0; i < attr_num; i++) + if (!(p = attr_container_get_attr_next(p))) + return NULL; + + return p; +} + +static char* +attr_container_get_msg_end(attr_container_t *attr_cont) +{ + char *p = attr_cont->buf; + return p + get_uint32(p); +} + +uint16_t attr_container_get_attr_num(const attr_container_t *attr_cont) +{ + uint16_t str_len; + /* skip total length */ + const char *p = attr_cont->buf + sizeof(uint32_t); + + str_len = get_uint16(p); + /* skip tag length and tag */ + p += sizeof(uint16_t) + str_len; + + /* attribute num */ + return get_uint16(p); +} + +static void attr_container_inc_attr_num(attr_container_t *attr_cont) +{ + uint16_t str_len, attr_num; + /* skip total length */ + char *p = attr_cont->buf + sizeof(uint32_t); + + str_len = get_uint16(p); + /* skip tag length and tag */ + p += sizeof(uint16_t) + str_len; + + /* attribute num */ + attr_num = get_uint16(p) + 1; + set_uint16(p, attr_num); +} + +attr_container_t * +attr_container_create(const char *tag) +{ + attr_container_t *attr_cont; + int length, tag_length; + char *p; + + tag_length = tag ? strlen(tag) + 1 : 1; + length = offsetof(attr_container_t, buf) + + /* total length + tag length + tag + reserved 100 bytes */ + sizeof(uint32_t) + sizeof(uint16_t) + tag_length + 100; + + if (!(attr_cont = attr_container_malloc(length))) { + attr_container_printf( + "Create attr_container failed: allocate memory failed.\r\n"); + return NULL; + } + + memset(attr_cont, 0, length); + p = attr_cont->buf; + + /* total length */ + set_uint32(p, length - offsetof(attr_container_t, buf)); + p += 4; + + /* tag length, tag */ + set_uint16(p, tag_length); + p += 2; + if (tag) + bh_memcpy_s(p, tag_length, tag, tag_length); + + return attr_cont; +} + +void attr_container_destroy(const attr_container_t *attr_cont) +{ + if (attr_cont) + attr_container_free((char*) attr_cont); +} + +static bool check_set_attr(attr_container_t **p_attr_cont, const char *key) +{ + uint32_t flags; + + if (!p_attr_cont || !*p_attr_cont || !key || strlen(key) == 0) { + attr_container_printf( + "Set attribute failed: invalid input arguments.\r\n"); + return false; + } + + flags = get_uint32((char*) *p_attr_cont); + if (flags & ATTR_CONT_READONLY_SHIFT) { + attr_container_printf( + "Set attribute failed: attribute container is readonly.\r\n"); + return false; + } + + return true; +} + +bool attr_container_set_attr(attr_container_t **p_attr_cont, const char *key, + int type, const void *value, int value_length) +{ + attr_container_t *attr_cont, *attr_cont1; + uint16_t str_len; + uint32_t total_length, attr_len; + char *p, *p1, *attr_end, *msg_end, *attr_buf; + + if (!check_set_attr(p_attr_cont, key)) { + return false; + } + + attr_cont = *p_attr_cont; + p = attr_cont->buf; + total_length = get_uint32(p); + + if (!(attr_end = attr_container_get_attr_end(attr_cont))) { + attr_container_printf("Set attr failed: get attr end failed.\r\n"); + return false; + } + + msg_end = attr_container_get_msg_end(attr_cont); + + /* key len + key + '\0' + type */ + attr_len = sizeof(uint16_t) + strlen(key) + 1 + 1; + if (type >= ATTR_TYPE_SHORT && type <= ATTR_TYPE_BOOLEAN) + attr_len += 1 << (type & 3); + else if (type == ATTR_TYPE_STRING) + attr_len += sizeof(uint16_t) + value_length; + else if (type == ATTR_TYPE_BYTEARRAY) + attr_len += sizeof(uint32_t) + value_length; + + if (!(p = attr_buf = attr_container_malloc(attr_len))) { + attr_container_printf("Set attr failed: allocate memory failed.\r\n"); + return false; + } + + /* Set the attr buf */ + str_len = strlen(key) + 1; + set_uint16(p, str_len); + p += sizeof(uint16_t); + bh_memcpy_s(p, str_len, key, str_len); + p += str_len; + + *p++ = type; + if (type >= ATTR_TYPE_SHORT && type <= ATTR_TYPE_BOOLEAN) + bh_memcpy_s(p, 1 << (type & 3), value, 1 << (type & 3)); + else if (type == ATTR_TYPE_STRING) { + set_uint16(p, value_length); + p += sizeof(uint16_t); + bh_memcpy_s(p, value_length, value, value_length); + } else if (type == ATTR_TYPE_BYTEARRAY) { + set_uint32(p, value_length); + p += sizeof(uint32_t); + bh_memcpy_s(p, value_length, value, value_length); + } + + if ((p = (char*) attr_container_find_attr(attr_cont, key))) { + /* key found */ + p1 = attr_container_get_attr_next(p); + + if (p1 - p == attr_len) { + bh_memcpy_s(p, attr_len, attr_buf, attr_len); + attr_container_free(attr_buf); + return true; + } + + if (p1 - p + msg_end - attr_end >= attr_len) { + memmove(p, p1, attr_end - p1); + bh_memcpy_s(p + (attr_end - p1), attr_len, attr_buf, attr_len); + attr_container_free(attr_buf); + return true; + } + + total_length += attr_len + 100; + if (!(attr_cont1 = attr_container_malloc( + offsetof(attr_container_t, buf) + total_length))) { + attr_container_printf( + "Set attr failed: allocate memory failed.\r\n"); + attr_container_free(attr_buf); + return false; + } + + bh_memcpy_s(attr_cont1, p - (char* )attr_cont, attr_cont, + p - (char* )attr_cont); + bh_memcpy_s((char* )attr_cont1 + (unsigned )(p - (char* )attr_cont), + attr_end - p1, p1, attr_end - p1); + bh_memcpy_s( + (char* )attr_cont1 + (unsigned )(p - (char* )attr_cont) + + (unsigned )(attr_end - p1), attr_len, attr_buf, + attr_len); + p = attr_cont1->buf; + set_uint32(p, total_length); + *p_attr_cont = attr_cont1; + /* Free original buffer */ + attr_container_free(attr_cont); + attr_container_free(attr_buf); + return true; + } else { + /* key not found */ + if (msg_end - attr_end >= attr_len) { + bh_memcpy_s(attr_end, msg_end - attr_end, attr_buf, attr_len); + attr_container_inc_attr_num(attr_cont); + attr_container_free(attr_buf); + return true; + } + + total_length += attr_len + 100; + if (!(attr_cont1 = attr_container_malloc( + offsetof(attr_container_t, buf) + total_length))) { + attr_container_printf( + "Set attr failed: allocate memory failed.\r\n"); + attr_container_free(attr_buf); + return false; + } + + bh_memcpy_s(attr_cont1, attr_end - (char* )attr_cont, attr_cont, + attr_end - (char* )attr_cont); + bh_memcpy_s( + (char* )attr_cont1 + (unsigned )(attr_end - (char* )attr_cont), + attr_len, attr_buf, attr_len); + attr_container_inc_attr_num(attr_cont1); + p = attr_cont1->buf; + set_uint32(p, total_length); + *p_attr_cont = attr_cont1; + /* Free original buffer */ + attr_container_free(attr_cont); + attr_container_free(attr_buf); + return true; + } + + return false; +} + +bool attr_container_set_short(attr_container_t **p_attr_cont, const char *key, + short value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_SHORT, &value, 2); +} + +bool attr_container_set_int(attr_container_t **p_attr_cont, const char *key, + int value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_INT, &value, 4); +} + +bool attr_container_set_int64(attr_container_t **p_attr_cont, const char *key, + int64_t value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_INT64, &value, 8); +} + +bool attr_container_set_byte(attr_container_t **p_attr_cont, const char *key, + int8_t value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_BYTE, &value, 1); +} + +bool attr_container_set_uint16(attr_container_t **p_attr_cont, const char *key, + uint16_t value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_UINT16, &value, + 2); +} + +bool attr_container_set_float(attr_container_t **p_attr_cont, const char *key, + float value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_FLOAT, &value, 4); +} + +bool attr_container_set_double(attr_container_t **p_attr_cont, const char *key, + double value) +{ + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_DOUBLE, &value, + 8); +} + +bool attr_container_set_bool(attr_container_t **p_attr_cont, const char *key, + bool value) +{ + int8_t value1 = value ? 1 : 0; + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_BOOLEAN, &value1, + 1); +} + +bool attr_container_set_string(attr_container_t **p_attr_cont, const char *key, + const char *value) +{ + if (!value) { + attr_container_printf("Set attr failed: invald input arguments.\r\n"); + return false; + } + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_STRING, value, + strlen(value) + 1);; +} + +bool attr_container_set_bytearray(attr_container_t **p_attr_cont, + const char *key, const int8_t *value, unsigned length) +{ + if (!value) { + attr_container_printf("Set attr failed: invald input arguments.\r\n"); + return false; + } + return attr_container_set_attr(p_attr_cont, key, ATTR_TYPE_BYTEARRAY, value, + length);; +} + +static const char* +attr_container_get_attr(const attr_container_t *attr_cont, const char *key) +{ + const char *attr_addr; + + if (!attr_cont || !key) { + attr_container_printf( + "Get attribute failed: invalid input arguments.\r\n"); + return NULL; + } + + if (!(attr_addr = attr_container_find_attr(attr_cont, key))) { + attr_container_printf("Get attribute failed: lookup key failed.\r\n"); + return false; + } + + /* key len + key + '\0' */ + return attr_addr + 2 + strlen(key) + 1; +} + +#define TEMPLATE_ATTR_BUF_TO_VALUE(attr, key, var_name) do {\ + jvalue val; \ + const char *addr = attr_container_get_attr(attr, key); \ + uint8_t type; \ + if (!addr) \ + return 0; \ + val.j = 0; \ + type = *(uint8_t*)addr++; \ + switch (type) { \ + case ATTR_TYPE_SHORT: \ + case ATTR_TYPE_INT: \ + case ATTR_TYPE_INT64: \ + case ATTR_TYPE_BYTE: \ + case ATTR_TYPE_UINT16: \ + case ATTR_TYPE_FLOAT: \ + case ATTR_TYPE_DOUBLE: \ + case ATTR_TYPE_BOOLEAN: \ + bh_memcpy_s(&val, sizeof(val.var_name), addr, 1 << (type & 3)); \ + break; \ + case ATTR_TYPE_STRING: \ + { \ + unsigned len= get_uint16(addr); \ + addr += 2; \ + if (len > sizeof(val.var_name)) \ + len = sizeof(val.var_name); \ + bh_memcpy_s(&val.var_name, sizeof(val.var_name), addr, len); \ + break; \ + } \ + case ATTR_TYPE_BYTEARRAY: \ + { \ + unsigned len= get_uint32(addr); \ + addr += 4; \ + if (len > sizeof(val.var_name)) \ + len = sizeof(val.var_name); \ + bh_memcpy_s(&val.var_name, sizeof(val.var_name), addr, len); \ + break; \ + } \ + } \ + return val.var_name; \ + } while (0) + +short attr_container_get_as_short(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, s); +} + +int attr_container_get_as_int(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, i); +} + +int64_t attr_container_get_as_int64(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, j); +} + +int8_t attr_container_get_as_byte(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, b); +} + +uint16_t attr_container_get_as_uint16(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, s); +} + +float attr_container_get_as_float(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, f); +} + +double attr_container_get_as_double(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, d); +} + +bool attr_container_get_as_bool(const attr_container_t *attr_cont, + const char *key) +{ + TEMPLATE_ATTR_BUF_TO_VALUE(attr_cont, key, z); +} + +const int8_t* +attr_container_get_as_bytearray(const attr_container_t *attr_cont, + const char *key, unsigned *array_length) +{ + const char *addr = attr_container_get_attr(attr_cont, key); + uint8_t type; + uint32_t length; + + if (!addr) + return NULL; + + if (!array_length) { + attr_container_printf("Get attribute failed: invalid input arguments."); + return NULL; + } + + type = *(uint8_t*) addr++; + switch (type) { + case ATTR_TYPE_SHORT: + case ATTR_TYPE_INT: + case ATTR_TYPE_INT64: + case ATTR_TYPE_BYTE: + case ATTR_TYPE_UINT16: + case ATTR_TYPE_FLOAT: + case ATTR_TYPE_DOUBLE: + case ATTR_TYPE_BOOLEAN: + length = 1 << (type & 3); + break; + case ATTR_TYPE_STRING: + length = get_uint16(addr); + addr += 2; + break; + case ATTR_TYPE_BYTEARRAY: + length = get_uint32(addr); + addr += 4; + break; + default: + return NULL; + } + + *array_length = length; + return (const int8_t*) addr; +} + +char* +attr_container_get_as_string(const attr_container_t *attr_cont, const char *key) +{ + unsigned array_length; + return (char*) attr_container_get_as_bytearray(attr_cont, key, + &array_length); +} + +const char* +attr_container_get_tag(const attr_container_t *attr_cont) +{ + return attr_cont ? + attr_cont->buf + sizeof(uint32_t) + sizeof(uint16_t) : NULL; +} + +bool attr_container_contain_key(const attr_container_t *attr_cont, + const char *key) +{ + if (!attr_cont || !key || !strlen(key)) { + attr_container_printf( + "Check contain key failed: invalid input arguments.\r\n"); + return false; + } + return attr_container_find_attr(attr_cont, key) ? true : false; +} + +unsigned int attr_container_get_serialize_length( + const attr_container_t *attr_cont) +{ + const char *p; + + if (!attr_cont) { + attr_container_printf( + "Get container serialize length failed: invalid input arguments.\r\n"); + return 0; + } + + p = attr_cont->buf; + return sizeof(uint16_t) + get_uint32(p); +} + +bool attr_container_serialize(char *buf, const attr_container_t *attr_cont) +{ + const char *p; + uint16_t flags; + uint32_t length; + + if (!buf || !attr_cont) { + attr_container_printf( + "Container serialize failed: invalid input arguments.\r\n"); + return false; + } + + p = attr_cont->buf; + length = sizeof(uint16_t) + get_uint32(p); + bh_memcpy_s(buf, length, attr_cont, length); + /* Set readonly */ + flags = get_uint16((const char*) attr_cont); + set_uint16(buf, flags | (1 << ATTR_CONT_READONLY_SHIFT)); + + return true; +} + +bool attr_container_is_constant(const attr_container_t* attr_cont) +{ + uint16_t flags; + + if (!attr_cont) { + attr_container_printf( + "Container check const: invalid input arguments.\r\n"); + return false; + } + + flags = get_uint16((const char*) attr_cont); + return (flags & (1 << ATTR_CONT_READONLY_SHIFT)) ? true : false; +} + +void attr_container_dump(const attr_container_t *attr_cont) +{ + uint32_t total_length; + uint16_t attr_num, i, type; + const char *p, *tag, *key; + jvalue value; + + if (!attr_cont) + return; + + tag = attr_container_get_tag(attr_cont); + if (!tag) + return; + + attr_container_printf("Attribute container dump:\n"); + attr_container_printf("Tag: %s\n", tag); + + p = attr_container_get_attr_begin(attr_cont, &total_length, &attr_num); + if (!p) + return; + + attr_container_printf("Attribute list:\n"); + for (i = 0; i < attr_num; i++) { + key = p + 2; + /* Skip key len and key */ + p += 2 + get_uint16(p); + type = *p++; + attr_container_printf(" key: %s", key); + + switch (type) { + case ATTR_TYPE_SHORT: + bh_memcpy_s(&value.s, sizeof(int16_t), p, sizeof(int16_t)); + attr_container_printf(", type: short, value: 0x%x\n", + value.s & 0xFFFF); + p += 2; + break; + case ATTR_TYPE_INT: + bh_memcpy_s(&value.i, sizeof(int32_t), p, sizeof(int32_t)); + attr_container_printf(", type: int, value: 0x%x\n", value.i); + p += 4; + break; + case ATTR_TYPE_INT64: + bh_memcpy_s(&value.j, sizeof(uint64_t), p, sizeof(uint64_t)); + attr_container_printf(", type: int64, value: 0x%llx\n", value.j); + p += 8; + break; + case ATTR_TYPE_BYTE: + bh_memcpy_s(&value.b, 1, p, 1); + attr_container_printf(", type: byte, value: 0x%x\n", + value.b & 0xFF); + p++; + break; + case ATTR_TYPE_UINT16: + bh_memcpy_s(&value.c, sizeof(uint16_t), p, sizeof(uint16_t)); + attr_container_printf(", type: uint16, value: 0x%x\n", value.c); + p += 2; + break; + case ATTR_TYPE_FLOAT: + bh_memcpy_s(&value.f, sizeof(float), p, sizeof(float)); + attr_container_printf(", type: float, value: %f\n", value.f); + p += 4; + break; + case ATTR_TYPE_DOUBLE: + bh_memcpy_s(&value.d, sizeof(double), p, sizeof(double)); + attr_container_printf(", type: double, value: %f\n", value.d); + p += 8; + break; + case ATTR_TYPE_BOOLEAN: + bh_memcpy_s(&value.z, 1, p, 1); + attr_container_printf(", type: bool, value: 0x%x\n", value.z); + p++; + break; + case ATTR_TYPE_STRING: + attr_container_printf(", type: string, value: %s\n", + p + sizeof(uint16_t)); + p += sizeof(uint16_t) + get_uint16(p); + break; + case ATTR_TYPE_BYTEARRAY: + attr_container_printf(", type: byte array, length: %d\n", + get_uint32(p)); + p += sizeof(uint32_t) + get_uint32(p); + break; + } + } + + attr_container_printf("\n"); +} + diff --git a/core/iwasm/lib/native-interface/attr-container.h b/core/iwasm/lib/native-interface/attr-container.h new file mode 100644 index 000000000..2b093bf0d --- /dev/null +++ b/core/iwasm/lib/native-interface/attr-container.h @@ -0,0 +1,436 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _ATTR_CONTAINER_H_ +#define _ATTR_CONTAINER_H_ + +#include +#include +#include +#include +#include +#include +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Attribute type */ +enum { + ATTR_TYPE_BEGIN = 1, + ATTR_TYPE_SHORT = ATTR_TYPE_BEGIN, + ATTR_TYPE_INT, + ATTR_TYPE_INT64, + ATTR_TYPE_BYTE, + ATTR_TYPE_UINT16, + ATTR_TYPE_FLOAT, + ATTR_TYPE_DOUBLE, + ATTR_TYPE_BOOLEAN, + ATTR_TYPE_STRING, + ATTR_TYPE_BYTEARRAY, + ATTR_TYPE_END = ATTR_TYPE_BYTEARRAY +}; + +#define ATTR_CONT_READONLY_SHIFT 2 + +typedef struct attr_container { + /* container flag: + * bit0, bit1 denote the implemenation algorithm, 00: buffer, 01: link list + * bit2 denotes the readonly flag: 1 is readonly and attr cannot be set + */ + char flags[2]; + /** + * Buffer format + * for buffer implementation: + * buf length (4 bytes) + * tag length (2 bytes) + * tag + * attr num (2bytes) + * attr[0..n-1]: + * attr key length (2 bytes) + * attr type (1byte) + * attr value (length depends on attr type) + */ + char buf[1]; +} attr_container_t; + +/** + * Create attribute container + * + * @param tag tag of current attribute container + * + * @return the created attribute container, NULL if failed + */ +attr_container_t * +attr_container_create(const char *tag); + +/** + * Destroy attribute container + * + * @param attr_cont the attribute container to destroy + */ +void +attr_container_destroy(const attr_container_t *attr_cont); + +/** + * Set short attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_short(attr_container_t **p_attr_cont, const char *key, + short value); + +/** + * Set int attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_int(attr_container_t **p_attr_cont, const char *key, + int value); + +/** + * Set int64 attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_int64(attr_container_t **p_attr_cont, const char *key, + int64_t value); + +/** + * Set byte attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_byte(attr_container_t **p_attr_cont, const char *key, + int8_t value); + +/** + * Set uint16 attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_uint16(attr_container_t **p_attr_cont, const char *key, + uint16_t value); + +/** + * Set float attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_float(attr_container_t **p_attr_cont, const char *key, + float value); + +/** + * Set double attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_double(attr_container_t **p_attr_cont, const char *key, + double value); + +/** + * Set bool attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_bool(attr_container_t **p_attr_cont, const char *key, + bool value); + +/** + * Set string attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the attribute value + * + * @return true if success, false otherwise + */ +bool +attr_container_set_string(attr_container_t **p_attr_cont, const char *key, + const char *value); + +/** + * Set bytearray attribute in attribute container + * + * @param p_attr_cont pointer to attribute container to set attribute, and + * return the new attribute container if it is re-created + * @param key the attribute key + * @param value the bytearray buffer + * @param length the bytearray length + * + * @return true if success, false otherwise + */ +bool +attr_container_set_bytearray(attr_container_t **p_attr_cont, const char *key, + const int8_t *value, unsigned length); + +/** + * Get tag of current attribute container + * + * @param attr_cont the attribute container + * + * @return tag of current attribute container + */ +const char* +attr_container_get_tag(const attr_container_t *attr_cont); + +/** + * Get attribute number of current attribute container + * + * @param attr_cont the attribute container + * + * @return attribute number of current attribute container + */ +uint16_t +attr_container_get_attr_num(const attr_container_t *attr_cont); + +/** + * Whether the attribute container contains an attribute key. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return true if key is contained in message, false otherwise + */ +bool +attr_container_contain_key(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as short value, + * return 0 if attribute isn't found in message. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the short value of the attribute, 0 if key isn't found + */ +short +attr_container_get_as_short(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as int value, + * return 0 if attribute isn't found in message. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the int value of the attribute, 0 if key isn't found + */ +int +attr_container_get_as_int(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as int64 value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the long value of the attribute, 0 if key isn't found + */ +int64_t +attr_container_get_as_int64(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as byte value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the byte value of the attribute, 0 if key isn't found + */ +int8_t +attr_container_get_as_byte(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as uint16 value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the char value of the attribute, 0 if key isn't found + */ +uint16_t +attr_container_get_as_uint16(const attr_container_t *attr_cont, + const char *key); + +/** + * Get attribute from attribute container and return it as float value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the float value of the attribute, 0 if key isn't found + */ +float +attr_container_get_as_float(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as double value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the double value of the attribute, 0 if key isn't found + */ +double +attr_container_get_as_double(const attr_container_t *attr_cont, + const char *key); + +/** + * Get attribute from attribute container and return it as bool value, + * return false if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the bool value of the attribute, 0 if key isn't found + */ +bool +attr_container_get_as_bool(const attr_container_t *attr_cont, const char *key); + +/** + * Get attribute from attribute container and return it as string value, + * return NULL if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the string value of the attribute, NULL if key isn't found + */ +char* +attr_container_get_as_string(const attr_container_t *attr_cont, + const char *key); + +/** + * Get attribute from attribute container and return it as bytearray value, + * return 0 if attribute isn't found in attribute container. + * + * @param attr_cont the attribute container + * @param key the attribute key + * + * @return the bytearray value of the attribute, NULL if key isn't found + */ +const int8_t* +attr_container_get_as_bytearray(const attr_container_t *attr_cont, + const char *key, unsigned *array_length); + +/** + * Get the buffer size of attribute container + * + * @param attr_cont the attribute container + * + * @return the buffer size of attribute container + */ +unsigned +attr_container_get_serialize_length(const attr_container_t *attr_cont); + +/** + * Serialize attribute container to a buffer + * + * @param buf the buffer to receive the serialized data + * @param attr_cont the attribute container to be serialized + * + * @return true if success, false otherwise + */ +bool +attr_container_serialize(char *buf, const attr_container_t *attr_cont); + +/** + * Whether the attribute container is const, or set attribute isn't supported + * + * @param attr_cont the attribute container + * + * @return true if const, false otherwise + */ +bool +attr_container_is_constant(const attr_container_t* attr_cont); + +void +attr_container_dump(const attr_container_t *attr_cont); + +#ifndef attr_container_malloc +#define attr_container_malloc wa_malloc +#endif + +#ifndef attr_container_free +#define attr_container_free wa_free +#endif + +#ifndef attr_container_printf +#define attr_container_printf printf +#endif + +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + +#endif /* end of _ATTR_CONTAINER_H_ */ + diff --git a/core/iwasm/lib/native-interface/native_interface.cmake b/core/iwasm/lib/native-interface/native_interface.cmake new file mode 100644 index 000000000..b7d442964 --- /dev/null +++ b/core/iwasm/lib/native-interface/native_interface.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (NATIVE_INTERFACE_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${NATIVE_INTERFACE_DIR}) + + +file (GLOB_RECURSE source_all ${NATIVE_INTERFACE_DIR}/*.c) + +set (NATIVE_INTERFACE_SOURCE ${source_all}) + diff --git a/core/iwasm/lib/native-interface/native_interface.h b/core/iwasm/lib/native-interface/native_interface.h new file mode 100644 index 000000000..a538330b7 --- /dev/null +++ b/core/iwasm/lib/native-interface/native_interface.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_NATIVE_INTERFACE_H_ +#define DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_NATIVE_INTERFACE_H_ + +// note: the bh_plaform.h is the only head file separately +// implemented by both [app] and [native] worlds +#include "bh_platform.h" + +#define get_module_inst() \ + wasm_runtime_get_current_module_inst() + +#define validate_app_addr(offset, size) \ + wasm_runtime_validate_app_addr(module_inst, offset, size) + +#define addr_app_to_native(offset) \ + wasm_runtime_addr_app_to_native(module_inst, offset) + +#define addr_native_to_app(ptr) \ + wasm_runtime_addr_native_to_app(module_inst, ptr) + +#define module_malloc(size) \ + wasm_runtime_module_malloc(module_inst, size) + +#define module_free(offset) \ + wasm_runtime_module_free(module_inst, offset) + +char *wa_strdup(const char *); + +bool +wasm_response_send(int32 buffer_offset, int size); + +void wasm_register_resource(int32 url_offset); + +void wasm_post_request(int32 buffer_offset, int size); + +void wasm_sub_event(int32 url_offset); + +/* + * ************* sensor interfaces ************* + */ + +bool +wasm_sensor_config(uint32 sensor, int interval, int bit_cfg, int delay); +uint32 +wasm_sensor_open(int32 name_offset, int instance); +bool +wasm_sensor_config_with_attr_container(uint32 sensor, int32 buffer_offset, + int len); + +bool +wasm_sensor_close(uint32 sensor); + +/* + * *** timer interface *** + */ + +typedef unsigned int timer_id_t; +timer_id_t wasm_create_timer(int interval, bool is_period, bool auto_start); +void wasm_timer_destory(timer_id_t timer_id); +void wasm_timer_cancel(timer_id_t timer_id); +void wasm_timer_restart(timer_id_t timer_id, int interval); +uint32 wasm_get_sys_tick_ms(void); +#endif /* DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_NATIVE_INTERFACE_H_ */ diff --git a/core/iwasm/lib/native-interface/readme.txt b/core/iwasm/lib/native-interface/readme.txt new file mode 100644 index 000000000..e3b59042b --- /dev/null +++ b/core/iwasm/lib/native-interface/readme.txt @@ -0,0 +1,12 @@ +Attention: +======= +Only add files are shared by both wasm application and native runtime into this directory! + +The c files are both compiled into the the WASM APP and native runtime. + +native_interface.h +============= +The interface declaration for the native API which are exposed to the WASM app + +Any API in this file should be incuded with EXPORT_WASM_API() somewhere. + diff --git a/core/iwasm/lib/native-interface/restful_utils.c b/core/iwasm/lib/native-interface/restful_utils.c new file mode 100644 index 000000000..5240494ec --- /dev/null +++ b/core/iwasm/lib/native-interface/restful_utils.c @@ -0,0 +1,424 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include "native_interface.h" +#include "shared_utils.h" + +/* Serialization of request and response message + * + * Choices: + * We considered a few options: + * 1. coap + * 2. flatbuffer + * 3. cbor + * 4. attr-containers of our own + * 5. customized serialization for request/response + * + * Now we choose the #5 mainly because we need to quickly get the URL for dispatching + * and sometimes we want to change the URL in the original packet. the request format: + * fixed part: version: (1 byte), code (1 byte), fmt(2 byte), mid (4 bytes), sender_id(4 bytes), url_len(2 bytes), payload_len(4bytes) + * dynamic part: url (bytes in url_len), payload + * + * response format: + * fixed part: (1 byte), code (1 byte), fmt(2 byte), mid (4 bytes), sender_id(4 bytes), payload_len(4bytes) + * dynamic part: payload + */ +#define REQUES_PACKET_VER 1 +#define REQUEST_PACKET_FIX_PART_LEN 18 +#define REQUEST_PACKET_URL_OFFSET REQUEST_PACKET_FIX_PART_LEN +#define REQUEST_PACKET_URL_LEN *((uint16*)( (char*) buffer + 12))) //!!! to ensure little endian +#define REQUEST_PACKET_PAYLOAD_LEN *((uint32*)( (char*) buffer + 14))) //!!! to ensure little endian +#define REQUEST_PACKET_URL(buffer) ((char*) buffer + REQUEST_PACKET_URL_OFFSET) +#define REQUEST_PACKET_PAYLOAD(buffer) ((char*) buffer + REQUEST_PACKET_URL_OFFSET + REQUEST_PACKET_URL_LEN(buffer)) + +#define RESPONSE_PACKET_FIX_PART_LEN 16 + +char * pack_request(request_t *request, int * size) +{ + int url_len = strlen(request->url) + 1; + int len = REQUEST_PACKET_FIX_PART_LEN + url_len + request->payload_len; + char * packet = (char*) wa_malloc(len); + if (packet == NULL) + return NULL; + + // TODO: ensure little endian for words and dwords + *packet = REQUES_PACKET_VER; + *((uint8*) (packet + 1)) = request->action; + *((uint16*) (packet + 2)) = htons(request->fmt); + *((uint32*) (packet + 4)) = htonl(request->mid); + *((uint32*) (packet + 8)) = htonl(request->sender); + *((uint16*) (packet + 12)) = htons(url_len); + *((uint32*) (packet + 14)) = htonl(request->payload_len); + strcpy(packet + REQUEST_PACKET_URL_OFFSET, request->url); + memcpy(packet + REQUEST_PACKET_URL_OFFSET + url_len, request->payload, + request->payload_len); + + *size = len; + return packet; +} + +void free_req_resp_packet(char * packet) +{ + wa_free(packet); +} + +request_t * unpack_request(char * packet, int size, request_t * request) +{ + if (*packet != REQUES_PACKET_VER) { + printf("version fail\n"); + return NULL; + } + if (size < REQUEST_PACKET_FIX_PART_LEN) { + printf("size error: %d\n", size); + return NULL; + } + uint16 url_len = ntohs(*((uint16*) (packet + 12))); + uint32 payload_len = ntohl(*((uint32*) (packet + 14))); + + if (size != ( REQUEST_PACKET_FIX_PART_LEN + url_len + payload_len)) { + printf("size error: %d, expect: %d\n", size, + REQUEST_PACKET_FIX_PART_LEN + url_len + payload_len); + return NULL; + } + if (*(packet + REQUEST_PACKET_FIX_PART_LEN + url_len - 1) != 0) { + printf("url not end with 0\n"); + return NULL; + } + + request->action = *((uint8*) (packet + 1)); + request->fmt = ntohs(*((uint16*) (packet + 2))); + request->mid = ntohl(*((uint32*) (packet + 4))); + request->sender = ntohl(*((uint32*) (packet + 8))); + request->payload_len = payload_len; + request->url = REQUEST_PACKET_URL(packet); + request->payload = packet + REQUEST_PACKET_URL_OFFSET + url_len; + + return request; +} + +char * pack_response(response_t *response, int * size) +{ + int len = RESPONSE_PACKET_FIX_PART_LEN + response->payload_len; + char * packet = (char*) wa_malloc(len); + if (packet == NULL) + return NULL; + + // TODO: ensure little endian for words and dwords + *packet = REQUES_PACKET_VER; + *((uint8*) (packet + 1)) = response->status; + *((uint16*) (packet + 2)) = htons(response->fmt); + *((uint32*) (packet + 4)) = htonl(response->mid); + *((uint32*) (packet + 8)) = htonl(response->reciever); + *((uint32*) (packet + 12)) = htonl(response->payload_len); + memcpy(packet + RESPONSE_PACKET_FIX_PART_LEN, response->payload, + response->payload_len); + + *size = len; + return packet; +} + +response_t * unpack_response(char * packet, int size, response_t * response) +{ + if (*packet != REQUES_PACKET_VER) + return NULL; + if (size < RESPONSE_PACKET_FIX_PART_LEN) + return NULL; + uint32 payload_len = ntohl(*((uint32*) (packet + 12))); + if (size != ( RESPONSE_PACKET_FIX_PART_LEN + payload_len)) + return NULL; + + response->status = *((uint8*) (packet + 1)); + response->fmt = ntohs(*((uint16*) (packet + 2))); + response->mid = ntohl(*((uint32*) (packet + 4))); + response->reciever = ntohl(*((uint32*) (packet + 8))); + response->payload_len = payload_len; + response->payload = packet + RESPONSE_PACKET_FIX_PART_LEN; + + return response; +} + +request_t *clone_request(request_t *request) +{ + /* deep clone */ + request_t *req = (request_t *) wa_malloc(sizeof(request_t)); + if (req == NULL) + return NULL; + + memset(req, 0, sizeof(*req)); + req->action = request->action; + req->fmt = request->fmt; + req->url = wa_strdup(request->url); + req->sender = request->sender; + req->mid = request->mid; + + if (req->url == NULL) + goto fail; + + req->payload_len = request->payload_len; + + if (request->payload_len) { + req->payload = (char *) wa_malloc(request->payload_len); + if (!req->payload) + goto fail; + memcpy(req->payload, request->payload, request->payload_len); + } else { + // when payload_len is 0, the payload may be used for carrying some handle or integer + req->payload = request->payload; + } + + return req; + + fail: request_cleaner(req); + return NULL; +} + +void request_cleaner(request_t *request) +{ + if (request->url != NULL) + wa_free(request->url); + if (request->payload != NULL && request->payload_len > 0) + wa_free(request->payload); + + wa_free(request); +} + +void response_cleaner(response_t * response) +{ + if (response->payload != NULL && response->payload_len > 0) + wa_free(response->payload); + + wa_free(response); +} + +response_t * clone_response(response_t * response) +{ + response_t *clone = (response_t *) wa_malloc(sizeof(response_t)); + if (clone == NULL) + return NULL; + + memset(clone, 0, sizeof(*clone)); + clone->fmt = response->fmt; + clone->mid = response->mid; + clone->status = response->status; + clone->reciever = response->reciever; + clone->payload_len = response->payload_len; + if (clone->payload_len) { + clone->payload = (char *) wa_malloc(response->payload_len); + if (!clone->payload) + goto fail; + memcpy(clone->payload, response->payload, response->payload_len); + } else { + // when payload_len is 0, the payload may be used for carrying some handle or integer + clone->payload = response->payload; + } + return clone; + + fail: response_cleaner(clone); + return NULL; +} + +response_t * set_response(response_t * response, int status, int fmt, + const char *payload, int payload_len) +{ + response->payload = payload; + response->payload_len = payload_len; + response->status = status; + response->fmt = fmt; + return response; +} + +response_t * make_response_for_request(request_t * request, + response_t * response) +{ + response->mid = request->mid; + response->reciever = request->sender; + + return response; +} + +request_t * init_request(request_t * request, char *url, int action, int fmt, + void *payload, int payload_len) +{ + static unsigned int mid = 0; + request->url = url; + request->action = action; + request->fmt = fmt; + request->payload = payload; + request->payload_len = payload_len; + request->mid = ++mid; + + return request; +} + +/* + check if the "url" is starting with "leading_str" + return: 0 - not match; >0 - the offset of matched url, include any "/" at the end + notes: + 1. it ensures the leading_str "/abc" can pass "/abc/cde" and "/abc/, but fail "/ab" and "/abcd". + leading_str "/abc/" can pass "/abc" + 2. it omit the '/' at the first char + 3. it ensure the leading_str "/abc" can pass "/abc?cde + */ + +int check_url_start(const char* url, int url_len, const char * leading_str) +{ + int offset = 0; + if (*leading_str == '/') + leading_str++; + if (url_len > 0 && *url == '/') { + url_len--; + url++; + offset++; + } + + int len = strlen(leading_str); + if (len == 0) + return 0; + + // ensure leading_str not end with "/" + if (leading_str[len - 1] == '/') { + len--; + if (len == 0) + return 0; + } + + // equal length + if (url_len == len) { + if (memcmp(url, leading_str, url_len) == 0) { + return (offset + len); + } else { + return 0; + } + } + + if (url_len < len) + return 0; + + else if (memcmp(url, leading_str, len) != 0) + return 0; + + else if (url[len] != '/' && url[len] != '?') + return 0; + else + return (offset + len + 1); +} + +// * @pattern: +// * sample 1: /abcd, match /abcd only +// * sample 2: /abcd/ match match "/abcd" and "/abcd/*" +// * sample 3: /abcd*, match any url started with "/abcd" +// * sample 4: /abcd/*, exclude "/abcd" + +bool match_url(char * pattern, char * matched) +{ + if (*pattern == '/') + pattern++; + if (*matched == '/') + matched++; + + int matched_len = strlen(matched); + if (matched_len == 0) + return false; + + if (matched[matched_len - 1] == '/') { + matched_len--; + if (matched_len == 0) + return false; + } + + int len = strlen(pattern); + if (len == 0) + return false; + + if (pattern[len - 1] == '/') { + len--; + if (strncmp(pattern, matched, len) != 0) + return false; + + if (len == matched_len) + return true; + + if (matched_len > len && matched[len] == '/') + return true; + + return false; + + } else if (pattern[len - 1] == '*') { + if (pattern[len - 2] == '/') { + if (strncmp(pattern, matched, len - 1) == 0) + return true; + + else + return false; + } else { + return (strncmp(pattern, matched, len - 1) == 0); + } + } else { + return (strcmp(pattern, matched) == 0); + } +} + +/* + * get the value of the key from following format buffer: + * key1=value1;key2=value2;key3=value3 + */ +char * find_key_value(char * buffer, int buffer_len, char * key, char * value, + int value_len, char delimiter) +{ + char * p = buffer; + int i = 0; + int remaining = buffer_len; + int key_len = strlen(key); + + char * item_start = p; + while (*p != 0 && remaining > 0) { + while (*p == ' ' || *p == delimiter) { + p++; + remaining--; + } + + if (remaining <= key_len) + return NULL; + + // find the key + if (0 == strncmp(p, key, key_len) && p[key_len] == '=') { + p += (key_len + 1); + remaining -= (key_len + 1); + char * v = value; + memset(value, 0, value_len); + value_len--; // ensure last char is 0 + while (*p != delimiter && remaining > 0 && value_len > 0) { + *v++ = *p++; + remaining--; + value_len--; + } + return value; + } + + // goto next key + while (*p != delimiter && remaining > 0) { + p++; + remaining--; + } + } + + return NULL; +} diff --git a/core/iwasm/lib/native-interface/sensor_api.h b/core/iwasm/lib/native-interface/sensor_api.h new file mode 100644 index 000000000..0f8a8583b --- /dev/null +++ b/core/iwasm/lib/native-interface/sensor_api.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEPS_IWASM_APP_LIBS_NATIVE_INTERFACE_SENSOR_API_H_ +#define DEPS_IWASM_APP_LIBS_NATIVE_INTERFACE_SENSOR_API_H_ +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint32 +wasm_sensor_open(const char* name, int instance); + +bool +wasm_sensor_config(uint32 sensor, int interval, int bit_cfg, int delay); + +bool +wasm_sensor_config_with_attr_container(uint32 sensor, char * buffer, int len); + +bool +wasm_sensor_close(uint32 sensor); + +#ifdef __cplusplus +} +#endif + +#endif /* DEPS_IWASM_APP_LIBS_NATIVE_INTERFACE_SENSOR_API_H_ */ diff --git a/core/iwasm/lib/native-interface/shared_utils.h b/core/iwasm/lib/native-interface/shared_utils.h new file mode 100644 index 000000000..1cc3ede50 --- /dev/null +++ b/core/iwasm/lib/native-interface/shared_utils.h @@ -0,0 +1,97 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_SHARED_UTILS_H_ +#define DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_SHARED_UTILS_H_ + +#include "native_interface.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define FMT_ATTR_CONTAINER 99 +#define FMT_APP_RAW_BINARY 98 + +typedef struct request { + // message id + uint32 mid; + + // url of the request + char *url; + + // action of the request, can be PUT/GET/POST/DELETE + int action; + + // payload format, currently only support attr_container_t type + int fmt; + + // payload of the request, currently only support attr_container_t type + void *payload; + + int payload_len; + + unsigned long sender; +} request_t; + +typedef struct response { + // message id + uint32 mid; + + // status of the response + int status; + + // payload format + int fmt; + + // payload of the response, + void *payload; + + int payload_len; + + unsigned long reciever; +} response_t; + +int check_url_start(const char* url, int url_len, const char * leading_str); +bool match_url(char * pattern, char * matched); +char * find_key_value(char * buffer, int buffer_len, char * key, char * value, + int value_len, char delimiter); + +request_t *clone_request(request_t *request); +void request_cleaner(request_t *request); + +response_t * clone_response(response_t * response); +void response_cleaner(response_t * response); + +response_t * set_response(response_t * response, int status, int fmt, + const char *payload, int payload_len); +response_t * make_response_for_request(request_t * request, + response_t * response); + +request_t * init_request(request_t * request, char *url, int action, int fmt, + void *payload, int payload_len); + +char * pack_request(request_t *request, int * size); +request_t * unpack_request(char * packet, int size, request_t * request); +char * pack_response(response_t *response, int * size); +response_t * unpack_response(char * packet, int size, response_t * response); +void free_req_resp_packet(char * packet); + +#ifdef __cplusplus +} +#endif + +#endif /* DEPS_SSG_MICRO_RUNTIME_WASM_POC_APP_LIBS_NATIVE_INTERFACE_SHARED_UTILS_H_ */ diff --git a/core/iwasm/lib/native/base/base-lib-export.c b/core/iwasm/lib/native/base/base-lib-export.c new file mode 100644 index 000000000..b91782f49 --- /dev/null +++ b/core/iwasm/lib/native/base/base-lib-export.c @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include "lib-export.h" + +#ifdef WASM_ENABLE_BASE_LIB +#include "base-lib-export.h" +#endif + +static NativeSymbol extended_native_symbol_defs[] = { +/* TODO: use macro EXPORT_WASM_API() or EXPORT_WASM_API2() to + add functions to register. */ + +#ifdef WASM_ENABLE_BASE_LIB + EXPORT_WASM_API(wasm_register_resource), + EXPORT_WASM_API(wasm_response_send), + EXPORT_WASM_API(wasm_post_request), + EXPORT_WASM_API(wasm_sub_event), + EXPORT_WASM_API(wasm_create_timer), + EXPORT_WASM_API(wasm_timer_destory), + EXPORT_WASM_API(wasm_timer_cancel), + EXPORT_WASM_API(wasm_timer_restart), + EXPORT_WASM_API(wasm_get_sys_tick_ms), +#endif + }; + +int get_base_lib_export_apis(NativeSymbol **p_base_lib_apis) +{ + *p_base_lib_apis = extended_native_symbol_defs; + return sizeof(extended_native_symbol_defs) / sizeof(NativeSymbol); +} + diff --git a/core/iwasm/lib/native/base/base-lib-export.h b/core/iwasm/lib/native/base/base-lib-export.h new file mode 100644 index 000000000..a77168bb0 --- /dev/null +++ b/core/iwasm/lib/native/base/base-lib-export.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BASE_LIB_EXPORT_H_ +#define _BASE_LIB_EXPORT_H_ + +#include "attr-container.h" +#include "native_interface.h" + +#endif /* end of _BASE_LIB_EXPORT_H_ */ + diff --git a/core/iwasm/lib/native/base/request_response.c b/core/iwasm/lib/native/base/request_response.c new file mode 100644 index 000000000..573dd48f5 --- /dev/null +++ b/core/iwasm/lib/native/base/request_response.c @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "native_interface.h" +#include "app-manager-export.h" +#include "coap_ext.h" +#include "wasm-export.h" + +extern void module_request_handler(request_t *request, uint32 register_id); + +bool wasm_response_send(int32 buffer_offset, int size) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *buffer = NULL; + + if (!validate_app_addr(buffer_offset, size)) + return false; + + buffer = addr_app_to_native(buffer_offset); + + if (buffer != NULL) { + response_t response[1]; + + if (NULL == unpack_response(buffer, size, response)) + return false; + + am_send_response(response); + + return true; + } + + return false; +} + +void wasm_register_resource(int32 url_offset) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *url = NULL; + + if (!validate_app_addr(url_offset, 1)) + return; + + url = addr_app_to_native(url_offset); + + if (url != NULL) { + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + am_register_resource(url, module_request_handler, mod_id); + } +} + +void wasm_post_request(int32 buffer_offset, int size) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *buffer = NULL; + + if (!validate_app_addr(buffer_offset, size)) + return; + + buffer = addr_app_to_native(buffer_offset); + + if (buffer != NULL) { + request_t req[1]; + + if (!unpack_request(buffer, size, req)) + return; + + // TODO: add permission check, ensure app can't do harm + + // set sender to help dispatch the response to the sender ap + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + req->sender = mod_id; + + if (req->action == COAP_EVENT) { + am_publish_event(req); + return; + } + + am_dispatch_request(req); + } +} + +void wasm_sub_event(int32 url_offset) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *url = NULL; + + if (!validate_app_addr(url_offset, 1)) + return; + + url = addr_app_to_native(url_offset); + + if (url != NULL) { + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + + am_register_event(url, mod_id); + } +} + diff --git a/core/iwasm/lib/native/base/runtime_lib.h b/core/iwasm/lib/native/base/runtime_lib.h new file mode 100644 index 000000000..bf4dccfe3 --- /dev/null +++ b/core/iwasm/lib/native/base/runtime_lib.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIB_BASE_RUNTIME_LIB_H_ +#define LIB_BASE_RUNTIME_LIB_H_ + +#include "native_interface.h" + +#include "runtime_timer.h" + +void init_wasm_timer(); +timer_ctx_t get_wasm_timer_ctx(); +timer_ctx_t create_wasm_timer_ctx(unsigned int module_id, int prealloc_num); +void destory_module_timer_ctx(unsigned int module_id); + +#endif /* LIB_BASE_RUNTIME_LIB_H_ */ diff --git a/core/iwasm/lib/native/base/timer_wrapper.c b/core/iwasm/lib/native/base/timer_wrapper.c new file mode 100644 index 000000000..12d8f58ff --- /dev/null +++ b/core/iwasm/lib/native/base/timer_wrapper.c @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "runtime_timer.h" +#include "app-manager-export.h" +#include "module_wasm_app.h" +#include "bh_list.h" +#include "bh_thread.h" +#include "bh_time.h" + +bh_list g_timer_ctx_list; +korp_cond g_timer_ctx_list_cond; +korp_mutex g_timer_ctx_list_mutex; +typedef struct { + bh_list_link l; + timer_ctx_t timer_ctx; +} timer_ctx_node_t; + +void wasm_timer_callback(timer_id_t id, unsigned int mod_id) +{ + module_data* module = module_data_list_lookup_id(mod_id); + if (module == NULL) + return; + + // !!! the length parameter must be 0, so the receiver will + // not free the payload pointer. + bh_post_msg(module->queue, TIMER_EVENT_WASM, (char *) id, 0); +} + +/// +/// why we create a separate link for module timer contexts +/// rather than traverse the module list? +/// It helps to reduce the lock frequency for the module list. +/// Also when we lock the module list and then call the callback for +/// timer expire, the callback is request the list lock again for lookup +/// the module from module id. It is for avoiding that situation. + +void * thread_modulers_timer_check(void * arg) +{ + + int ms_to_expiry; + while (1) { + ms_to_expiry = -1; + vm_mutex_lock(&g_timer_ctx_list_mutex); + timer_ctx_node_t* elem = (timer_ctx_node_t*) bh_list_first_elem( + &g_timer_ctx_list); + while (elem) { + int next = check_app_timers(elem->timer_ctx); + if (next != -1) { + if (ms_to_expiry == -1 || ms_to_expiry > next) + ms_to_expiry = next; + } + + elem = (timer_ctx_node_t*) bh_list_elem_next(elem); + } + vm_mutex_unlock(&g_timer_ctx_list_mutex); + + if (ms_to_expiry == -1) + ms_to_expiry = 60 * 1000; + vm_mutex_lock(&g_timer_ctx_list_mutex); + vm_cond_reltimedwait(&g_timer_ctx_list_cond, &g_timer_ctx_list_mutex, + ms_to_expiry); + vm_mutex_unlock(&g_timer_ctx_list_mutex); + } +} + +void wakeup_modules_timer_thread(timer_ctx_t ctx) +{ + vm_mutex_lock(&g_timer_ctx_list_mutex); + vm_cond_signal(&g_timer_ctx_list_cond); + vm_mutex_unlock(&g_timer_ctx_list_mutex); +} + +void init_wasm_timer() +{ + korp_tid tm_tid; + bh_list_init(&g_timer_ctx_list); + + vm_cond_init(&g_timer_ctx_list_cond); + /* temp solution for: thread_modulers_timer_check thread would recursive lock the mutex */ + vm_recursive_mutex_init(&g_timer_ctx_list_mutex); + + vm_thread_create(&tm_tid, thread_modulers_timer_check, + NULL, + BH_APPLET_PRESERVED_STACK_SIZE); +} + +timer_ctx_t create_wasm_timer_ctx(unsigned int module_id, int prealloc_num) +{ + timer_ctx_t ctx = create_timer_ctx(wasm_timer_callback, + wakeup_modules_timer_thread, prealloc_num, module_id); + + if (ctx == NULL) + return NULL; + + timer_ctx_node_t * node = (timer_ctx_node_t*) bh_malloc( + sizeof(timer_ctx_node_t)); + if (node == NULL) { + destroy_timer_ctx(ctx); + return NULL; + } + memset(node, 0, sizeof(*node)); + node->timer_ctx = ctx; + + vm_mutex_lock(&g_timer_ctx_list_mutex); + bh_list_insert(&g_timer_ctx_list, node); + vm_mutex_unlock(&g_timer_ctx_list_mutex); + + return ctx; +} + +void destory_module_timer_ctx(unsigned int module_id) +{ + vm_mutex_lock(&g_timer_ctx_list_mutex); + timer_ctx_node_t* elem = (timer_ctx_node_t*) bh_list_first_elem( + &g_timer_ctx_list); + while (elem) { + if (timer_ctx_get_owner(elem->timer_ctx) == module_id) { + bh_list_remove(&g_timer_ctx_list, elem); + destroy_timer_ctx(elem->timer_ctx); + bh_free(elem); + break; + } + + elem = (timer_ctx_node_t*) bh_list_elem_next(elem); + } + vm_mutex_unlock(&g_timer_ctx_list_mutex); +} + +timer_ctx_t get_wasm_timer_ctx() +{ + module_data * m = app_manager_get_module_data(Module_WASM_App); + if (m == NULL) + return NULL; + return m->timer_ctx; +} + +timer_id_t wasm_create_timer(int interval, bool is_period, bool auto_start) +{ + return sys_create_timer(get_wasm_timer_ctx(), interval, is_period, + auto_start); +} + +void wasm_timer_destory(timer_id_t timer_id) +{ + sys_timer_destory(get_wasm_timer_ctx(), timer_id); +} + +void wasm_timer_cancel(timer_id_t timer_id) +{ + sys_timer_cancel(get_wasm_timer_ctx(), timer_id); +} + +void wasm_timer_restart(timer_id_t timer_id, int interval) +{ + sys_timer_restart(get_wasm_timer_ctx(), timer_id, interval); +} + +extern uint32 get_sys_tick_ms(); + +uint32 wasm_get_sys_tick_ms(void) +{ + return (uint32) bh_get_tick_ms(); +} + diff --git a/core/iwasm/lib/native/base/wasm_lib_base.cmake b/core/iwasm/lib/native/base/wasm_lib_base.cmake new file mode 100644 index 000000000..de80a5784 --- /dev/null +++ b/core/iwasm/lib/native/base/wasm_lib_base.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (WASM_LIB_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${WASM_LIB_BASE_DIR}) + + +file (GLOB_RECURSE source_all ${WASM_LIB_BASE_DIR}/*.c) + +set (WASM_LIB_BASE_SOURCE ${source_all}) + diff --git a/core/iwasm/lib/native/extension/sensor/runtime_sensor.c b/core/iwasm/lib/native/extension/sensor/runtime_sensor.c new file mode 100644 index 000000000..4ae6f2743 --- /dev/null +++ b/core/iwasm/lib/native/extension/sensor/runtime_sensor.c @@ -0,0 +1,425 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "runtime_sensor.h" +#include "app-manager-export.h" +#include "module_wasm_app.h" +#include "bh_thread.h" +#include "bh_time.h" + +static sys_sensor_t * g_sys_sensors = NULL; +static int g_sensor_id_max = 0; +static sensor_client_t *find_sensor_client(sys_sensor_t * sensor, + unsigned int client_id, bool remove_if_found); + +void (*rechedule_sensor_callback)() = NULL; + +/* + * API for the applications to call - don't call it from the runtime + * + */ + +static void sensor_event_cleaner(sensor_event_data_t *sensor_event) +{ + if (sensor_event->data != NULL) { + if (sensor_event->data_fmt == FMT_ATTR_CONTAINER) + attr_container_destroy(sensor_event->data); + else + bh_free(sensor_event->data); + } + + bh_free(sensor_event); +} + +static void wasm_sensor_callback(void *client, uint32 sensor_id, + void *user_data) +{ + attr_container_t *sensor_data = (attr_container_t *) user_data; + attr_container_t *sensor_data_clone; + int sensor_data_len; + sensor_event_data_t *sensor_event; + bh_message_t msg; + sensor_client_t *c = (sensor_client_t *) client; + + module_data *module = module_data_list_lookup_id(c->client_id); + if (module == NULL) + return; + + if (sensor_data == NULL) + return; + + sensor_data_len = attr_container_get_serialize_length(sensor_data); + sensor_data_clone = (attr_container_t *)bh_malloc(sensor_data_len); + if (sensor_data_clone == NULL) + return; + + /* multiple sensor clients may use/free the sensor data, so make a copy */ + memcpy(sensor_data_clone, sensor_data, sensor_data_len); + + sensor_event = (sensor_event_data_t *)bh_malloc(sizeof(*sensor_event)); + if (sensor_event == NULL) { + bh_free(sensor_data_clone); + return; + } + + memset(sensor_event, 0, sizeof(*sensor_event)); + sensor_event->sensor_id = sensor_id; + sensor_event->data = sensor_data_clone; + sensor_event->data_fmt = FMT_ATTR_CONTAINER; + + msg = bh_new_msg(SENSOR_EVENT_WASM, + sensor_event, + sizeof(*sensor_event), + sensor_event_cleaner); + if (!msg) { + sensor_event_cleaner(sensor_event); + return; + } + + bh_post_msg2(module->queue, msg); +} + +bool wasm_sensor_config(uint32 sensor, int interval, int bit_cfg, int delay) +{ + attr_container_t * attr_cont; + sensor_client_t * c; + sensor_obj_t s = find_sys_sensor_id(sensor); + if (s == NULL) + return false; + + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + + vm_mutex_lock(&s->lock); + + c = find_sensor_client(s, mod_id, false); + if (c == NULL) { + vm_mutex_unlock(&s->lock); + return false; + } + + c->interval = interval; + c->bit_cfg = bit_cfg; + c->delay = delay; + + vm_mutex_unlock(&s->lock); + + if (s->config != NULL) { + attr_cont = attr_container_create("config sensor"); + attr_container_set_int(&attr_cont, "interval", interval); + attr_container_set_int(&attr_cont, "bit_cfg", bit_cfg); + attr_container_set_int(&attr_cont, "delay", delay); + s->config(s, attr_cont); + attr_container_destroy(attr_cont); + } + + refresh_read_interval(s); + + reschedule_sensor_read(); + + return true; +} + +uint32 wasm_sensor_open(int32 name_offset, int instance) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *name = NULL; + + if (!validate_app_addr(name_offset, 1)) + return -1; + + name = addr_app_to_native(name_offset); + + if (name != NULL) { + sensor_client_t *c; + sys_sensor_t *s = find_sys_sensor(name, instance); + if (s == NULL) + return -1; + + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + + vm_mutex_lock(&s->lock); + + c = find_sensor_client(s, mod_id, false); + if (c) { + // the app already opened this sensor + vm_mutex_unlock(&s->lock); + return -1; + } + + sensor_client_t * client = (sensor_client_t*) bh_malloc( + sizeof(sensor_client_t)); + if (client == NULL) { + vm_mutex_unlock(&s->lock); + return -1; + } + + memset(client, 0, sizeof(sensor_client_t)); + client->client_id = mod_id; + client->client_callback = wasm_sensor_callback; + client->interval = s->default_interval; + client->next = s->clients; + s->clients = client; + + vm_mutex_unlock(&s->lock); + + refresh_read_interval(s); + + reschedule_sensor_read(); + + return s->sensor_id; + } + + return -1; +} + +bool wasm_sensor_config_with_attr_container(uint32 sensor, int32 buffer_offset, + int len) +{ + wasm_module_inst_t module_inst = get_module_inst(); + char *buffer = NULL; + + if (!validate_app_addr(buffer_offset, len)) + return false; + + buffer = addr_app_to_native(buffer_offset); + + if (buffer != NULL) { + attr_container_t * cfg; + + sensor_obj_t s = find_sys_sensor_id(sensor); + if (s == NULL) + return false; + + if (s->config == NULL) + return false; + + return s->config(s, cfg); + } + + return false; +} + +bool wasm_sensor_close(uint32 sensor) +{ + unsigned int mod_id = app_manager_get_module_id(Module_WASM_App); + unsigned int client_id = mod_id; + sensor_obj_t s = find_sys_sensor_id(sensor); + sensor_client_t *c; + + if (s == NULL) + return false; + + vm_mutex_lock(&s->lock); + if ((c = find_sensor_client(s, client_id, true)) != NULL) + bh_free(c); + vm_mutex_unlock(&s->lock); + + refresh_read_interval(s); + + reschedule_sensor_read(); + + return true; +} + +/* + * + * sensor framework API - don't expose to the applications + * + */ +void set_sensor_reshceduler(void (*callback)()) +{ + rechedule_sensor_callback = callback; +} + +// used for other threads to wakeup the sensor read thread +void reschedule_sensor_read() +{ + if (rechedule_sensor_callback) + rechedule_sensor_callback(); +} + +void refresh_read_interval(sensor_obj_t sensor) +{ + sensor_client_t *c; + uint32 interval = sensor->default_interval; + vm_mutex_lock(&sensor->lock); + + c = sensor->clients; + if (c) + interval = c->interval; + + while (c) { + if (c->interval < interval) + interval = c->interval; + c = c->next; + } + + vm_mutex_unlock(&sensor->lock); + + sensor->read_interval = interval; +} + +sensor_obj_t add_sys_sensor(char * name, char * description, int instance, + uint32 default_interval, void * read_func, void * config_func) +{ + sys_sensor_t * s = (sys_sensor_t *) bh_malloc(sizeof(sys_sensor_t)); + if (s == NULL) + return NULL; + + memset(s, 0, sizeof(*s)); + s->name = bh_strdup(name); + s->sensor_instance = instance; + s->default_interval = default_interval; + + if (!s->name) { + bh_free(s); + return NULL; + } + + if (description) { + s->description = bh_strdup(description); + if (!s->description) { + bh_free(s->name); + bh_free(s); + return NULL; + } + } + + g_sensor_id_max++; + if (g_sensor_id_max == -1) + g_sensor_id_max++; + s->sensor_id = g_sensor_id_max; + + s->read = read_func; + s->config = config_func; + + if (g_sys_sensors == NULL) { + g_sys_sensors = s; + } else { + s->next = g_sys_sensors; + g_sys_sensors = s; + } + + vm_mutex_init(&s->lock); + + return s; +} + +sensor_obj_t find_sys_sensor(const char* name, int instance) +{ + sys_sensor_t * s = g_sys_sensors; + while (s) { + if (strcmp(s->name, name) == 0 && s->sensor_instance == instance) + return s; + + s = s->next; + } + return NULL; +} + +sensor_obj_t find_sys_sensor_id(uint32 sensor_id) +{ + sys_sensor_t * s = g_sys_sensors; + while (s) { + if (s->sensor_id == sensor_id) + return s; + + s = s->next; + } + return NULL; +} + +sensor_client_t *find_sensor_client(sys_sensor_t * sensor, + unsigned int client_id, bool remove_if_found) +{ + sensor_client_t *prev = NULL, *c = sensor->clients; + + while (c) { + sensor_client_t *next = c->next; + if (c->client_id == client_id) { + if (remove_if_found) { + if (prev) + prev->next = next; + else + sensor->clients = next; + } + return c; + } else { + c = c->next; + } + } + + return NULL; +} + +// return the milliseconds to next check +int check_sensor_timers() +{ + int ms_to_next_check = -1; + uint32 now = (uint32) bh_get_tick_ms(); + + sys_sensor_t * s = g_sys_sensors; + while (s) { + uint32 last_read = s->last_read; + uint32 elpased_ms = bh_get_elpased_ms(&last_read); + + if (s->read_interval <= 0 || s->clients == NULL) { + s = s->next; + continue; + } + + if (elpased_ms >= s->read_interval) { + attr_container_t * data = s->read(s); + if (data) { + sensor_client_t * client = s->clients; + while (client) { + client->client_callback(client, s->sensor_id, data); + client = client->next; + } + attr_container_destroy(data); + } + + s->last_read = now; + + if (ms_to_next_check == -1 || (ms_to_next_check < s->read_interval)) + ms_to_next_check = s->read_interval; + } else { + int remaining = s->read_interval - elpased_ms; + if (ms_to_next_check == -1 || (ms_to_next_check < remaining)) + ms_to_next_check = remaining; + + } + + s = s->next; + } + + return ms_to_next_check; +} + +void sensor_cleanup_callback(uint32 module_id) +{ + sys_sensor_t * s = g_sys_sensors; + + while (s) { + sensor_client_t *c; + vm_mutex_lock(&s->lock); + if ((c = find_sensor_client(s, module_id, true)) != NULL) { + bh_free(c); + } + vm_mutex_unlock(&s->lock); + s = s->next; + } +} diff --git a/core/iwasm/lib/native/extension/sensor/runtime_sensor.h b/core/iwasm/lib/native/extension/sensor/runtime_sensor.h new file mode 100644 index 000000000..a9e803d95 --- /dev/null +++ b/core/iwasm/lib/native/extension/sensor/runtime_sensor.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIB_EXTENSION_RUNTIME_SENSOR_H_ +#define LIB_EXTENSION_RUNTIME_SENSOR_H_ + +#include "bh_platform.h" +#include "attr-container.h" +struct _sys_sensor; +typedef struct _sys_sensor* sensor_obj_t; + +typedef struct _sensor_client { + struct _sensor_client * next; + unsigned int client_id; // the app id + int interval; + int bit_cfg; + int delay; + void (*client_callback)(void * client, uint32, attr_container_t *); +} sensor_client_t; + +typedef struct _sys_sensor { + struct _sys_sensor * next; + char * name; + int sensor_instance; + char * description; + uint32 sensor_id; + sensor_client_t * clients; + /* app, sensor mgr and app mgr may access the clients at the same time, + * so need a lock to protect the clients */ + korp_mutex lock; + uint32 last_read; + uint32 read_interval; + uint32 default_interval; + + attr_container_t * (*read)(void *); /* TODO: may support other type return value, such as 'cbor' */ + bool (*config)(void *, void *); + +} sys_sensor_t; + +sensor_obj_t add_sys_sensor(char * name, char * description, int instance, + uint32 default_interval, void * read_func, void * config_func); +sensor_obj_t find_sys_sensor(const char* name, int instance); +sensor_obj_t find_sys_sensor_id(uint32 sensor_id); +void refresh_read_interval(sensor_obj_t sensor); +void sensor_cleanup_callback(uint32 module_id); +int check_sensor_timers(); +void reschedule_sensor_read(); + +uint32 +wasm_sensor_open(int32 name_offset, int instance); + +bool +wasm_sensor_config(uint32 sensor, int interval, int bit_cfg, int delay); + +bool +wasm_sensor_config_with_attr_container(uint32 sensor, int32 buffer_offset, + int len); + +bool +wasm_sensor_close(uint32 sensor); + +#endif /* LIB_EXTENSION_RUNTIME_SENSOR_H_ */ diff --git a/core/iwasm/lib/native/extension/sensor/runtime_sensor.inl b/core/iwasm/lib/native/extension/sensor/runtime_sensor.inl new file mode 100644 index 000000000..ea8a6d3a8 --- /dev/null +++ b/core/iwasm/lib/native/extension/sensor/runtime_sensor.inl @@ -0,0 +1,20 @@ +/* +* Copyright (C) 2019 Intel Corporation. All rights reserved. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +EXPORT_WASM_API(wasm_sensor_open), +EXPORT_WASM_API(wasm_sensor_config), +EXPORT_WASM_API(wasm_sensor_config_with_attr_container), +EXPORT_WASM_API(wasm_sensor_close), diff --git a/core/iwasm/lib/native/extension/sensor/sensor_mgr_ref.c b/core/iwasm/lib/native/extension/sensor/sensor_mgr_ref.c new file mode 100644 index 000000000..4b6492cfc --- /dev/null +++ b/core/iwasm/lib/native/extension/sensor/sensor_mgr_ref.c @@ -0,0 +1,145 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_common.h" +#include "bh_queue.h" +#include "bh_thread.h" +#include "runtime_sensor.h" +#include "attr-container.h" +#include "module_wasm_app.h" +#include "wasm-export.h" + +/* + * + * One reference implementation for sensor manager + * + * + */ +static korp_cond cond; +static korp_mutex mutex; + +void app_mgr_sensor_event_callback(module_data *m_data, bh_message_t msg) +{ + uint32 argv[3]; + wasm_function_inst_t func_onSensorEvent; + + bh_assert(SENSOR_EVENT_WASM == bh_message_type(msg)); + wasm_data *wasm_app_data = (wasm_data*) m_data->internal_data; + wasm_module_inst_t inst = wasm_app_data->wasm_module_inst; + + sensor_event_data_t *payload = (sensor_event_data_t*) bh_message_payload( + msg); + if (payload == NULL) + return; + + func_onSensorEvent = wasm_runtime_lookup_function(inst, "_on_sensor_event", + "(i32i32i32)"); + if (!func_onSensorEvent) { + printf("Cannot find function onRequest\n"); + } else { + int32 sensor_data_offset; + uint32 sensor_data_len; + + if (payload->data_fmt == FMT_ATTR_CONTAINER) { + sensor_data_len = attr_container_get_serialize_length( + payload->data); + } else { + printf("Unsupported sensor data format: %d\n", payload->data_fmt); + return; + } + + sensor_data_offset = wasm_runtime_module_dup_data(inst, payload->data, + sensor_data_len); + if (sensor_data_offset == 0) { + printf("Got exception running wasm code: %s\n", + wasm_runtime_get_exception(inst)); + wasm_runtime_clear_exception(inst); + return; + } + + argv[0] = payload->sensor_id; + argv[1] = (uint32) sensor_data_offset; + argv[2] = sensor_data_len; + + if (!wasm_runtime_call_wasm(inst, NULL, func_onSensorEvent, 3, argv)) { + printf(":Got exception running wasm code: %s\n", + wasm_runtime_get_exception(inst)); + wasm_runtime_clear_exception(inst); + wasm_runtime_module_free(inst, sensor_data_offset); + return; + } + + wasm_runtime_module_free(inst, sensor_data_offset); + } +} + +static attr_container_t * read_test_sensor(void * sensor) +{ + //luc: for test + attr_container_t *attr_obj = attr_container_create("read test sensor data"); + if (attr_obj) { + attr_container_set_string(&attr_obj, "name", "read test sensor"); + return attr_obj; + } + return NULL; +} + +static bool config_test_sensor(void * s, void * config) +{ + + return false; +} + +static void * thread_sensor_check(void * arg) +{ + while (1) { + int ms_to_expiry = check_sensor_timers(); + if (ms_to_expiry == -1) + ms_to_expiry = 5000; + vm_mutex_lock(&mutex); + vm_cond_reltimedwait(&cond, &mutex, ms_to_expiry); + vm_mutex_unlock(&mutex); + } +} + +static void cb_wakeup_thread() +{ + vm_cond_signal(&cond); +} + +void init_sensor_framework() +{ + // init the mutext and conditions + korp_thread tid; + vm_cond_init(&cond); + vm_mutex_init(&mutex); + + // add the sys sensor objects + add_sys_sensor("sensor_test", "This is a sensor for test", 0, 1000, + read_test_sensor, config_test_sensor); + + set_sensor_reshceduler(cb_wakeup_thread); + + wasm_register_msg_callback(SENSOR_EVENT_WASM, + app_mgr_sensor_event_callback); + + wasm_register_cleanup_callback(sensor_cleanup_callback); + + vm_thread_create(&tid, thread_sensor_check, NULL, + BH_APPLET_PRESERVED_STACK_SIZE); + +} + diff --git a/core/iwasm/lib/native/extension/sensor/wasm_lib_sensor.cmake b/core/iwasm/lib/native/extension/sensor/wasm_lib_sensor.cmake new file mode 100644 index 000000000..9461f841b --- /dev/null +++ b/core/iwasm/lib/native/extension/sensor/wasm_lib_sensor.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (WASM_LIB_SENSOR_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${WASM_LIB_SENSOR_DIR}) + + +file (GLOB_RECURSE source_all ${WASM_LIB_SENSOR_DIR}/*.c) + +set (WASM_LIB_SENSOR_SOURCE ${source_all}) + diff --git a/core/iwasm/lib/native/extension/template/lib-export-template.c b/core/iwasm/lib/native/extension/template/lib-export-template.c new file mode 100644 index 000000000..6becf41c5 --- /dev/null +++ b/core/iwasm/lib/native/extension/template/lib-export-template.c @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include "lib-export.h" + +/* TODO: use macro EXPORT_WASM_API() or EXPORT_WASM_API2() to add functions to register. */ + +NativeSymbol extended_native_symbol_defs[] = { + +/*EXPORT_WASM_API(publish_event)*/ + +}; diff --git a/core/iwasm/lib/native/libc/libc_wrapper.c b/core/iwasm/lib/native/libc/libc_wrapper.c new file mode 100644 index 000000000..a0994a9c2 --- /dev/null +++ b/core/iwasm/lib/native/libc/libc_wrapper.c @@ -0,0 +1,893 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-native.h" +#include "wasm-export.h" +#include "wasm_log.h" +#include "wasm_platform_log.h" + +void +wasm_runtime_set_exception(wasm_module_inst_t module, const char *exception); +uint32 +wasm_runtime_get_temp_ret(wasm_module_inst_t module); +void +wasm_runtime_set_temp_ret(wasm_module_inst_t module, uint32 temp_ret); +uint32 +wasm_runtime_get_llvm_stack(wasm_module_inst_t module); +void +wasm_runtime_set_llvm_stack(wasm_module_inst_t module, uint32 llvm_stack); + +#define get_module_inst() \ + wasm_runtime_get_current_module_inst() + +#define validate_app_addr(offset, size) \ + wasm_runtime_validate_app_addr(module_inst, offset, size) + +#define addr_app_to_native(offset) \ + wasm_runtime_addr_app_to_native(module_inst, offset) + +#define addr_native_to_app(ptr) \ + wasm_runtime_addr_native_to_app(module_inst, ptr) + +#define module_malloc(size) \ + wasm_runtime_module_malloc(module_inst, size) + +#define module_free(offset) \ + wasm_runtime_module_free(module_inst, offset) + +typedef int (*out_func_t)(int c, void *ctx); + +enum pad_type { + PAD_NONE, PAD_ZERO_BEFORE, PAD_SPACE_BEFORE, PAD_SPACE_AFTER, +}; + +/** + * @brief Output an unsigned long in hex format + * + * Output an unsigned long on output installed by platform at init time. Should + * be able to handle an unsigned long of any size, 32 or 64 bit. + * @param num Number to output + * + * @return N/A + */ +static void _printf_hex_ulong(out_func_t out, void *ctx, + const unsigned long num, enum pad_type padding, int min_width) +{ + int size = sizeof(num) * 2; + int found_largest_digit = 0; + int remaining = 8; /* 8 digits max */ + int digits = 0; + + for (; size; size--) { + char nibble = (num >> ((size - 1) << 2) & 0xf); + + if (nibble || found_largest_digit || size == 1) { + found_largest_digit = 1; + nibble += nibble > 9 ? 87 : 48; + out((int) nibble, ctx); + digits++; + continue; + } + + if (remaining-- <= min_width) { + if (padding == PAD_ZERO_BEFORE) { + out('0', ctx); + } else if (padding == PAD_SPACE_BEFORE) { + out(' ', ctx); + } + } + } + + if (padding == PAD_SPACE_AFTER) { + remaining = min_width * 2 - digits; + while (remaining-- > 0) { + out(' ', ctx); + } + } +} + +/** + * @brief Output an unsigned long (32-bit) in decimal format + * + * Output an unsigned long on output installed by platform at init time. Only + * works with 32-bit values. + * @param num Number to output + * + * @return N/A + */ +static void _printf_dec_ulong(out_func_t out, void *ctx, + const unsigned long num, enum pad_type padding, int min_width) +{ + unsigned long pos = 999999999; + unsigned long remainder = num; + int found_largest_digit = 0; + int remaining = 10; /* 10 digits max */ + int digits = 1; + + /* make sure we don't skip if value is zero */ + if (min_width <= 0) { + min_width = 1; + } + + while (pos >= 9) { + if (found_largest_digit || remainder > pos) { + found_largest_digit = 1; + out((int) ((remainder / (pos + 1)) + 48), ctx); + digits++; + } else if (remaining <= min_width && padding < PAD_SPACE_AFTER) { + out((int) (padding == PAD_ZERO_BEFORE ? '0' : ' '), ctx); + digits++; + } + remaining--; + remainder %= (pos + 1); + pos /= 10; + } + out((int) (remainder + 48), ctx); + + if (padding == PAD_SPACE_AFTER) { + remaining = min_width - digits; + while (remaining-- > 0) { + out(' ', ctx); + } + } +} + +static void _vprintf(out_func_t out, void *ctx, const char *fmt, va_list ap, + wasm_module_inst_t module_inst) +{ + int might_format = 0; /* 1 if encountered a '%' */ + enum pad_type padding = PAD_NONE; + int min_width = -1; + int long_ctr = 0; + + /* fmt has already been adjusted if needed */ + + while (*fmt) { + if (!might_format) { + if (*fmt != '%') { + out((int) *fmt, ctx); + } else { + might_format = 1; + min_width = -1; + padding = PAD_NONE; + long_ctr = 0; + } + } else { + switch (*fmt) { + case '-': + padding = PAD_SPACE_AFTER; + goto still_might_format; + + case '0': + if (min_width < 0 && padding == PAD_NONE) { + padding = PAD_ZERO_BEFORE; + goto still_might_format; + } + /* Fall through */ + case '1' ... '9': + if (min_width < 0) { + min_width = *fmt - '0'; + } else { + min_width = 10 * min_width + *fmt - '0'; + } + + if (padding == PAD_NONE) { + padding = PAD_SPACE_BEFORE; + } + goto still_might_format; + + case 'l': + long_ctr++; + /* Fall through */ + case 'z': + case 'h': + /* FIXME: do nothing for these modifiers */ + goto still_might_format; + + case 'd': + case 'i': { + long d; + if (long_ctr < 2) { + d = va_arg(ap, long); + } else { + d = (long)va_arg(ap, long long); + } + + if (d < 0) { + out((int) '-', ctx); + d = -d; + min_width--; + } + _printf_dec_ulong(out, ctx, d, padding, min_width); + break; + } + + case 'u': { + unsigned long u; + + if (long_ctr < 2) { + u = va_arg(ap, unsigned long); + } else { + u = (unsigned long)va_arg(ap, + unsigned long long); +} +_printf_dec_ulong(out, ctx, u, padding, min_width); +break; +} + +case 'p': +out('0', ctx); +out('x', ctx); +/* left-pad pointers with zeros */ +padding = PAD_ZERO_BEFORE; +min_width = 8; +/* Fall through */ +case 'x': +case 'X': { +unsigned long x; + +if (long_ctr < 2) { +x = va_arg(ap, unsigned long); +} else { +x = (unsigned long)va_arg(ap, unsigned long long); +} + +_printf_hex_ulong(out, ctx, x, padding, min_width); +break; +} + +case 's': { +char *s; +char *start; +int32 s_offset = va_arg(ap, uint32); + +if (!validate_app_addr(s_offset, 1)) { +wasm_runtime_set_exception(module_inst, "out of bounds memory access"); +return; +} + +s = start = addr_app_to_native(s_offset); + +while (*s) +out((int) (*s++), ctx); + +if (padding == PAD_SPACE_AFTER) { +int remaining = min_width - (s - start); +while (remaining-- > 0) { +out(' ', ctx); +} +} +break; +} + +case 'c': { +int c = va_arg(ap, int); +out(c, ctx); +break; +} + +case '%': { +out((int) '%', ctx); +break; +} + +default: +out((int) '%', ctx); +out((int) *fmt, ctx); +break; +} + +might_format = 0; +} + +still_might_format: ++fmt; +} +} + +struct str_context { +char *str; +int max; +int count; +}; + +static int sprintf_out(int c, struct str_context *ctx) +{ +if (!ctx->str || ctx->count >= ctx->max) { +ctx->count++; +return c; +} + +if (ctx->count == ctx->max - 1) { +ctx->str[ctx->count++] = '\0'; +} else { +ctx->str[ctx->count++] = c; +} + +return c; +} + +static int printf_out(int c, struct str_context *ctx) +{ +printf("%c", c); +ctx->count++; +return c; +} + +static inline va_list get_va_list(uint32 *args) +{ +union { +uint32 u; +va_list v; +} u; +u.u = args[0]; +return u.v; +} + +static bool parse_printf_args(wasm_module_inst_t module_inst, int32 fmt_offset, +int32 va_list_offset, const char **p_fmt, va_list *p_va_args) +{ +const char *fmt; +union { +uintptr_t u; +va_list v; +} u; + +if (!validate_app_addr(fmt_offset, +1) || !validate_app_addr(va_list_offset, sizeof(int32))) +return false; + +fmt = (const char*) addr_app_to_native(fmt_offset); +u.u = (uintptr_t) addr_app_to_native(va_list_offset); + +*p_fmt = fmt; +*p_va_args = u.v; +return true; +} + +static int _printf_wrapper(int32 fmt_offset, int32 va_list_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +struct str_context ctx = { NULL, 0, 0 }; +const char *fmt; +va_list va_args; + +if (!parse_printf_args(module_inst, fmt_offset, va_list_offset, &fmt, &va_args)) +return 0; + +_vprintf((out_func_t) printf_out, &ctx, fmt, va_args, module_inst); +return ctx.count; +} + +static int _sprintf_wrapper(int32 str_offset, int32 fmt_offset, +int32 va_list_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +struct str_context ctx; +char *str; +const char *fmt; +va_list va_args; + +if (!validate_app_addr(str_offset, 1)) +return 0; + +str = addr_app_to_native(str_offset); + +if (!parse_printf_args(module_inst, fmt_offset, va_list_offset, &fmt, &va_args)) +return 0; + +ctx.str = str; +ctx.max = INT_MAX; +ctx.count = 0; + +_vprintf((out_func_t) sprintf_out, &ctx, fmt, va_args, module_inst); + +if (ctx.count < ctx.max) { +str[ctx.count] = '\0'; +} + +return ctx.count; +} + +static int _snprintf_wrapper(int32 str_offset, int32 size, int32 fmt_offset, +int32 va_list_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +struct str_context ctx; +char *str; +const char *fmt; +va_list va_args; + +if (!validate_app_addr(str_offset, size)) +return 0; + +str = addr_app_to_native(str_offset); + +if (!parse_printf_args(module_inst, fmt_offset, va_list_offset, &fmt, &va_args)) +return 0; + +ctx.str = str; +ctx.max = size; +ctx.count = 0; + +_vprintf((out_func_t) sprintf_out, &ctx, fmt, va_args, module_inst); + +if (ctx.count < ctx.max) { +str[ctx.count] = '\0'; +} + +return ctx.count; +} + +static int _puts_wrapper(int32 str_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +const char *str; + +if (!validate_app_addr(str_offset, 1)) +return 0; + +str = addr_app_to_native(str_offset); +return printf("%s\n", str); +} + +static int _putchar_wrapper(int c) +{ +printf("%c", c); +return 1; +} + +static int32 _strdup_wrapper(int32 str_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char *str, *str_ret; +uint32 len; +int32 str_ret_offset = 0; + +if (!validate_app_addr(str_offset, 1)) +return 0; + +str = addr_app_to_native(str_offset); + +if (str) { +len = strlen(str) + 1; + +str_ret_offset = module_malloc(len); +if (str_ret_offset) { +str_ret = addr_app_to_native(str_ret_offset); +memcpy(str_ret, str, len); +} +} + +return str_ret_offset; +} + +static int32 _memcmp_wrapper(int32 s1_offset, int32 s2_offset, int32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *s1, *s2; + +if (!validate_app_addr(s1_offset, size) || !validate_app_addr(s2_offset, size)) +return 0; + +s1 = addr_app_to_native(s1_offset); +s2 = addr_app_to_native(s2_offset); +return memcmp(s1, s2, size); +} + +static int32 _memcpy_wrapper(int32 dst_offset, int32 src_offset, int32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *dst, *src; + +if (size == 0) +return dst_offset; + +if (!validate_app_addr(dst_offset, size) || !validate_app_addr(src_offset, size)) +return dst_offset; + +dst = addr_app_to_native(dst_offset); +src = addr_app_to_native(src_offset); +memcpy(dst, src, size); +return dst_offset; +} + +static int32 _memmove_wrapper(int32 dst_offset, int32 src_offset, int32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *dst, *src; + +if (!validate_app_addr(dst_offset, size) || !validate_app_addr(src_offset, size)) +return dst_offset; + +dst = addr_app_to_native(dst_offset); +src = addr_app_to_native(src_offset); +memmove(dst, src, size); +return dst_offset; +} + +static int32 _memset_wrapper(int32 s_offset, int32 c, int32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *s; + +if (!validate_app_addr(s_offset, size)) +return s_offset; + +s = addr_app_to_native(s_offset); +memset(s, c, size); +return s_offset; +} + +static int32 _strchr_wrapper(int32 s_offset, int32 c) +{ +wasm_module_inst_t module_inst = get_module_inst(); +const char *s; +char *ret; + +if (!validate_app_addr(s_offset, 1)) +return s_offset; + +s = addr_app_to_native(s_offset); +ret = strchr(s, c); +return ret ? addr_native_to_app(ret) : 0; +} + +static int32 _strcmp_wrapper(int32 s1_offset, int32 s2_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *s1, *s2; + +if (!validate_app_addr(s1_offset, 1) || !validate_app_addr(s2_offset, 1)) +return 0; + +s1 = addr_app_to_native(s1_offset); +s2 = addr_app_to_native(s2_offset); +return strcmp(s1, s2); +} + +static int32 _strncmp_wrapper(int32 s1_offset, int32 s2_offset, uint32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *s1, *s2; + +if (!validate_app_addr(s1_offset, size) || !validate_app_addr(s2_offset, size)) +return 0; + +s1 = addr_app_to_native(s1_offset); +s2 = addr_app_to_native(s2_offset); +return strncmp(s1, s2, size); +} + +static int32 _strcpy_wrapper(int32 dst_offset, int32 src_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char *dst, *src; + +if (!validate_app_addr(dst_offset, 1) || !validate_app_addr(src_offset, 1)) +return 0; + +dst = addr_app_to_native(dst_offset); +src = addr_app_to_native(src_offset); +strcpy(dst, src); +return dst_offset; +} + +static int32 _strncpy_wrapper(int32 dst_offset, int32 src_offset, uint32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char *dst, *src; + +if (!validate_app_addr(dst_offset, size) || !validate_app_addr(src_offset, size)) +return 0; + +dst = addr_app_to_native(dst_offset); +src = addr_app_to_native(src_offset); +strncpy(dst, src, size); +return dst_offset; +} + +static uint32 _strlen_wrapper(int32 s_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char *s; + +if (!validate_app_addr(s_offset, 1)) +return 0; + +s = addr_app_to_native(s_offset); +return strlen(s); +} + +static int32 _malloc_wrapper(uint32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +return module_malloc(size); +} + +static int32 _calloc_wrapper(uint32 nmemb, uint32 size) +{ +uint64 total_size = (uint64) nmemb * (uint64) size; +wasm_module_inst_t module_inst = get_module_inst(); +uint32 ret_offset = 0; +uint8 *ret_ptr; + +if (total_size > UINT32_MAX) +total_size = UINT32_MAX; + +ret_offset = module_malloc((uint32 )total_size); +if (ret_offset) { +ret_ptr = addr_app_to_native(ret_offset); +memset(ret_ptr, 0, (uint32) total_size); +} + +return ret_offset; +} + +static void _free_wrapper(int32 ptr_offset) +{ +wasm_module_inst_t module_inst = get_module_inst(); + +if (!validate_app_addr(ptr_offset, 4)) +return; +return module_free(ptr_offset); +} + +static void setTempRet0_wrapper(uint32 temp_ret) +{ +wasm_module_inst_t module_inst = get_module_inst(); +wasm_runtime_set_temp_ret(module_inst, temp_ret); +} + +static uint32 getTempRet0_wrapper() +{ +wasm_module_inst_t module_inst = get_module_inst(); +return wasm_runtime_get_temp_ret(module_inst); +} + +static uint32 _llvm_bswap_i16_wrapper(uint32 data) +{ +return (data & 0xFFFF0000) | ((data & 0xFF) << 8) | ((data & 0xFF00) >> 8); +} + +static uint32 _llvm_bswap_i32_wrapper(uint32 data) +{ +return ((data & 0xFF) << 24) | ((data & 0xFF00) << 8) | ((data & 0xFF0000) >> 8) +| ((data & 0xFF000000) >> 24); +} + +static uint32 _bitshift64Lshr_wrapper(uint32 uint64_part0, uint32 uint64_part1, +uint32 bits) +{ +wasm_module_inst_t module_inst = get_module_inst(); +union { +uint64 value; +uint32 parts[2]; +} u; + +u.parts[0] = uint64_part0; +u.parts[1] = uint64_part1; + +u.value >>= bits; +/* return low 32bit and save high 32bit to temp ret */ +wasm_runtime_set_temp_ret(module_inst, (uint32) (u.value >> 32)); +return (uint32) u.value; +} + +static uint32 _bitshift64Shl_wrapper(uint32 int64_part0, uint32 int64_part1, +uint32 bits) +{ +wasm_module_inst_t module_inst = get_module_inst(); +union { +int64 value; +uint32 parts[2]; +} u; + +u.parts[0] = int64_part0; +u.parts[1] = int64_part1; + +u.value <<= bits; +/* return low 32bit and save high 32bit to temp ret */ +wasm_runtime_set_temp_ret(module_inst, (uint32) (u.value >> 32)); +return (uint32) u.value; +} + +static void _llvm_stackrestore_wrapper(uint32 llvm_stack) +{ +wasm_module_inst_t module_inst = get_module_inst(); +printf("_llvm_stackrestore called!\n"); +wasm_runtime_set_llvm_stack(module_inst, llvm_stack); +} + +static uint32 _llvm_stacksave_wrapper() +{ +wasm_module_inst_t module_inst = get_module_inst(); +printf("_llvm_stacksave called!\n"); +return wasm_runtime_get_llvm_stack(module_inst); +} + +static int32 _emscripten_memcpy_big_wrapper(int32 dst_offset, int32 src_offset, +uint32 size) +{ +wasm_module_inst_t module_inst = get_module_inst(); +void *dst, *src; + +if (!validate_app_addr(dst_offset, size) || !validate_app_addr(src_offset, size)) +return dst_offset; + +dst = addr_app_to_native(dst_offset); +src = addr_app_to_native(src_offset); + +memcpy(dst, src, size); +return dst_offset; +} + +static void abort_wrapper(int32 code) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char buf[32]; +snprintf(buf, sizeof(buf), "env.abort(%i)", code); +wasm_runtime_set_exception(module_inst, buf); +} + +static void abortStackOverflow_wrapper(int32 code) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char buf[32]; +snprintf(buf, sizeof(buf), "env.abortStackOverflow(%i)", code); +wasm_runtime_set_exception(module_inst, buf); +} + +static void nullFunc_X_wrapper(int32 code) +{ +wasm_module_inst_t module_inst = get_module_inst(); +char buf[32]; +snprintf(buf, sizeof(buf), "env.nullFunc_X(%i)", code); +wasm_runtime_set_exception(module_inst, buf); +} + +/* TODO: add function parameter/result types check */ +#define REG_NATIVE_FUNC(module_name, func_name) \ + {#module_name, #func_name, func_name##_wrapper} + +typedef struct WASMNativeFuncDef { +const char *module_name; +const char *func_name; +void *func_ptr; +} WASMNativeFuncDef; + +static WASMNativeFuncDef native_func_defs[] = { +REG_NATIVE_FUNC(env, _printf), +REG_NATIVE_FUNC(env, _sprintf), +REG_NATIVE_FUNC(env, _snprintf), +REG_NATIVE_FUNC(env, _puts), +REG_NATIVE_FUNC(env, _putchar), +REG_NATIVE_FUNC(env, _memcmp), +REG_NATIVE_FUNC(env, _memcpy), +REG_NATIVE_FUNC(env, _memmove), +REG_NATIVE_FUNC(env, _memset), +REG_NATIVE_FUNC(env, _strchr), +REG_NATIVE_FUNC(env, _strcmp), +REG_NATIVE_FUNC(env, _strcpy), +REG_NATIVE_FUNC(env, _strlen), +REG_NATIVE_FUNC(env, _strncmp), +REG_NATIVE_FUNC(env, _strncpy), +REG_NATIVE_FUNC(env, _malloc), +REG_NATIVE_FUNC(env, _calloc), +REG_NATIVE_FUNC(env, _strdup), +REG_NATIVE_FUNC(env, _free), +REG_NATIVE_FUNC(env, setTempRet0), +REG_NATIVE_FUNC(env, getTempRet0), +REG_NATIVE_FUNC(env, _llvm_bswap_i16), +REG_NATIVE_FUNC(env, _llvm_bswap_i32), +REG_NATIVE_FUNC(env, _bitshift64Lshr), +REG_NATIVE_FUNC(env, _bitshift64Shl), +REG_NATIVE_FUNC(env, _llvm_stackrestore), +REG_NATIVE_FUNC(env, _llvm_stacksave), +REG_NATIVE_FUNC(env, _emscripten_memcpy_big), +REG_NATIVE_FUNC(env, abort), +REG_NATIVE_FUNC(env, abortStackOverflow), +REG_NATIVE_FUNC(env, nullFunc_X), }; + +void* +wasm_native_func_lookup(const char *module_name, const char *func_name) +{ +uint32 size = sizeof(native_func_defs) / sizeof(WASMNativeFuncDef); +WASMNativeFuncDef *func_def = native_func_defs; +WASMNativeFuncDef *func_def_end = func_def + size; +void *ret; + +if (!module_name || !func_name) +return NULL; + +while (func_def < func_def_end) { +if (!strcmp(func_def->module_name, module_name) +&& !strcmp(func_def->func_name, func_name)) +return (void*) (uintptr_t) func_def->func_ptr; +func_def++; +} + +if ((ret = wasm_platform_native_func_lookup(module_name, func_name))) +return ret; + +return NULL; +} + +/************************************* + * Global Variables * + *************************************/ + +typedef struct WASMNativeGlobalDef { +const char *module_name; +const char *global_name; +WASMValue global_data; +} WASMNativeGlobalDef; + +static WASMNativeGlobalDef native_global_defs[] = { { "env", "STACKTOP", +.global_data.u32 = 0 }, { "env", "STACK_MAX", .global_data.u32 = 0 }, { "env", +"ABORT", .global_data.u32 = 0 }, { "env", "memoryBase", .global_data.u32 = 0 }, +{ "env", "__memory_base", .global_data.u32 = 0 }, { "env", "tableBase", +.global_data.u32 = 0 }, { "env", "__table_base", .global_data.u32 = 0 }, { +"env", "DYNAMICTOP_PTR", .global_data.addr = 0 }, { "env", "tempDoublePtr", +.global_data.addr = 0 }, { "global", "NaN", .global_data.u64 = +0x7FF8000000000000LL }, { "global", "Infinity", .global_data.u64 = +0x7FF0000000000000LL }, }; + +bool wasm_native_global_lookup(const char *module_name, const char *global_name, +WASMGlobalImport *global) +{ +uint32 size = sizeof(native_global_defs) / sizeof(WASMNativeGlobalDef); +WASMNativeGlobalDef *global_def = native_global_defs; +WASMNativeGlobalDef *global_def_end = global_def + size; + +if (!module_name || !global_name || !global) +return false; + +/* Lookup constant globals which can be defined by table */ +while (global_def < global_def_end) { +if (!strcmp(global_def->module_name, module_name) +&& !strcmp(global_def->global_name, global_name)) { +global->global_data_linked = global_def->global_data; +return true; +} +global_def++; +} + +/* Lookup non-constant globals which cannot be defined by table */ +if (!strcmp(module_name, "env")) { +if (!strcmp(global_name, "_stdin")) { +global->global_data_linked.addr = (uintptr_t) stdin; +global->is_addr = true; +return true; +} else if (!strcmp(global_name, "_stdout")) { +global->global_data_linked.addr = (uintptr_t) stdout; +global->is_addr = true; +return true; +} else if (!strcmp(global_name, "_stderr")) { +global->global_data_linked.addr = (uintptr_t) stderr; +global->is_addr = true; +return true; +} +} + +return false; +} + +bool wasm_native_init() +{ +/* TODO: qsort the function defs and global defs. */ +return true; +} + diff --git a/core/iwasm/lib/native/libc/wasm_libc.cmake b/core/iwasm/lib/native/libc/wasm_libc.cmake new file mode 100644 index 000000000..52e55123f --- /dev/null +++ b/core/iwasm/lib/native/libc/wasm_libc.cmake @@ -0,0 +1,23 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (WASM_LIBC_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${WASM_LIBC_DIR}) + + +file (GLOB_RECURSE source_all ${WASM_LIBC_DIR}/*.c) + +set (WASM_LIBC_SOURCE ${source_all}) + diff --git a/core/iwasm/products/linux/CMakeLists.txt b/core/iwasm/products/linux/CMakeLists.txt new file mode 100644 index 000000000..5421d11ee --- /dev/null +++ b/core/iwasm/products/linux/CMakeLists.txt @@ -0,0 +1,92 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cmake_minimum_required (VERSION 2.8) + +project (iwasm) + +set (PLATFORM "linux") + +# Reset default linker flags +set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") +set (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") + +# Enable repl mode if want to test spec cases +# add_definitions(-DWASM_ENABLE_REPL) + +if (NOT ("$ENV{VALGRIND}" STREQUAL "YES")) + add_definitions(-DNVALGRIND) +endif () + +# Currently build as 32-bit by default. +set (BUILD_AS_64BIT_SUPPORT "NO") + +if (CMAKE_SIZEOF_VOID_P EQUAL 8) +if (${BUILD_AS_64BIT_SUPPORT} STREQUAL "YES") + # Add -fPIC flag if build as 64-bit + set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") + set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_C_FLAGS} -fPIC") +else () + add_definitions (-m32) + set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32") +endif () +endif () + +set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections") +set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic") + +set (SHARED_LIB_DIR ../../../shared-lib) + +include_directories (. + ../../runtime/include + ../../runtime/platform/include + ${SHARED_LIB_DIR}/include) + +enable_language (ASM) + +include (../../runtime/platform/${PLATFORM}/platform.cmake) +include (../../runtime/utils/utils.cmake) +include (../../runtime/vmcore_wasm/vmcore.cmake) +include (../../lib/native/base/wasm_lib_base.cmake) +include (../../lib/native/libc/wasm_libc.cmake) +include (${SHARED_LIB_DIR}/platform/${PLATFORM}/shared_platform.cmake) +include (${SHARED_LIB_DIR}/mem-alloc/mem_alloc.cmake) + +add_library (vmlib + ${WASM_PLATFORM_LIB_SOURCE} + ${WASM_UTILS_LIB_SOURCE} + ${VMCORE_LIB_SOURCE} + ${WASM_LIB_BASE_DIR}/base-lib-export.c + ${WASM_LIBC_SOURCE} + ${PLATFORM_SHARED_SOURCE} + ${MEM_ALLOC_SHARED_SOURCE}) + +add_executable (iwasm main.c ext-lib-export.c) + +target_link_libraries (iwasm vmlib -lm -ldl -lpthread) + +add_library (libiwasm SHARED + ${WASM_PLATFORM_LIB_SOURCE} + ${WASM_UTILS_LIB_SOURCE} + ${VMCORE_LIB_SOURCE} + ${WASM_LIB_BASE_DIR}/base-lib-export.c + ${WASM_LIBC_SOURCE} + ${PLATFORM_SHARED_SOURCE} + ${MEM_ALLOC_SHARED_SOURCE}) + +set_target_properties (libiwasm PROPERTIES OUTPUT_NAME iwasm) + +target_link_libraries (libiwasm -lm -ldl -lpthread) + diff --git a/core/iwasm/products/linux/b/CMakeCache.txt b/core/iwasm/products/linux/b/CMakeCache.txt new file mode 100644 index 000000000..24a8c55de --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeCache.txt @@ -0,0 +1,341 @@ +# This is the CMakeCache file. +# For build in directory: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//The ASM compiler +CMAKE_ASM_COMPILER:FILEPATH=/usr/bin/cc + +//Flags used by the assembler during all build types. +CMAKE_ASM_FLAGS:STRING= + +//Flags used by the assembler during debug builds. +CMAKE_ASM_FLAGS_DEBUG:STRING=-g + +//Flags used by the assembler during release minsize builds. +CMAKE_ASM_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the assembler during release builds. +CMAKE_ASM_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the assembler during Release with Debug Info builds. +CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Choose the type of build, options are: None(CMAKE_CXX_FLAGS or +// CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel. +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//Flags used by the compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//Flags used by the compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the compiler during debug builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the compiler during release builds for minimum +// size. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the compiler during release builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the compiler during release builds with debug info. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Flags used by the linker. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/usr/local + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make + +//Flags used by the linker during the creation of modules. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=iwasm + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Flags used by the linker during the creation of dll's. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during debug builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during release minsize builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during release builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during Release with Debug Info builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Value Computed by CMake +iwasm_BINARY_DIR:STATIC=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +//Value Computed by CMake +iwasm_SOURCE_DIR:STATIC=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +//Dependencies for the target +libiwasm_LIB_DEPENDS:STATIC=general;-lm;general;-ldl;general;-lpthread; + +//Dependencies for target +vmlib_LIB_DEPENDS:STATIC= + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_COMPILER +CMAKE_ASM_COMPILER-ADVANCED:INTERNAL=1 +CMAKE_ASM_COMPILER_WORKS:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_FLAGS +CMAKE_ASM_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_FLAGS_DEBUG +CMAKE_ASM_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_FLAGS_MINSIZEREL +CMAKE_ASM_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_FLAGS_RELEASE +CMAKE_ASM_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_ASM_FLAGS_RELWITHDEBINFO +CMAKE_ASM_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=5 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.5 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 + diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeASMCompiler.cmake b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeASMCompiler.cmake new file mode 100644 index 000000000..db6db32a3 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeASMCompiler.cmake @@ -0,0 +1,12 @@ +set(CMAKE_ASM_COMPILER "/usr/bin/cc") +set(CMAKE_ASM_COMPILER_ARG1 "") +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_ASM_COMPILER_LOADED 1) +set(CMAKE_ASM_COMPILER_ID "GNU") +set(CMAKE_ASM_COMPILER_ENV_VAR "ASM") + +set(CMAKE_ASM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_ASM_LINKER_PREFERENCE 0) + diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCCompiler.cmake b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCCompiler.cmake new file mode 100644 index 000000000..f40522e62 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCCompiler.cmake @@ -0,0 +1,67 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "5.4.0") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11") +set(CMAKE_C_COMPILE_FEATURES "c_function_prototypes;c_restrict;c_variadic_macros;c_static_assert") +set(CMAKE_C90_COMPILE_FEATURES "c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_static_assert") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "c") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake new file mode 100644 index 000000000..013ee9298 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeCXXCompiler.cmake @@ -0,0 +1,68 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "5.4.0") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "98") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_template_template_parameters;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_SIMULATE_VERSION "") + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) +set(CMAKE_COMPILER_IS_MINGW ) +set(CMAKE_COMPILER_IS_CYGWIN ) +if(CMAKE_COMPILER_IS_CYGWIN) + set(CYGWIN 1) + set(UNIX 1) +endif() + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +if(CMAKE_COMPILER_IS_MINGW) + set(MINGW 1) +endif() +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;mm;CPP) +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;c") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 000000000..8fadb3a43 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_C.bin differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 000000000..f89cba0f5 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeSystem.cmake b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeSystem.cmake new file mode 100644 index 000000000..115428224 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-4.15.0-47-generic") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "4.15.0-47-generic") +set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64") + + + +set(CMAKE_SYSTEM "Linux-4.15.0-47-generic") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "4.15.0-47-generic") +set(CMAKE_SYSTEM_PROCESSOR "x86_64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 000000000..570a15e99 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,544 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(SDCC) +# define COMPILER_ID "SDCC" + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID "" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if !defined(__STDC_VERSION__) + "90" +#elif __STDC_VERSION__ >= 201000L + "11" +#elif __STDC_VERSION__ >= 199901L + "99" +#else +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/a.out b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/a.out new file mode 100755 index 000000000..afc42a94b Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/a.out differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 000000000..e6d853637 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,533 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif + /* __INTEL_COMPILER = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version) +# define COMPILER_ID "Fujitsu" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" + +#elif defined(__ARMCC_VERSION) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) +# define COMPILER_ID "MIPSpro" +# if defined(_SGI_COMPILER_VERSION) + /* _SGI_COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10) +# else + /* _COMPILER_VERSION = VRP */ +# define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100) +# define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10) +# define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__sgi) +# define COMPILER_ID "MIPSpro" + +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXE) || defined(__CRAYXC) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__sgi) || defined(__sgi__) || defined(_SGI) +# define PLATFORM_ID "IRIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# else /* unknown platform */ +# define PLATFORM_ID "" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID "" + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID "" +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number components. */ +#ifdef COMPILER_VERSION_MAJOR +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + + +const char* info_language_dialect_default = "INFO" ":" "dialect_default[" +#if __cplusplus >= 201402L + "14" +#elif __cplusplus >= 201103L + "11" +#else + "98" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXE) || defined(__CRAYXC) + require += info_cray[argc]; +#endif + require += info_language_dialect_default[argc]; + (void)argv; + return require; +} diff --git a/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/a.out b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/a.out new file mode 100755 index 000000000..648b86701 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/a.out differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/CMakeDirectoryInformation.cmake b/core/iwasm/products/linux/b/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 000000000..57c0e8064 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/core/iwasm/products/linux/b/CMakeFiles/CMakeOutput.log b/core/iwasm/products/linux/b/CMakeFiles/CMakeOutput.log new file mode 100644 index 000000000..da6f8edfb --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/CMakeOutput.log @@ -0,0 +1,554 @@ +The system is: Linux - 4.15.0-47-generic - x86_64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/cc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/3.5.1/CompilerIdCXX/a.out" + +Determining if the C compiler works passed with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_be8b7/fast" +/usr/bin/make -f CMakeFiles/cmTC_be8b7.dir/build.make CMakeFiles/cmTC_be8b7.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_be8b7.dir/testCCompiler.c.o +/usr/bin/cc -o CMakeFiles/cmTC_be8b7.dir/testCCompiler.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp/testCCompiler.c +Linking C executable cmTC_be8b7 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_be8b7.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_be8b7.dir/testCCompiler.c.o -o cmTC_be8b7 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_7e61b/fast" +/usr/bin/make -f CMakeFiles/cmTC_7e61b.dir/build.make CMakeFiles/cmTC_7e61b.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o +/usr/bin/cc -o CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c +Linking C executable cmTC_7e61b +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7e61b.dir/link.txt --verbose=1 +/usr/bin/cc -v CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -o cmTC_7e61b -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7e61b' '-rdynamic' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cc55FSYW.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_7e61b /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_7e61b/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_7e61b.dir/build.make CMakeFiles/cmTC_7e61b.dir/build] + ignore line: [make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -o CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c] + ignore line: [Linking C executable cmTC_7e61b] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_7e61b.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -o cmTC_7e61b -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_7e61b' '-rdynamic' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/cc55FSYW.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_7e61b /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/cc55FSYW.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_7e61b] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_7e61b.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--no-as-needed] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + + + +Detecting C [-std=c11] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_d8be6/fast" +/usr/bin/make -f CMakeFiles/cmTC_d8be6.dir/build.make CMakeFiles/cmTC_d8be6.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_d8be6.dir/feature_tests.c.o +/usr/bin/cc -std=c11 -o CMakeFiles/cmTC_d8be6.dir/feature_tests.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c +Linking C executable cmTC_d8be6 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d8be6.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_d8be6.dir/feature_tests.c.o -o cmTC_d8be6 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:1c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c99] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_a38f5/fast" +/usr/bin/make -f CMakeFiles/cmTC_a38f5.dir/build.make CMakeFiles/cmTC_a38f5.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_a38f5.dir/feature_tests.c.o +/usr/bin/cc -std=c99 -o CMakeFiles/cmTC_a38f5.dir/feature_tests.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c +Linking C executable cmTC_a38f5 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a38f5.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_a38f5.dir/feature_tests.c.o -o cmTC_a38f5 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:1c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:1c_variadic_macros + + +Detecting C [-std=c90] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_99b3d/fast" +/usr/bin/make -f CMakeFiles/cmTC_99b3d.dir/build.make CMakeFiles/cmTC_99b3d.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_99b3d.dir/feature_tests.c.o +/usr/bin/cc -std=c90 -o CMakeFiles/cmTC_99b3d.dir/feature_tests.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c +Linking C executable cmTC_99b3d +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_99b3d.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_99b3d.dir/feature_tests.c.o -o cmTC_99b3d -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: C_FEATURE:1c_function_prototypes + Feature record: C_FEATURE:0c_restrict + Feature record: C_FEATURE:0c_static_assert + Feature record: C_FEATURE:0c_variadic_macros +Determining if the CXX compiler works passed with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_6785b/fast" +/usr/bin/make -f CMakeFiles/cmTC_6785b.dir/build.make CMakeFiles/cmTC_6785b.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_6785b.dir/testCXXCompiler.cxx.o +/usr/bin/c++ -o CMakeFiles/cmTC_6785b.dir/testCXXCompiler.cxx.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp/testCXXCompiler.cxx +Linking CXX executable cmTC_6785b +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_6785b.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_6785b.dir/testCXXCompiler.cxx.o -o cmTC_6785b -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_eaf78/fast" +/usr/bin/make -f CMakeFiles/cmTC_eaf78.dir/build.make CMakeFiles/cmTC_eaf78.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -o CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp +Linking CXX executable cmTC_eaf78 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eaf78.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_eaf78 -rdynamic +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) +COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_eaf78' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64' + /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccl1noZy.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_eaf78 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command:"/usr/bin/make" "cmTC_eaf78/fast"] + ignore line: [/usr/bin/make -f CMakeFiles/cmTC_eaf78.dir/build.make CMakeFiles/cmTC_eaf78.dir/build] + ignore line: [make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -o CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Linking CXX executable cmTC_eaf78] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_eaf78.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_eaf78 -rdynamic ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] + ignore line: [Target: x86_64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.10' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu] + ignore line: [Thread model: posix] + ignore line: [gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_eaf78' '-rdynamic' '-shared-libgcc' '-mtune=generic' '-march=x86-64'] + link line: [ /usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccl1noZy.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o cmTC_eaf78 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccl1noZy.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--sysroot=/] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [-m] ==> ignore + arg [elf_x86_64] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-export-dynamic] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib64/ld-linux-x86-64.so.2] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_eaf78] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o] ==> ignore + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] + arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] + arg [CMakeFiles/cmTC_eaf78.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/x86_64-linux-gnu/5/crtend.o] ==> ignore + arg [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o] ==> ignore + remove lib [gcc_s] + remove lib [gcc] + remove lib [gcc_s] + remove lib [gcc] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5] ==> [/usr/lib/gcc/x86_64-linux-gnu/5] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/5/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;c] + implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/5;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib] + implicit fwks: [] + + + + +Detecting CXX [-std=c++14] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_77ea0/fast" +/usr/bin/make -f CMakeFiles/cmTC_77ea0.dir/build.make CMakeFiles/cmTC_77ea0.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_77ea0.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++14 -o CMakeFiles/cmTC_77ea0.dir/feature_tests.cxx.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_77ea0 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_77ea0.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_77ea0.dir/feature_tests.cxx.o -o cmTC_77ea0 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:1cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:1cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:1cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:1cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:1cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:1cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:1cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:1cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:1cxx_relaxed_constexpr + Feature record: CXX_FEATURE:1cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:1cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++11] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_68031/fast" +/usr/bin/make -f CMakeFiles/cmTC_68031.dir/build.make CMakeFiles/cmTC_68031.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_68031.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++11 -o CMakeFiles/cmTC_68031.dir/feature_tests.cxx.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_68031 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_68031.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_68031.dir/feature_tests.cxx.o -o cmTC_68031 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:1cxx_alias_templates + Feature record: CXX_FEATURE:1cxx_alignas + Feature record: CXX_FEATURE:1cxx_alignof + Feature record: CXX_FEATURE:1cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:1cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:1cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:1cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:1cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:1cxx_default_function_template_args + Feature record: CXX_FEATURE:1cxx_defaulted_functions + Feature record: CXX_FEATURE:1cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:1cxx_delegating_constructors + Feature record: CXX_FEATURE:1cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:1cxx_enum_forward_declarations + Feature record: CXX_FEATURE:1cxx_explicit_conversions + Feature record: CXX_FEATURE:1cxx_extended_friend_declarations + Feature record: CXX_FEATURE:1cxx_extern_templates + Feature record: CXX_FEATURE:1cxx_final + Feature record: CXX_FEATURE:1cxx_func_identifier + Feature record: CXX_FEATURE:1cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:1cxx_inheriting_constructors + Feature record: CXX_FEATURE:1cxx_inline_namespaces + Feature record: CXX_FEATURE:1cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:1cxx_local_type_template_args + Feature record: CXX_FEATURE:1cxx_long_long_type + Feature record: CXX_FEATURE:1cxx_noexcept + Feature record: CXX_FEATURE:1cxx_nonstatic_member_init + Feature record: CXX_FEATURE:1cxx_nullptr + Feature record: CXX_FEATURE:1cxx_override + Feature record: CXX_FEATURE:1cxx_range_for + Feature record: CXX_FEATURE:1cxx_raw_string_literals + Feature record: CXX_FEATURE:1cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:1cxx_right_angle_brackets + Feature record: CXX_FEATURE:1cxx_rvalue_references + Feature record: CXX_FEATURE:1cxx_sizeof_member + Feature record: CXX_FEATURE:1cxx_static_assert + Feature record: CXX_FEATURE:1cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:1cxx_thread_local + Feature record: CXX_FEATURE:1cxx_trailing_return_types + Feature record: CXX_FEATURE:1cxx_unicode_literals + Feature record: CXX_FEATURE:1cxx_uniform_initialization + Feature record: CXX_FEATURE:1cxx_unrestricted_unions + Feature record: CXX_FEATURE:1cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:1cxx_variadic_macros + Feature record: CXX_FEATURE:1cxx_variadic_templates + + +Detecting CXX [-std=c++98] compiler features compiled with the following output: +Change Dir: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp + +Run Build Command:"/usr/bin/make" "cmTC_92e24/fast" +/usr/bin/make -f CMakeFiles/cmTC_92e24.dir/build.make CMakeFiles/cmTC_92e24.dir/build +make[1]: Entering directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_92e24.dir/feature_tests.cxx.o +/usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_92e24.dir/feature_tests.cxx.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx +Linking CXX executable cmTC_92e24 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_92e24.dir/link.txt --verbose=1 +/usr/bin/c++ CMakeFiles/cmTC_92e24.dir/feature_tests.cxx.o -o cmTC_92e24 -rdynamic +make[1]: Leaving directory '/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/CMakeTmp' + + + Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers + Feature record: CXX_FEATURE:0cxx_alias_templates + Feature record: CXX_FEATURE:0cxx_alignas + Feature record: CXX_FEATURE:0cxx_alignof + Feature record: CXX_FEATURE:0cxx_attributes + Feature record: CXX_FEATURE:0cxx_attribute_deprecated + Feature record: CXX_FEATURE:0cxx_auto_type + Feature record: CXX_FEATURE:0cxx_binary_literals + Feature record: CXX_FEATURE:0cxx_constexpr + Feature record: CXX_FEATURE:0cxx_contextual_conversions + Feature record: CXX_FEATURE:0cxx_decltype + Feature record: CXX_FEATURE:0cxx_decltype_auto + Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types + Feature record: CXX_FEATURE:0cxx_default_function_template_args + Feature record: CXX_FEATURE:0cxx_defaulted_functions + Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers + Feature record: CXX_FEATURE:0cxx_delegating_constructors + Feature record: CXX_FEATURE:0cxx_deleted_functions + Feature record: CXX_FEATURE:0cxx_digit_separators + Feature record: CXX_FEATURE:0cxx_enum_forward_declarations + Feature record: CXX_FEATURE:0cxx_explicit_conversions + Feature record: CXX_FEATURE:0cxx_extended_friend_declarations + Feature record: CXX_FEATURE:0cxx_extern_templates + Feature record: CXX_FEATURE:0cxx_final + Feature record: CXX_FEATURE:0cxx_func_identifier + Feature record: CXX_FEATURE:0cxx_generalized_initializers + Feature record: CXX_FEATURE:0cxx_generic_lambdas + Feature record: CXX_FEATURE:0cxx_inheriting_constructors + Feature record: CXX_FEATURE:0cxx_inline_namespaces + Feature record: CXX_FEATURE:0cxx_lambdas + Feature record: CXX_FEATURE:0cxx_lambda_init_captures + Feature record: CXX_FEATURE:0cxx_local_type_template_args + Feature record: CXX_FEATURE:0cxx_long_long_type + Feature record: CXX_FEATURE:0cxx_noexcept + Feature record: CXX_FEATURE:0cxx_nonstatic_member_init + Feature record: CXX_FEATURE:0cxx_nullptr + Feature record: CXX_FEATURE:0cxx_override + Feature record: CXX_FEATURE:0cxx_range_for + Feature record: CXX_FEATURE:0cxx_raw_string_literals + Feature record: CXX_FEATURE:0cxx_reference_qualified_functions + Feature record: CXX_FEATURE:0cxx_relaxed_constexpr + Feature record: CXX_FEATURE:0cxx_return_type_deduction + Feature record: CXX_FEATURE:0cxx_right_angle_brackets + Feature record: CXX_FEATURE:0cxx_rvalue_references + Feature record: CXX_FEATURE:0cxx_sizeof_member + Feature record: CXX_FEATURE:0cxx_static_assert + Feature record: CXX_FEATURE:0cxx_strong_enums + Feature record: CXX_FEATURE:1cxx_template_template_parameters + Feature record: CXX_FEATURE:0cxx_thread_local + Feature record: CXX_FEATURE:0cxx_trailing_return_types + Feature record: CXX_FEATURE:0cxx_unicode_literals + Feature record: CXX_FEATURE:0cxx_uniform_initialization + Feature record: CXX_FEATURE:0cxx_unrestricted_unions + Feature record: CXX_FEATURE:0cxx_user_literals + Feature record: CXX_FEATURE:0cxx_variable_templates + Feature record: CXX_FEATURE:0cxx_variadic_macros + Feature record: CXX_FEATURE:0cxx_variadic_templates diff --git a/core/iwasm/products/linux/b/CMakeFiles/Makefile.cmake b/core/iwasm/products/linux/b/CMakeFiles/Makefile.cmake new file mode 100644 index 000000000..582713e1a --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/Makefile.cmake @@ -0,0 +1,131 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/wasm_lib_base.cmake" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm_libc.cmake" + "../CMakeLists.txt" + "CMakeFiles/3.5.1/CMakeASMCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/feature_tests.c" + "CMakeFiles/feature_tests.cxx" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/platform.cmake" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/utils.cmake" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/vmcore.cmake" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.cmake" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/shared_platform.cmake" + "/usr/share/cmake-3.5/Modules/CMakeASMCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeASMInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.5/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake-3.5/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.5/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineASMCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.5/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.5/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.5/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseArguments.cmake" + "/usr/share/cmake-3.5/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.5/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestASMCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake-3.5/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.5/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-ASM.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C-FeatureTests.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX-FeatureTests.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MIPSpro-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.5/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.5/Modules/MultiArchCross.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-CXX.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.5/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.5/Modules/Platform/UnixPaths.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.5.1/CMakeSystem.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCCompiler.cmake" + "CMakeFiles/3.5.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.5.1/CMakeASMCompiler.cmake" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/vmlib.dir/DependInfo.cmake" + "CMakeFiles/iwasm.dir/DependInfo.cmake" + "CMakeFiles/libiwasm.dir/DependInfo.cmake" + ) diff --git a/core/iwasm/products/linux/b/CMakeFiles/Makefile2 b/core/iwasm/products/linux/b/CMakeFiles/Makefile2 new file mode 100644 index 000000000..a8ff742a6 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/Makefile2 @@ -0,0 +1,182 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# The main recursive all target +all: + +.PHONY : all + +# The main recursive preinstall target +preinstall: + +.PHONY : preinstall + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +#============================================================================= +# Target rules for target CMakeFiles/vmlib.dir + +# All Build rule for target. +CMakeFiles/vmlib.dir/all: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/depend + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53 "Built target vmlib" +.PHONY : CMakeFiles/vmlib.dir/all + +# Include target in all. +all: CMakeFiles/vmlib.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +CMakeFiles/vmlib.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 25 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/vmlib.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 0 +.PHONY : CMakeFiles/vmlib.dir/rule + +# Convenience name for target. +vmlib: CMakeFiles/vmlib.dir/rule + +.PHONY : vmlib + +# clean rule for target. +CMakeFiles/vmlib.dir/clean: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/clean +.PHONY : CMakeFiles/vmlib.dir/clean + +# clean rule for target. +clean: CMakeFiles/vmlib.dir/clean + +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/iwasm.dir + +# All Build rule for target. +CMakeFiles/iwasm.dir/all: CMakeFiles/vmlib.dir/all + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/depend + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=1,2,3 "Built target iwasm" +.PHONY : CMakeFiles/iwasm.dir/all + +# Include target in all. +all: CMakeFiles/iwasm.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +CMakeFiles/iwasm.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 28 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/iwasm.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 0 +.PHONY : CMakeFiles/iwasm.dir/rule + +# Convenience name for target. +iwasm: CMakeFiles/iwasm.dir/rule + +.PHONY : iwasm + +# clean rule for target. +CMakeFiles/iwasm.dir/clean: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/clean +.PHONY : CMakeFiles/iwasm.dir/clean + +# clean rule for target. +clean: CMakeFiles/iwasm.dir/clean + +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/libiwasm.dir + +# All Build rule for target. +CMakeFiles/libiwasm.dir/all: + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/depend + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28 "Built target libiwasm" +.PHONY : CMakeFiles/libiwasm.dir/all + +# Include target in all. +all: CMakeFiles/libiwasm.dir/all + +.PHONY : all + +# Build rule for subdir invocation for target. +CMakeFiles/libiwasm.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 25 + $(MAKE) -f CMakeFiles/Makefile2 CMakeFiles/libiwasm.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 0 +.PHONY : CMakeFiles/libiwasm.dir/rule + +# Convenience name for target. +libiwasm: CMakeFiles/libiwasm.dir/rule + +.PHONY : libiwasm + +# clean rule for target. +CMakeFiles/libiwasm.dir/clean: + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/clean +.PHONY : CMakeFiles/libiwasm.dir/clean + +# clean rule for target. +clean: CMakeFiles/libiwasm.dir/clean + +.PHONY : clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/core/iwasm/products/linux/b/CMakeFiles/TargetDirectories.txt b/core/iwasm/products/linux/b/CMakeFiles/TargetDirectories.txt new file mode 100644 index 000000000..3b0e955b1 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,5 @@ +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/edit_cache.dir +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/rebuild_cache.dir diff --git a/core/iwasm/products/linux/b/CMakeFiles/cmake.check_cache b/core/iwasm/products/linux/b/CMakeFiles/cmake.check_cache new file mode 100644 index 000000000..3dccd7317 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/core/iwasm/products/linux/b/CMakeFiles/feature_tests.bin b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.bin new file mode 100755 index 000000000..6c440e3f3 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.bin differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c new file mode 100644 index 000000000..6590dded2 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.c @@ -0,0 +1,34 @@ + + const char features[] = {"\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 +"1" +#else +"0" +#endif +"c_function_prototypes\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_restrict\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L +"1" +#else +"0" +#endif +"c_static_assert\n" +"C_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +"1" +#else +"0" +#endif +"c_variadic_macros\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx new file mode 100644 index 000000000..b93418c6e --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/feature_tests.cxx @@ -0,0 +1,405 @@ + + const char features[] = {"\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_aggregate_default_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alias_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_alignof\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_attributes\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_attribute_deprecated\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_auto_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_binary_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_contextual_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_decltype\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_decltype_auto\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_decltype_incomplete_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_default_function_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_defaulted_move_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_delegating_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_deleted_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_digit_separators\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_enum_forward_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_explicit_conversions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_extended_friend_declarations\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_extern_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_final\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_func_identifier\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_generalized_initializers\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_generic_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_inheriting_constructors\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_inline_namespaces\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_lambdas\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_lambda_init_captures\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_local_type_template_args\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_long_long_type\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_noexcept\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_nonstatic_member_init\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_nullptr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_override\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_range_for\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_raw_string_literals\n" +"CXX_FEATURE:" +#if ((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40801) && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_reference_qualified_functions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_relaxed_constexpr\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 409 && __cplusplus > 201103L +"1" +#else +"0" +#endif +"cxx_return_type_deduction\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_right_angle_brackets\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_rvalue_references\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_sizeof_member\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_static_assert\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_strong_enums\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && __cplusplus +"1" +#else +"0" +#endif +"cxx_template_template_parameters\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_thread_local\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_trailing_return_types\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unicode_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_uniform_initialization\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_unrestricted_unions\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 407 && __cplusplus >= 201103L +"1" +#else +"0" +#endif +"cxx_user_literals\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 500 && __cplusplus >= 201402L +"1" +#else +"0" +#endif +"cxx_variable_templates\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_macros\n" +"CXX_FEATURE:" +#if (__GNUC__ * 100 + __GNUC_MINOR__) >= 404 && (__cplusplus >= 201103L || (defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)) +"1" +#else +"0" +#endif +"cxx_variadic_templates\n" + +}; + +int main(int argc, char** argv) { (void)argv; return features[argc]; } diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/C.includecache b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/C.includecache new file mode 100644 index 000000000..60b4951ea --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/C.includecache @@ -0,0 +1,172 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../../../../shared-lib/include/bh_memory.h + +../../../../shared-lib/include/config.h + +../../../runtime/include/ext-lib-export.h +lib-export.h +../../../runtime/include/lib-export.h + +../../../runtime/include/lib-export.h + +../../../runtime/include/wasm-export.h +inttypes.h +- +stdbool.h +- + +../../../runtime/include/wasm_log.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/platform/include/wasm_assert.h +bh_assert.h +../../../runtime/platform/include/bh_assert.h + +../../../runtime/platform/include/wasm_config.h +config.h +../../../runtime/platform/include/config.h + +../../../runtime/platform/include/wasm_memory.h +bh_memory.h +../../../runtime/platform/include/bh_memory.h + +../../../runtime/platform/include/wasm_platform_log.h + +../../../runtime/platform/include/wasm_thread.h +bh_thread.h +../../../runtime/platform/include/bh_thread.h + +../../../runtime/platform/include/wasm_types.h +wasm_config.h +../../../runtime/platform/include/wasm_config.h +wasm_platform.h +../../../runtime/platform/include/wasm_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c +lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/lib-export.h +ext-lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c +stdlib.h +- +string.h +- +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_assert.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_log.h +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_platform.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_platform_log.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_thread.h +wasm-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm-export.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/wasm_memory.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/bh_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +wasm_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_config.h +wasm_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_types.h +inttypes.h +- +stdbool.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +stdlib.h +- +stdio.h +- +math.h +- +string.h +- +stdio.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/config.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_config.h +bh_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_types.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_memory.h +inttypes.h +- +stdbool.h +- +assert.h +- +time.h +- +string.h +- +stdio.h +- +assert.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +sys/socket.h +- +netinet/in.h +- + diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/DependInfo.cmake b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/DependInfo.cmake new file mode 100644 index 000000000..ce56dc181 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/DependInfo.cmake @@ -0,0 +1,44 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "C" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_C + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/ext-lib-export.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/main.c.o" + ) +set(CMAKE_C_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_C + "NVALGRIND" + "_POSIX_C_SOURCE=199309L" + "_XOPEN_SOURCE=600" + "__POSIX__" + ) + +# The include file search paths: +set(CMAKE_C_TARGET_INCLUDE_PATH + "../." + "../../../runtime/include" + "../../../runtime/platform/include" + "../../../../shared-lib/include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/DependInfo.cmake" + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/build.make b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/build.make new file mode 100644 index 000000000..b7b18b3b6 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/build.make @@ -0,0 +1,141 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +# Include any dependencies generated for this target. +include CMakeFiles/iwasm.dir/depend.make + +# Include the progress variables for this target. +include CMakeFiles/iwasm.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/iwasm.dir/flags.make + +CMakeFiles/iwasm.dir/main.c.o: CMakeFiles/iwasm.dir/flags.make +CMakeFiles/iwasm.dir/main.c.o: ../main.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/iwasm.dir/main.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/iwasm.dir/main.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c + +CMakeFiles/iwasm.dir/main.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/iwasm.dir/main.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c > CMakeFiles/iwasm.dir/main.c.i + +CMakeFiles/iwasm.dir/main.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/iwasm.dir/main.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c -o CMakeFiles/iwasm.dir/main.c.s + +CMakeFiles/iwasm.dir/main.c.o.requires: + +.PHONY : CMakeFiles/iwasm.dir/main.c.o.requires + +CMakeFiles/iwasm.dir/main.c.o.provides: CMakeFiles/iwasm.dir/main.c.o.requires + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/main.c.o.provides.build +.PHONY : CMakeFiles/iwasm.dir/main.c.o.provides + +CMakeFiles/iwasm.dir/main.c.o.provides.build: CMakeFiles/iwasm.dir/main.c.o + + +CMakeFiles/iwasm.dir/ext-lib-export.c.o: CMakeFiles/iwasm.dir/flags.make +CMakeFiles/iwasm.dir/ext-lib-export.c.o: ../ext-lib-export.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object CMakeFiles/iwasm.dir/ext-lib-export.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/iwasm.dir/ext-lib-export.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c + +CMakeFiles/iwasm.dir/ext-lib-export.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/iwasm.dir/ext-lib-export.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c > CMakeFiles/iwasm.dir/ext-lib-export.c.i + +CMakeFiles/iwasm.dir/ext-lib-export.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/iwasm.dir/ext-lib-export.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c -o CMakeFiles/iwasm.dir/ext-lib-export.c.s + +CMakeFiles/iwasm.dir/ext-lib-export.c.o.requires: + +.PHONY : CMakeFiles/iwasm.dir/ext-lib-export.c.o.requires + +CMakeFiles/iwasm.dir/ext-lib-export.c.o.provides: CMakeFiles/iwasm.dir/ext-lib-export.c.o.requires + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/ext-lib-export.c.o.provides.build +.PHONY : CMakeFiles/iwasm.dir/ext-lib-export.c.o.provides + +CMakeFiles/iwasm.dir/ext-lib-export.c.o.provides.build: CMakeFiles/iwasm.dir/ext-lib-export.c.o + + +# Object files for target iwasm +iwasm_OBJECTS = \ +"CMakeFiles/iwasm.dir/main.c.o" \ +"CMakeFiles/iwasm.dir/ext-lib-export.c.o" + +# External object files for target iwasm +iwasm_EXTERNAL_OBJECTS = + +iwasm: CMakeFiles/iwasm.dir/main.c.o +iwasm: CMakeFiles/iwasm.dir/ext-lib-export.c.o +iwasm: CMakeFiles/iwasm.dir/build.make +iwasm: libvmlib.a +iwasm: CMakeFiles/iwasm.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Linking C executable iwasm" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/iwasm.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/iwasm.dir/build: iwasm + +.PHONY : CMakeFiles/iwasm.dir/build + +CMakeFiles/iwasm.dir/requires: CMakeFiles/iwasm.dir/main.c.o.requires +CMakeFiles/iwasm.dir/requires: CMakeFiles/iwasm.dir/ext-lib-export.c.o.requires + +.PHONY : CMakeFiles/iwasm.dir/requires + +CMakeFiles/iwasm.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/iwasm.dir/cmake_clean.cmake +.PHONY : CMakeFiles/iwasm.dir/clean + +CMakeFiles/iwasm.dir/depend: + cd /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/iwasm.dir/depend + diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/cmake_clean.cmake b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/cmake_clean.cmake new file mode 100644 index 000000000..35c504e8f --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +file(REMOVE_RECURSE + "CMakeFiles/iwasm.dir/main.c.o" + "CMakeFiles/iwasm.dir/ext-lib-export.c.o" + "iwasm.pdb" + "iwasm" +) + +# Per-language clean rules from dependency scanning. +foreach(lang C) + include(CMakeFiles/iwasm.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.internal b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.internal new file mode 100644 index 000000000..524823e14 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.internal @@ -0,0 +1,25 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/iwasm.dir/ext-lib-export.c.o + ../../../runtime/include/ext-lib-export.h + ../../../runtime/include/lib-export.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/ext-lib-export.c +CMakeFiles/iwasm.dir/main.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm-export.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/main.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.make b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.make new file mode 100644 index 000000000..8599a8813 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/depend.make @@ -0,0 +1,25 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/iwasm.dir/ext-lib-export.c.o: ../../../runtime/include/ext-lib-export.h +CMakeFiles/iwasm.dir/ext-lib-export.c.o: ../../../runtime/include/lib-export.h +CMakeFiles/iwasm.dir/ext-lib-export.c.o: ../ext-lib-export.c + +CMakeFiles/iwasm.dir/main.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/iwasm.dir/main.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/include/wasm-export.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/iwasm.dir/main.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/iwasm.dir/main.c.o: ../main.c +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/iwasm.dir/main.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/ext-lib-export.c.o b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/ext-lib-export.c.o new file mode 100644 index 000000000..6e5624ac4 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/ext-lib-export.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/flags.make b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/flags.make new file mode 100644 index 000000000..74130b86b --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# compile C with /usr/bin/cc +C_FLAGS = -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic -m32 + +C_DEFINES = -DNVALGRIND -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600 -D__POSIX__ + +C_INCLUDES = -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/. -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/platform/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../../shared-lib/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc + diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/link.txt b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/link.txt new file mode 100644 index 000000000..a8500b5d8 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/cc -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic -m32 -Wl,--gc-sections CMakeFiles/iwasm.dir/main.c.o CMakeFiles/iwasm.dir/ext-lib-export.c.o -o iwasm libvmlib.a -lm -ldl -lpthread diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/main.c.o b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/main.c.o new file mode 100644 index 000000000..7010356fd Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/main.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/progress.make b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/progress.make new file mode 100644 index 000000000..6a9dc74f4 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/iwasm.dir/progress.make @@ -0,0 +1,4 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/ASM.includecache b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/ASM.includecache new file mode 100644 index 000000000..c28ead375 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/ASM.includecache @@ -0,0 +1,10 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/C.includecache b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/C.includecache new file mode 100644 index 000000000..a54d4cac6 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/C.includecache @@ -0,0 +1,512 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../../../../shared-lib/include/bh_log.h +stdarg.h +- +korp_types.h +../../../../shared-lib/include/korp_types.h + +../../../../shared-lib/include/bh_memory.h + +../../../../shared-lib/include/config.h + +../../../../shared-lib/include/korp_types.h +bh_platform.h +../../../../shared-lib/include/bh_platform.h + +../../../../shared-lib/include/mem_alloc.h +inttypes.h +- + +../../../runtime/include/lib-export.h + +../../../runtime/include/wasm-export.h +inttypes.h +- +stdbool.h +- + +../../../runtime/include/wasm_hashmap.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/include/wasm_log.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/include/wasm_vector.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/platform/include/wasm_assert.h +bh_assert.h +../../../runtime/platform/include/bh_assert.h + +../../../runtime/platform/include/wasm_config.h +config.h +../../../runtime/platform/include/config.h + +../../../runtime/platform/include/wasm_memory.h +bh_memory.h +../../../runtime/platform/include/bh_memory.h + +../../../runtime/platform/include/wasm_platform_log.h + +../../../runtime/platform/include/wasm_thread.h +bh_thread.h +../../../runtime/platform/include/bh_thread.h + +../../../runtime/platform/include/wasm_types.h +wasm_config.h +../../../runtime/platform/include/wasm_config.h +wasm_platform.h +../../../runtime/platform/include/wasm_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c +stdio.h +- +stdlib.h +- +string.h +- +lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/lib-export.h +base-lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h +attr-container.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/attr-container.h +native_interface.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/native_interface.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm-native.h +wasm-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm-export.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm_platform_log.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-runtime.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_memory.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform_log.h +sys/ioctl.h +- +sys/uio.h +- +sys/syscall.h +- +sys/types.h +- +sys/stat.h +- +unistd.h +- +pwd.h +- +fcntl.h +- +errno.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_log.h +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_memory.h +sys/types.h +- +sys/stat.h +- +fcntl.h +- +unistd.h +- +dlfcn.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +wasm_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_config.h +wasm_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_types.h +inttypes.h +- +stdbool.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +stdlib.h +- +stdio.h +- +math.h +- +string.h +- +stdio.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_thread.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_platform_log.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_vector.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c +errno.h +- +stdlib.h +- +string.h +- +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform_log.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm-opcode.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm-opcode.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/mem_alloc.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.h +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.h +stdio.h +- +stdlib.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +valgrind/memcheck.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_thread.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_memory.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_assert.h +ems_gc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +valgrind/memcheck.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.h +config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/config.h +ems/ems_gc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +tlsf/tlsf.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/tlsf/tlsf.h +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/config.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_definition.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +bh_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.h +stdarg.h +- +stdio.h +- +stdlib.h +- +setjmp.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c +bh_definition.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +stdlib.h +- +string.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_config.h +bh_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_types.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_memory.h +inttypes.h +- +stdbool.h +- +assert.h +- +time.h +- +string.h +- +stdio.h +- +assert.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +sys/socket.h +- +netinet/in.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +stdio.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.h +bh_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_log.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_memory.h +stdio.h +- +stdlib.h +- +sys/time.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c +bh_time.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.h +unistd.h +- +stdio.h +- +sys/timeb.h +- +time.h +- + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/DependInfo.cmake b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/DependInfo.cmake new file mode 100644 index 000000000..201f83499 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/DependInfo.cmake @@ -0,0 +1,95 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "ASM" + "C" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_ASM + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + ) +set(CMAKE_ASM_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_ASM + "NVALGRIND" + "_POSIX_C_SOURCE=199309L" + "_XOPEN_SOURCE=600" + "__POSIX__" + ) + +# The include file search paths: +set(CMAKE_ASM_TARGET_INCLUDE_PATH + "../." + "../../../runtime/include" + "../../../runtime/platform/include" + "../../../../shared-lib/include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc" + ) +set(CMAKE_DEPENDS_CHECK_C + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + ) +set(CMAKE_C_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_C + "NVALGRIND" + "_POSIX_C_SOURCE=199309L" + "_XOPEN_SOURCE=600" + "__POSIX__" + ) + +# The include file search paths: +set(CMAKE_C_TARGET_INCLUDE_PATH + "../." + "../../../runtime/include" + "../../../runtime/platform/include" + "../../../../shared-lib/include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/build.make b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/build.make new file mode 100644 index 000000000..0e0505cad --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/build.make @@ -0,0 +1,726 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +# Include any dependencies generated for this target. +include CMakeFiles/libiwasm.dir/depend.make + +# Include the progress variables for this target. +include CMakeFiles/libiwasm.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/libiwasm.dir/flags.make + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building ASM object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + /usr/bin/cc $(ASM_DEFINES) $(ASM_INCLUDES) $(ASM_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_17) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_18) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_19) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_21) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_22) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_23) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: CMakeFiles/libiwasm.dir/flags.make +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_24) "Building C object CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c > CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c -o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires: + +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides.build +.PHONY : CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides.build: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + + +# Object files for target libiwasm +libiwasm_OBJECTS = \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" \ +"CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + +# External object files for target libiwasm +libiwasm_EXTERNAL_OBJECTS = + +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o +libiwasm.so: CMakeFiles/libiwasm.dir/build.make +libiwasm.so: CMakeFiles/libiwasm.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_25) "Linking C shared library libiwasm.so" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/libiwasm.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/libiwasm.dir/build: libiwasm.so + +.PHONY : CMakeFiles/libiwasm.dir/build + +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires +CMakeFiles/libiwasm.dir/requires: CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + +.PHONY : CMakeFiles/libiwasm.dir/requires + +CMakeFiles/libiwasm.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/libiwasm.dir/cmake_clean.cmake +.PHONY : CMakeFiles/libiwasm.dir/clean + +CMakeFiles/libiwasm.dir/depend: + cd /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/libiwasm.dir/depend + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/cmake_clean.cmake b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/cmake_clean.cmake new file mode 100644 index 000000000..5a402fcda --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/cmake_clean.cmake @@ -0,0 +1,33 @@ +file(REMOVE_RECURSE + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + "CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + "libiwasm.pdb" + "libiwasm.so" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ASM C) + include(CMakeFiles/libiwasm.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.internal b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.internal new file mode 100644 index 000000000..df5647107 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.internal @@ -0,0 +1,293 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + ../../../runtime/include/lib-export.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm-export.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + ../../../../shared-lib/include/config.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/include/wasm_vector.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/mem_alloc.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/mem_alloc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/mem_alloc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + ../../../../shared-lib/include/bh_log.h + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/korp_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.make b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.make new file mode 100644 index 000000000..f504ff52f --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/depend.make @@ -0,0 +1,293 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: ../../../runtime/include/lib-export.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm-export.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/include/wasm_vector.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/bh_log.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/korp_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/flags.make b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/flags.make new file mode 100644 index 000000000..0dda062e9 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/flags.make @@ -0,0 +1,17 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# compile ASM with /usr/bin/cc +# compile C with /usr/bin/cc +ASM_FLAGS = -fPIC -m32 + +ASM_DEFINES = -DNVALGRIND -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600 -D__POSIX__ -Dlibiwasm_EXPORTS + +ASM_INCLUDES = -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/. -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/platform/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../../shared-lib/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc + +C_FLAGS = -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic -fPIC -m32 + +C_DEFINES = -DNVALGRIND -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600 -D__POSIX__ -Dlibiwasm_EXPORTS + +C_INCLUDES = -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/. -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/platform/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../../shared-lib/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc + diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o new file mode 100644 index 000000000..f7f7f7242 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o new file mode 100644 index 000000000..d82d2be49 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o new file mode 100644 index 000000000..539de4434 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o new file mode 100644 index 000000000..af42b2a2a Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o new file mode 100644 index 000000000..a8474f2af Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o new file mode 100644 index 000000000..22623c602 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o new file mode 100644 index 000000000..811f8cfb8 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o new file mode 100644 index 000000000..9e26435e3 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o new file mode 100644 index 000000000..fccbfed3b Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o new file mode 100644 index 000000000..20829f635 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o new file mode 100644 index 000000000..499ac7d7c Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o new file mode 100644 index 000000000..9e7252b73 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o new file mode 100644 index 000000000..bdd2a3317 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o new file mode 100644 index 000000000..002edf304 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o new file mode 100644 index 000000000..d190f29bd Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o new file mode 100644 index 000000000..677489e87 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o new file mode 100644 index 000000000..818f1dfb1 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o new file mode 100644 index 000000000..188dba480 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o new file mode 100644 index 000000000..8ce28d560 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o new file mode 100644 index 000000000..4589d8879 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o new file mode 100644 index 000000000..506f5f770 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o new file mode 100644 index 000000000..6e11243b4 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o new file mode 100644 index 000000000..c8f93993c Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o new file mode 100644 index 000000000..6319327f7 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/link.txt b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/link.txt new file mode 100644 index 000000000..f134ba8ed --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/cc -fPIC -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic -m32 -shared -Wl,-soname,libiwasm.so -o libiwasm.so CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o -lm -ldl -lpthread diff --git a/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/progress.make b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/progress.make new file mode 100644 index 000000000..5baa4b4fe --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/libiwasm.dir/progress.make @@ -0,0 +1,26 @@ +CMAKE_PROGRESS_1 = 4 +CMAKE_PROGRESS_2 = 5 +CMAKE_PROGRESS_3 = 6 +CMAKE_PROGRESS_4 = 7 +CMAKE_PROGRESS_5 = 8 +CMAKE_PROGRESS_6 = 9 +CMAKE_PROGRESS_7 = 10 +CMAKE_PROGRESS_8 = 11 +CMAKE_PROGRESS_9 = 12 +CMAKE_PROGRESS_10 = 13 +CMAKE_PROGRESS_11 = 14 +CMAKE_PROGRESS_12 = 15 +CMAKE_PROGRESS_13 = 16 +CMAKE_PROGRESS_14 = 17 +CMAKE_PROGRESS_15 = 18 +CMAKE_PROGRESS_16 = 19 +CMAKE_PROGRESS_17 = 20 +CMAKE_PROGRESS_18 = 21 +CMAKE_PROGRESS_19 = 22 +CMAKE_PROGRESS_20 = 23 +CMAKE_PROGRESS_21 = 24 +CMAKE_PROGRESS_22 = 25 +CMAKE_PROGRESS_23 = 26 +CMAKE_PROGRESS_24 = 27 +CMAKE_PROGRESS_25 = 28 + diff --git a/core/iwasm/products/linux/b/CMakeFiles/progress.marks b/core/iwasm/products/linux/b/CMakeFiles/progress.marks new file mode 100644 index 000000000..59343b09e --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/progress.marks @@ -0,0 +1 @@ +53 diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/ASM.includecache b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/ASM.includecache new file mode 100644 index 000000000..c28ead375 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/ASM.includecache @@ -0,0 +1,10 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/C.includecache b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/C.includecache new file mode 100644 index 000000000..a54d4cac6 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/C.includecache @@ -0,0 +1,512 @@ +#IncludeRegexLine: ^[ ]*#[ ]*(include|import)[ ]*[<"]([^">]+)([">]) + +#IncludeRegexScan: ^.*$ + +#IncludeRegexComplain: ^$ + +#IncludeRegexTransform: + +../../../../shared-lib/include/bh_log.h +stdarg.h +- +korp_types.h +../../../../shared-lib/include/korp_types.h + +../../../../shared-lib/include/bh_memory.h + +../../../../shared-lib/include/config.h + +../../../../shared-lib/include/korp_types.h +bh_platform.h +../../../../shared-lib/include/bh_platform.h + +../../../../shared-lib/include/mem_alloc.h +inttypes.h +- + +../../../runtime/include/lib-export.h + +../../../runtime/include/wasm-export.h +inttypes.h +- +stdbool.h +- + +../../../runtime/include/wasm_hashmap.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/include/wasm_log.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/include/wasm_vector.h +wasm_platform.h +../../../runtime/include/wasm_platform.h + +../../../runtime/platform/include/wasm_assert.h +bh_assert.h +../../../runtime/platform/include/bh_assert.h + +../../../runtime/platform/include/wasm_config.h +config.h +../../../runtime/platform/include/config.h + +../../../runtime/platform/include/wasm_memory.h +bh_memory.h +../../../runtime/platform/include/bh_memory.h + +../../../runtime/platform/include/wasm_platform_log.h + +../../../runtime/platform/include/wasm_thread.h +bh_thread.h +../../../runtime/platform/include/bh_thread.h + +../../../runtime/platform/include/wasm_types.h +wasm_config.h +../../../runtime/platform/include/wasm_config.h +wasm_platform.h +../../../runtime/platform/include/wasm_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c +stdio.h +- +stdlib.h +- +string.h +- +lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/lib-export.h +base-lib-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h +attr-container.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/attr-container.h +native_interface.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/native_interface.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm-native.h +wasm-export.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm-export.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/wasm_platform_log.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-runtime.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_memory.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform_log.h +sys/ioctl.h +- +sys/uio.h +- +sys/syscall.h +- +sys/types.h +- +sys/stat.h +- +unistd.h +- +pwd.h +- +fcntl.h +- +errno.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_log.h +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_memory.h +sys/types.h +- +sys/stat.h +- +fcntl.h +- +unistd.h +- +dlfcn.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +wasm_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_config.h +wasm_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_types.h +inttypes.h +- +stdbool.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +stdlib.h +- +stdio.h +- +math.h +- +string.h +- +stdio.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_thread.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_platform_log.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.h +wasm_vector.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c +errno.h +- +stdlib.h +- +string.h +- +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform_log.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm-opcode.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm-opcode.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c +wasm-runtime.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm-loader.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +wasm-native.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +wasm-interp.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +wasm_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_log.h +wasm_platform_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform_log.h +wasm_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_memory.h +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/mem_alloc.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +wasm.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm-thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h +wasm_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +wasm_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_platform.h +wasm_hashmap.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_hashmap.h +wasm_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm_assert.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.h +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.h +stdio.h +- +stdlib.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +valgrind/memcheck.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_thread.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_memory.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/bh_assert.h +ems_gc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c +ems_gc_internal.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +valgrind/memcheck.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c +mem_alloc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.h +config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/config.h +ems/ems_gc.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +tlsf/tlsf.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/tlsf/tlsf.h +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_thread.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/config.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_definition.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +bh_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.h +stdarg.h +- +stdio.h +- +stdlib.h +- +setjmp.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c +bh_definition.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.h +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +stdlib.h +- +string.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +bh_config.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_config.h +bh_types.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_types.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_memory.h +inttypes.h +- +stdbool.h +- +assert.h +- +time.h +- +string.h +- +stdio.h +- +assert.h +- +stdarg.h +- +ctype.h +- +pthread.h +- +limits.h +- +semaphore.h +- +errno.h +- +sys/socket.h +- +netinet/in.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c +bh_platform.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +stdio.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c +bh_thread.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.h +bh_assert.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.h +bh_log.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_log.h +bh_memory.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_memory.h +stdio.h +- +stdlib.h +- +sys/time.h +- + +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c +bh_time.h +/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.h +unistd.h +- +stdio.h +- +sys/timeb.h +- +time.h +- + diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/DependInfo.cmake b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/DependInfo.cmake new file mode 100644 index 000000000..21b8a3c38 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/DependInfo.cmake @@ -0,0 +1,95 @@ +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + "ASM" + "C" + ) +# The set of files for implicit dependencies of each language: +set(CMAKE_DEPENDS_CHECK_ASM + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + ) +set(CMAKE_ASM_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_ASM + "NVALGRIND" + "_POSIX_C_SOURCE=199309L" + "_XOPEN_SOURCE=600" + "__POSIX__" + ) + +# The include file search paths: +set(CMAKE_ASM_TARGET_INCLUDE_PATH + "../." + "../../../runtime/include" + "../../../runtime/platform/include" + "../../../../shared-lib/include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc" + ) +set(CMAKE_DEPENDS_CHECK_C + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c" "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + ) +set(CMAKE_C_COMPILER_ID "GNU") + +# Preprocessor definitions for this target. +set(CMAKE_TARGET_DEFINITIONS_C + "NVALGRIND" + "_POSIX_C_SOURCE=199309L" + "_XOPEN_SOURCE=600" + "__POSIX__" + ) + +# The include file search paths: +set(CMAKE_C_TARGET_INCLUDE_PATH + "../." + "../../../runtime/include" + "../../../runtime/platform/include" + "../../../../shared-lib/include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include" + "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/build.make b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/build.make new file mode 100644 index 000000000..51da8dca6 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/build.make @@ -0,0 +1,727 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +# Include any dependencies generated for this target. +include CMakeFiles/vmlib.dir/depend.make + +# Include the progress variables for this target. +include CMakeFiles/vmlib.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/vmlib.dir/flags.make + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_6) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_7) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_8) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_9) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_10) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_11) "Building ASM object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + /usr/bin/cc $(ASM_DEFINES) $(ASM_INCLUDES) $(ASM_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_12) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_13) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_14) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_15) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_16) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_17) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_18) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_19) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_20) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_21) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_22) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_23) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: CMakeFiles/vmlib.dir/flags.make +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_24) "Building C object CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o -c /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c > CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s" + /usr/bin/cc $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c -o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires: + +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides.build +.PHONY : CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.provides.build: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + + +# Object files for target vmlib +vmlib_OBJECTS = \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" \ +"CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + +# External object files for target vmlib +vmlib_EXTERNAL_OBJECTS = + +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o +libvmlib.a: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o +libvmlib.a: CMakeFiles/vmlib.dir/build.make +libvmlib.a: CMakeFiles/vmlib.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles --progress-num=$(CMAKE_PROGRESS_25) "Linking C static library libvmlib.a" + $(CMAKE_COMMAND) -P CMakeFiles/vmlib.dir/cmake_clean_target.cmake + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/vmlib.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/vmlib.dir/build: libvmlib.a + +.PHONY : CMakeFiles/vmlib.dir/build + +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o.requires +CMakeFiles/vmlib.dir/requires: CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o.requires + +.PHONY : CMakeFiles/vmlib.dir/requires + +CMakeFiles/vmlib.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/vmlib.dir/cmake_clean.cmake +.PHONY : CMakeFiles/vmlib.dir/clean + +CMakeFiles/vmlib.dir/depend: + cd /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/vmlib.dir/depend + diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean.cmake b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean.cmake new file mode 100644 index 000000000..d01663de8 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean.cmake @@ -0,0 +1,33 @@ +file(REMOVE_RECURSE + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o" + "CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o" + "libvmlib.pdb" + "libvmlib.a" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ASM C) + include(CMakeFiles/vmlib.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean_target.cmake b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean_target.cmake new file mode 100644 index 000000000..c810433eb --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/cmake_clean_target.cmake @@ -0,0 +1,3 @@ +file(REMOVE_RECURSE + "libvmlib.a" +) diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.internal b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.internal new file mode 100644 index 000000000..c87d7dc19 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.internal @@ -0,0 +1,293 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + ../../../runtime/include/lib-export.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm-export.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + ../../../../shared-lib/include/config.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_log.h + ../../../runtime/include/wasm_vector.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/mem_alloc.h + ../../../runtime/include/wasm_hashmap.h + ../../../runtime/include/wasm_log.h + ../../../runtime/platform/include/wasm_assert.h + ../../../runtime/platform/include/wasm_config.h + ../../../runtime/platform/include/wasm_memory.h + ../../../runtime/platform/include/wasm_platform_log.h + ../../../runtime/platform/include/wasm_thread.h + ../../../runtime/platform/include/wasm_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/mem_alloc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/mem_alloc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + ../../../../shared-lib/include/bh_log.h + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + ../../../../shared-lib/include/korp_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + ../../../../shared-lib/include/bh_memory.h + ../../../../shared-lib/include/config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.make b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.make new file mode 100644 index 000000000..c0a218be0 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/depend.make @@ -0,0 +1,293 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: ../../../runtime/include/lib-export.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm-export.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/include/wasm_vector.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/include/wasm_hashmap.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/include/wasm_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_platform_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: ../../../runtime/platform/include/wasm_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-native.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc_internal.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: ../../../../shared-lib/include/mem_alloc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_gc.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/bh_log.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: ../../../../shared-lib/include/korp_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_assert.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_thread.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c + +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: ../../../../shared-lib/include/bh_memory.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: ../../../../shared-lib/include/config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_config.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_definition.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_time.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include/bh_types.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.h +CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c + diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/flags.make b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/flags.make new file mode 100644 index 000000000..adc53bc5a --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/flags.make @@ -0,0 +1,17 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# compile ASM with /usr/bin/cc +# compile C with /usr/bin/cc +ASM_FLAGS = -m32 + +ASM_DEFINES = -DNVALGRIND -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600 -D__POSIX__ + +ASM_INCLUDES = -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/. -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/platform/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../../shared-lib/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc + +C_FLAGS = -ffunction-sections -fdata-sections -Wall -Wno-unused-parameter -Wno-pedantic -m32 + +C_DEFINES = -DNVALGRIND -D_POSIX_C_SOURCE=199309L -D_XOPEN_SOURCE=600 -D__POSIX__ + +C_INCLUDES = -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/. -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../runtime/platform/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/../../../shared-lib/include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/../include -I/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc + diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o new file mode 100644 index 000000000..0c7c35870 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o new file mode 100644 index 000000000..1ba7383a9 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o new file mode 100644 index 000000000..1c188d661 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o new file mode 100644 index 000000000..112c282f1 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o new file mode 100644 index 000000000..3872e5822 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o new file mode 100644 index 000000000..c4b13bca0 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o new file mode 100644 index 000000000..8b487ad7d Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o new file mode 100644 index 000000000..6cd50a37b Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o new file mode 100644 index 000000000..fccbfed3b Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o new file mode 100644 index 000000000..886f347e7 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o new file mode 100644 index 000000000..58886c567 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o new file mode 100644 index 000000000..0b0389d63 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o new file mode 100644 index 000000000..519f319e2 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o new file mode 100644 index 000000000..dd24a4962 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o new file mode 100644 index 000000000..8a57f8357 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o new file mode 100644 index 000000000..677489e87 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o new file mode 100644 index 000000000..f549f0e81 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o new file mode 100644 index 000000000..4b5117b52 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o new file mode 100644 index 000000000..db64e2a30 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o new file mode 100644 index 000000000..9cf7f71a1 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o new file mode 100644 index 000000000..9517ad567 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o new file mode 100644 index 000000000..aca552319 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o new file mode 100644 index 000000000..b47494b13 Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o new file mode 100644 index 000000000..8d6b9947b Binary files /dev/null and b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o differ diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/link.txt b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/link.txt new file mode 100644 index 000000000..7a9e27cf8 --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/link.txt @@ -0,0 +1,2 @@ +/usr/bin/ar qc libvmlib.a CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o +/usr/bin/ranlib libvmlib.a diff --git a/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/progress.make b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/progress.make new file mode 100644 index 000000000..ee2a7095f --- /dev/null +++ b/core/iwasm/products/linux/b/CMakeFiles/vmlib.dir/progress.make @@ -0,0 +1,26 @@ +CMAKE_PROGRESS_1 = 29 +CMAKE_PROGRESS_2 = 30 +CMAKE_PROGRESS_3 = 31 +CMAKE_PROGRESS_4 = 32 +CMAKE_PROGRESS_5 = 33 +CMAKE_PROGRESS_6 = 34 +CMAKE_PROGRESS_7 = 35 +CMAKE_PROGRESS_8 = 36 +CMAKE_PROGRESS_9 = 37 +CMAKE_PROGRESS_10 = 38 +CMAKE_PROGRESS_11 = 39 +CMAKE_PROGRESS_12 = 40 +CMAKE_PROGRESS_13 = 41 +CMAKE_PROGRESS_14 = 42 +CMAKE_PROGRESS_15 = 43 +CMAKE_PROGRESS_16 = 44 +CMAKE_PROGRESS_17 = 45 +CMAKE_PROGRESS_18 = 46 +CMAKE_PROGRESS_19 = 47 +CMAKE_PROGRESS_20 = 48 +CMAKE_PROGRESS_21 = 49 +CMAKE_PROGRESS_22 = 50 +CMAKE_PROGRESS_23 = 51 +CMAKE_PROGRESS_24 = 52 +CMAKE_PROGRESS_25 = 53 + diff --git a/core/iwasm/products/linux/b/Makefile b/core/iwasm/products/linux/b/Makefile new file mode 100644 index 000000000..492dd803a --- /dev/null +++ b/core/iwasm/products/linux/b/Makefile @@ -0,0 +1,1006 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.5 + +# Default target executed when no arguments are given to make. +default_target: all + +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + + +# Remove some rules from gmake that .SUFFIXES does not remove. +SUFFIXES = + +.SUFFIXES: .hpux_make_needs_suffix_list + + +# Suppress display of executed commands. +$(VERBOSE).SILENT: + + +# A target that is always out of date. +cmake_force: + +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E remove -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache + +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache + +.PHONY : rebuild_cache/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles/progress.marks + $(MAKE) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean + +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named vmlib + +# Build rule for target. +vmlib: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 vmlib +.PHONY : vmlib + +# fast build rule for target. +vmlib/fast: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/build +.PHONY : vmlib/fast + +#============================================================================= +# Target rules for targets named iwasm + +# Build rule for target. +iwasm: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 iwasm +.PHONY : iwasm + +# fast build rule for target. +iwasm/fast: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/build +.PHONY : iwasm/fast + +#============================================================================= +# Target rules for targets named libiwasm + +# Build rule for target. +libiwasm: cmake_check_build_system + $(MAKE) -f CMakeFiles/Makefile2 libiwasm +.PHONY : libiwasm + +# fast build rule for target. +libiwasm/fast: + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/build +.PHONY : libiwasm/fast + +ext-lib-export.o: ext-lib-export.c.o + +.PHONY : ext-lib-export.o + +# target to build an object file +ext-lib-export.c.o: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/ext-lib-export.c.o +.PHONY : ext-lib-export.c.o + +ext-lib-export.i: ext-lib-export.c.i + +.PHONY : ext-lib-export.i + +# target to preprocess a source file +ext-lib-export.c.i: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/ext-lib-export.c.i +.PHONY : ext-lib-export.c.i + +ext-lib-export.s: ext-lib-export.c.s + +.PHONY : ext-lib-export.s + +# target to generate assembly for a file +ext-lib-export.c.s: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/ext-lib-export.c.s +.PHONY : ext-lib-export.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.c.s + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.o: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.o + +# target to build an object file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.o + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.i: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.i + +# target to preprocess a source file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.i + +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.s: home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s + +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.s + +# target to generate assembly for a file +home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s: + $(MAKE) -f CMakeFiles/vmlib.dir/build.make CMakeFiles/vmlib.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s + $(MAKE) -f CMakeFiles/libiwasm.dir/build.make CMakeFiles/libiwasm.dir/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s +.PHONY : home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.c.s + +main.o: main.c.o + +.PHONY : main.o + +# target to build an object file +main.c.o: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/main.c.o +.PHONY : main.c.o + +main.i: main.c.i + +.PHONY : main.i + +# target to preprocess a source file +main.c.i: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/main.c.i +.PHONY : main.c.i + +main.s: main.c.s + +.PHONY : main.s + +# target to generate assembly for a file +main.c.s: + $(MAKE) -f CMakeFiles/iwasm.dir/build.make CMakeFiles/iwasm.dir/main.c.s +.PHONY : main.c.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... vmlib" + @echo "... iwasm" + @echo "... libiwasm" + @echo "... rebuild_cache" + @echo "... ext-lib-export.o" + @echo "... ext-lib-export.i" + @echo "... ext-lib-export.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/base/base-lib-export.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/lib/native/libc/libc_wrapper.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm-native.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/platform/linux/wasm_platform.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_dlfcn.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_hashmap.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_log.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/utils/wasm_vector.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-application.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-interp.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-loader.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/runtime/vmcore_wasm/wasm-runtime.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/bh_memory.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_alloc.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_hmu.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/ems/ems_kfc.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/mem-alloc/mem_alloc.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_assert.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_definition.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_platform_log.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_thread.s" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.o" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.i" + @echo "... home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/shared-lib/platform/linux/bh_time.s" + @echo "... main.o" + @echo "... main.i" + @echo "... main.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/core/iwasm/products/linux/b/cmake_install.cmake b/core/iwasm/products/linux/b/cmake_install.cmake new file mode 100644 index 000000000..7af00e415 --- /dev/null +++ b/core/iwasm/products/linux/b/cmake_install.cmake @@ -0,0 +1,44 @@ +# Install script for directory: /home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/usr/local") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/xin/wasm/ssg_micro_runtime-dynamic-apps-projects/core/iwasm/products/linux/b/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/core/iwasm/products/linux/b/iwasm b/core/iwasm/products/linux/b/iwasm new file mode 100755 index 000000000..d3a205d68 Binary files /dev/null and b/core/iwasm/products/linux/b/iwasm differ diff --git a/core/iwasm/products/linux/b/libiwasm.so b/core/iwasm/products/linux/b/libiwasm.so new file mode 100755 index 000000000..bcc78ac33 Binary files /dev/null and b/core/iwasm/products/linux/b/libiwasm.so differ diff --git a/core/iwasm/products/linux/ext-lib-export.c b/core/iwasm/products/linux/ext-lib-export.c new file mode 100644 index 000000000..f5e9c34c6 --- /dev/null +++ b/core/iwasm/products/linux/ext-lib-export.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "lib-export.h" + +static NativeSymbol extended_native_symbol_defs[] = { }; + +#include "ext-lib-export.h" diff --git a/core/iwasm/products/linux/main.c b/core/iwasm/products/linux/main.c new file mode 100644 index 000000000..039b0ad7c --- /dev/null +++ b/core/iwasm/products/linux/main.c @@ -0,0 +1,237 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#include +#include +#include "wasm_assert.h" +#include "wasm_log.h" +#include "wasm_platform.h" +#include "wasm_platform_log.h" +#include "wasm_thread.h" +#include "wasm-export.h" +#include "wasm_memory.h" +#include "bh_memory.h" + +static int app_argc; +static char **app_argv; + +static int print_help() +{ + wasm_printf("Usage: iwasm [-options] wasm_file [args...]\n"); + wasm_printf("options:\n"); + wasm_printf(" -f|--function name Specify function name to run " + "in module rather than main\n"); +#if WASM_ENABLE_LOG != 0 + wasm_printf( + " -v=X Set log verbose level (0 to 2, default is 1), larger level with more log\n"); +#endif + wasm_printf( + " --repl Start a very simple REPL (read-eval-print-loop) mode \n" + " that runs commands in the form of `FUNC ARG...`\n"); + return 1; +} + +static void* +app_instance_main(wasm_module_inst_t module_inst) +{ + const char *exception; + + wasm_application_execute_main(module_inst, app_argc, app_argv); + if ((exception = wasm_runtime_get_exception(module_inst))) + wasm_printf("%s\n", exception); + return NULL; +} + +static void* +app_instance_func(wasm_module_inst_t module_inst, const char *func_name) +{ + const char *exception; + + wasm_application_execute_func(module_inst, func_name, app_argc - 1, + app_argv + 1); + if ((exception = wasm_runtime_get_exception(module_inst))) + wasm_printf("%s\n", exception); + return NULL; +} + +/** + * Split a space separated strings into an array of strings + * Returns NULL on failure + * Memory must be freed by caller + * Based on: http://stackoverflow.com/a/11198630/471795 + */ +static char ** +split_string(char *str, int *count) +{ + char **res = NULL; + char *p; + int idx = 0; + + /* split string and append tokens to 'res' */ + do { + p = strtok(str, " "); + str = NULL; + res = (char**) realloc(res, sizeof(char*) * (idx + 1)); + if (res == NULL) { + return NULL; + } + res[idx++] = p; + } while (p); + + if (count) { + *count = idx - 1; + } + return res; +} + +static void* +app_instance_repl(wasm_module_inst_t module_inst) +{ + char *cmd = NULL; + size_t len = 0; + ssize_t n; + + while ((wasm_printf("webassembly> "), n = getline(&cmd, &len, stdin)) != -1) { + wasm_assert(n > 0); + if (cmd[n - 1] == '\n') { + if (n == 1) + continue; + else + cmd[n - 1] = '\0'; + } + app_argv = split_string(cmd, &app_argc); + if (app_argv == NULL) { + LOG_ERROR("Wasm prepare param failed: split string failed.\n"); + break; + } + if (app_argc != 0) { + wasm_application_execute_func(module_inst, app_argv[0], + app_argc - 1, app_argv + 1); + } + free(app_argv); + } + free(cmd); + return NULL; +} + +static char global_heap_buf[512 * 1024] = { 0 }; + +int main(int argc, char *argv[]) +{ + char *wasm_file = NULL; + const char *func_name = NULL; + uint8 *wasm_file_buf = NULL; + int wasm_file_size; + wasm_module_t wasm_module = NULL; + wasm_module_inst_t wasm_module_inst = NULL; + char error_buf[128]; +#if WASM_ENABLE_LOG != 0 + int log_verbose_level = 1; +#endif + bool is_repl_mode = false; + + /* Process options. */ + for (argc--, argv++; argc > 0 && argv[0][0] == '-'; argc--, argv++) { + if (!strcmp(argv[0], "-f") || !strcmp(argv[0], "--function")) { + argc--, argv++; + if (argc < 2) { + print_help(); + return 0; + } + func_name = argv[0]; + } +#if WASM_ENABLE_LOG != 0 + else if (!strncmp(argv[0], "-v=", 3)) { + log_verbose_level = atoi(argv[0] + 3); + if (log_verbose_level < 0 || log_verbose_level > 2) + return print_help(); + } +#endif + else if (!strcmp(argv[0], "--repl")) + is_repl_mode = true; + else + return print_help(); + } + + if (argc == 0) + return print_help(); + + wasm_file = argv[0]; + app_argc = argc; + app_argv = argv; + + if (bh_memory_init_with_pool(global_heap_buf, sizeof(global_heap_buf)) + != 0) { + wasm_printf("Init global heap failed.\n"); + return -1; + } + + /* initialize runtime environment */ + if (!wasm_runtime_init()) + goto fail1; + + wasm_log_set_verbose_level(log_verbose_level); + + /* load WASM byte buffer from WASM bin file */ + if (!(wasm_file_buf = (uint8*) wasm_read_file_to_buffer(wasm_file, + &wasm_file_size))) + goto fail2; + + /* load WASM module */ + if (!(wasm_module = wasm_runtime_load(wasm_file_buf, wasm_file_size, + error_buf, sizeof(error_buf)))) { + wasm_printf("%s\n", error_buf); + goto fail3; + } + + /* instantiate the module */ + if (!(wasm_module_inst = wasm_runtime_instantiate(wasm_module, 8 * 1024, + 8 * 1024, error_buf, sizeof(error_buf)))) { + wasm_printf("%s\n", error_buf); + goto fail4; + } + + if (is_repl_mode) + app_instance_repl(wasm_module_inst); + else if (func_name) + app_instance_func(wasm_module_inst, func_name); + else + app_instance_main(wasm_module_inst); + + /* destroy the module instance */ + wasm_runtime_deinstantiate(wasm_module_inst); + + fail4: + /* unload the module */ + wasm_runtime_unload(wasm_module); + + fail3: + /* free the file buffer */ + wasm_free(wasm_file_buf); + + fail2: + /* destroy runtime environment */ + wasm_runtime_destroy(); + + fail1: bh_memory_destroy(); + + (void) func_name; + return 0; +} + diff --git a/core/iwasm/products/zephyr/simple/CMakeLists.txt b/core/iwasm/products/zephyr/simple/CMakeLists.txt new file mode 100644 index 000000000..2968d45d2 --- /dev/null +++ b/core/iwasm/products/zephyr/simple/CMakeLists.txt @@ -0,0 +1,57 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +cmake_minimum_required(VERSION 3.8.2) + +include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) +project(NONE) + +enable_language (ASM) + +add_definitions (-DNVALGRIND) + +set (IWASM_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/iwasm) +set (SHARED_LIB_ROOT ${IWASM_ROOT}/../shared-lib) + +include_directories (${IWASM_ROOT}/runtime/include + ${IWASM_ROOT}/runtime/platform/include + ${IWASM_ROOT}/runtime/platform/zephyr + ${IWASM_ROOT}/runtime/vmcore_wasm + ${SHARED_LIB_ROOT}/include + ${SHARED_LIB_ROOT}/platform/include + ${SHARED_LIB_ROOT}/platform/zephyr) + +set (IWASM_SRCS ${IWASM_ROOT}/runtime/utils/wasm_hashmap.c + ${IWASM_ROOT}/runtime/utils/wasm_log.c + ${IWASM_ROOT}/runtime/utils/wasm_dlfcn.c + ${IWASM_ROOT}/runtime/platform/zephyr/wasm_math.c + ${IWASM_ROOT}/runtime/platform/zephyr/wasm_platform.c + ${IWASM_ROOT}/runtime/platform/zephyr/wasm-native.c + ${IWASM_ROOT}/runtime/vmcore_wasm/wasm-application.c + ${IWASM_ROOT}/runtime/vmcore_wasm/wasm-interp.c + ${IWASM_ROOT}/runtime/vmcore_wasm/wasm-loader.c + ${IWASM_ROOT}/runtime/vmcore_wasm/wasm-runtime.c + ${IWASM_ROOT}/runtime/vmcore_wasm/invokeNative_general.c + ${IWASM_ROOT}/lib/native/libc/libc_wrapper.c + ${IWASM_ROOT}/lib/native/base/base-lib-export.c + ${SHARED_LIB_ROOT}/platform/zephyr/bh_platform.c + ${SHARED_LIB_ROOT}/platform/zephyr/bh_assert.c + ${SHARED_LIB_ROOT}/platform/zephyr/bh_thread.c + ${SHARED_LIB_ROOT}/mem-alloc/bh_memory.c + ${SHARED_LIB_ROOT}/mem-alloc/mem_alloc.c + ${SHARED_LIB_ROOT}/mem-alloc/ems/ems_kfc.c + ${SHARED_LIB_ROOT}/mem-alloc/ems/ems_alloc.c + ${SHARED_LIB_ROOT}/mem-alloc/ems/ems_hmu.c) + +target_sources(app PRIVATE ${IWASM_SRCS} src/main.c src/ext-lib-export.c) diff --git a/core/iwasm/products/zephyr/simple/prj.conf b/core/iwasm/products/zephyr/simple/prj.conf new file mode 100644 index 000000000..e69de29bb diff --git a/core/iwasm/products/zephyr/simple/src/ext-lib-export.c b/core/iwasm/products/zephyr/simple/src/ext-lib-export.c new file mode 100644 index 000000000..f5e9c34c6 --- /dev/null +++ b/core/iwasm/products/zephyr/simple/src/ext-lib-export.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "lib-export.h" + +static NativeSymbol extended_native_symbol_defs[] = { }; + +#include "ext-lib-export.h" diff --git a/core/iwasm/products/zephyr/simple/src/main.c b/core/iwasm/products/zephyr/simple/src/main.c new file mode 100644 index 000000000..7dc8c7ba8 --- /dev/null +++ b/core/iwasm/products/zephyr/simple/src/main.c @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include "wasm_assert.h" +#include "wasm_log.h" +#include "wasm_platform.h" +#include "wasm_platform_log.h" +#include "wasm_thread.h" +#include "wasm-export.h" +#include "wasm_memory.h" +#include "bh_memory.h" +#include "test_wasm.h" + +static int app_argc; +static char **app_argv; + +static void* +app_instance_main(wasm_module_inst_t module_inst) +{ + const char *exception; + + wasm_application_execute_main(module_inst, app_argc, app_argv); + if ((exception = wasm_runtime_get_exception(module_inst))) + wasm_printf("%s\n", exception); + return NULL; +} + +static char global_heap_buf[512 * 1024] = { 0 }; + +void iwasm_main(void *arg1, void *arg2, void *arg3) +{ + uint8 *wasm_file_buf = NULL; + int wasm_file_size; + wasm_module_t wasm_module = NULL; + wasm_module_inst_t wasm_module_inst = NULL; + char error_buf[128]; +#if WASM_ENABLE_LOG != 0 + int log_verbose_level = 1; +#endif + + (void) arg1; + (void) arg2; + (void) arg3; + + if (bh_memory_init_with_pool(global_heap_buf, sizeof(global_heap_buf)) + != 0) { + wasm_printf("Init global heap failed.\n"); + return; + } + + /* initialize runtime environment */ + if (!wasm_runtime_init()) + goto fail1; + +#if WASM_ENABLE_LOG != 0 + wasm_log_set_verbose_level(log_verbose_level); +#endif + + /* load WASM byte buffer from byte buffer of include file */ + wasm_file_buf = (uint8*) wasm_test_file; + wasm_file_size = sizeof(wasm_test_file); + + /* load WASM module */ + if (!(wasm_module = wasm_runtime_load(wasm_file_buf, wasm_file_size, + error_buf, sizeof(error_buf)))) { + wasm_printf("%s\n", error_buf); + goto fail2; + } + + /* instantiate the module */ + if (!(wasm_module_inst = wasm_runtime_instantiate(wasm_module, 8 * 1024, + 8 * 1024, error_buf, sizeof(error_buf)))) { + wasm_printf("%s\n", error_buf); + goto fail3; + } + + app_instance_main(wasm_module_inst); + + /* destroy the module instance */ + wasm_runtime_deinstantiate(wasm_module_inst); + + fail3: + /* unload the module */ + wasm_runtime_unload(wasm_module); + + fail2: + /* destroy runtime environment */ + wasm_runtime_destroy(); + + fail1: bh_memory_destroy(); +} + +#define DEFAULT_THREAD_STACKSIZE (6 * 1024) +#define DEFAULT_THREAD_PRIORITY 5 + +K_THREAD_STACK_DEFINE(iwasm_main_thread_stack, DEFAULT_THREAD_STACKSIZE); +static struct k_thread iwasm_main_thread; + +bool iwasm_init(void) +{ + k_tid_t tid = k_thread_create(&iwasm_main_thread, iwasm_main_thread_stack, + DEFAULT_THREAD_STACKSIZE, iwasm_main, NULL, NULL, NULL, + DEFAULT_THREAD_PRIORITY, 0, K_NO_WAIT); + return tid ? true : false; +} + +#ifndef CONFIG_AEE_ENABLE +void main(void) +{ + iwasm_init(); +} +#endif + diff --git a/core/iwasm/products/zephyr/simple/src/test_wasm.h b/core/iwasm/products/zephyr/simple/src/test_wasm.h new file mode 100644 index 000000000..aa9572b0c --- /dev/null +++ b/core/iwasm/products/zephyr/simple/src/test_wasm.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +unsigned char wasm_test_file[] = { 0x00, 0x61, 0x73, 0x6D, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x0D, 0x06, 0x64, 0x79, 0x6C, 0x69, 0x6E, 0x6B, 0xC0, 0x80, + 0x04, 0x04, 0x00, 0x00, 0x01, 0x13, 0x04, 0x60, 0x01, 0x7F, 0x00, 0x60, + 0x01, 0x7F, 0x01, 0x7F, 0x60, 0x02, 0x7F, 0x7F, 0x01, 0x7F, 0x60, 0x00, + 0x00, 0x02, 0x58, 0x06, 0x03, 0x65, 0x6E, 0x76, 0x05, 0x5F, 0x66, 0x72, + 0x65, 0x65, 0x00, 0x00, 0x03, 0x65, 0x6E, 0x76, 0x07, 0x5F, 0x6D, 0x61, + 0x6C, 0x6C, 0x6F, 0x63, 0x00, 0x01, 0x03, 0x65, 0x6E, 0x76, 0x07, 0x5F, + 0x70, 0x72, 0x69, 0x6E, 0x74, 0x66, 0x00, 0x02, 0x03, 0x65, 0x6E, 0x76, + 0x05, 0x5F, 0x70, 0x75, 0x74, 0x73, 0x00, 0x01, 0x03, 0x65, 0x6E, 0x76, + 0x0D, 0x5F, 0x5F, 0x6D, 0x65, 0x6D, 0x6F, 0x72, 0x79, 0x5F, 0x62, 0x61, + 0x73, 0x65, 0x03, 0x7F, 0x00, 0x03, 0x65, 0x6E, 0x76, 0x06, 0x6D, 0x65, + 0x6D, 0x6F, 0x72, 0x79, 0x02, 0x00, 0x01, 0x03, 0x04, 0x03, 0x02, 0x03, + 0x03, 0x06, 0x10, 0x03, 0x7F, 0x01, 0x41, 0x00, 0x0B, 0x7F, 0x01, 0x41, + 0x00, 0x0B, 0x7F, 0x00, 0x41, 0x1B, 0x0B, 0x07, 0x33, 0x04, 0x12, 0x5F, + 0x5F, 0x70, 0x6F, 0x73, 0x74, 0x5F, 0x69, 0x6E, 0x73, 0x74, 0x61, 0x6E, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x00, 0x06, 0x05, 0x5F, 0x6D, 0x61, 0x69, + 0x6E, 0x00, 0x04, 0x0B, 0x72, 0x75, 0x6E, 0x50, 0x6F, 0x73, 0x74, 0x53, + 0x65, 0x74, 0x73, 0x00, 0x05, 0x04, 0x5F, 0x73, 0x74, 0x72, 0x03, 0x03, + 0x0A, 0xBA, 0x01, 0x03, 0x9E, 0x01, 0x01, 0x01, 0x7F, 0x23, 0x01, 0x21, + 0x00, 0x23, 0x01, 0x41, 0x10, 0x6A, 0x24, 0x01, 0x20, 0x00, 0x41, 0x08, + 0x6A, 0x21, 0x02, 0x23, 0x00, 0x41, 0x1B, 0x6A, 0x10, 0x03, 0x1A, 0x41, + 0x80, 0x08, 0x10, 0x01, 0x21, 0x01, 0x20, 0x01, 0x04, 0x7F, 0x20, 0x00, + 0x20, 0x01, 0x36, 0x02, 0x00, 0x23, 0x00, 0x20, 0x00, 0x10, 0x02, 0x1A, + 0x20, 0x01, 0x23, 0x00, 0x2C, 0x00, 0x0D, 0x3A, 0x00, 0x00, 0x20, 0x01, + 0x23, 0x00, 0x2C, 0x00, 0x0E, 0x3A, 0x00, 0x01, 0x20, 0x01, 0x23, 0x00, + 0x2C, 0x00, 0x0F, 0x3A, 0x00, 0x02, 0x20, 0x01, 0x23, 0x00, 0x2C, 0x00, + 0x10, 0x3A, 0x00, 0x03, 0x20, 0x01, 0x23, 0x00, 0x2C, 0x00, 0x11, 0x3A, + 0x00, 0x04, 0x20, 0x01, 0x23, 0x00, 0x2C, 0x00, 0x12, 0x3A, 0x00, 0x05, + 0x20, 0x02, 0x20, 0x01, 0x36, 0x02, 0x00, 0x23, 0x00, 0x41, 0x13, 0x6A, + 0x20, 0x02, 0x10, 0x02, 0x1A, 0x20, 0x01, 0x10, 0x00, 0x20, 0x00, 0x24, + 0x01, 0x41, 0x00, 0x05, 0x23, 0x00, 0x41, 0x28, 0x6A, 0x10, 0x03, 0x1A, + 0x20, 0x00, 0x24, 0x01, 0x41, 0x7F, 0x0B, 0x0B, 0x03, 0x00, 0x01, 0x0B, + 0x14, 0x00, 0x23, 0x00, 0x41, 0x40, 0x6B, 0x24, 0x01, 0x23, 0x01, 0x41, + 0x80, 0x80, 0x04, 0x6A, 0x24, 0x02, 0x10, 0x05, 0x0B, 0x0B, 0x3F, 0x01, + 0x00, 0x23, 0x00, 0x0B, 0x39, 0x62, 0x75, 0x66, 0x20, 0x70, 0x74, 0x72, + 0x3A, 0x20, 0x25, 0x70, 0x0A, 0x00, 0x31, 0x32, 0x33, 0x34, 0x0A, 0x00, + 0x62, 0x75, 0x66, 0x3A, 0x20, 0x25, 0x73, 0x00, 0x48, 0x65, 0x6C, 0x6C, + 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x21, 0x00, 0x6D, 0x61, 0x6C, + 0x6C, 0x6F, 0x63, 0x20, 0x62, 0x75, 0x66, 0x20, 0x66, 0x61, 0x69, 0x6C, + 0x65, 0x64, 0x00, 0x50, 0x04, 0x6E, 0x61, 0x6D, 0x65, 0x01, 0x49, 0x07, + 0x00, 0x05, 0x5F, 0x66, 0x72, 0x65, 0x65, 0x01, 0x07, 0x5F, 0x6D, 0x61, + 0x6C, 0x6C, 0x6F, 0x63, 0x02, 0x07, 0x5F, 0x70, 0x72, 0x69, 0x6E, 0x74, + 0x66, 0x03, 0x05, 0x5F, 0x70, 0x75, 0x74, 0x73, 0x04, 0x05, 0x5F, 0x6D, + 0x61, 0x69, 0x6E, 0x05, 0x0B, 0x72, 0x75, 0x6E, 0x50, 0x6F, 0x73, 0x74, + 0x53, 0x65, 0x74, 0x73, 0x06, 0x12, 0x5F, 0x5F, 0x70, 0x6F, 0x73, 0x74, + 0x5F, 0x69, 0x6E, 0x73, 0x74, 0x61, 0x6E, 0x74, 0x69, 0x61, 0x74, 0x65, + 0x00, 0x20, 0x10, 0x73, 0x6F, 0x75, 0x72, 0x63, 0x65, 0x4D, 0x61, 0x70, + 0x70, 0x69, 0x6E, 0x67, 0x55, 0x52, 0x4C, 0x0E, 0x61, 0x2E, 0x6F, 0x75, + 0x74, 0x2E, 0x77, 0x61, 0x73, 0x6D, 0x2E, 0x6D, 0x61, 0x70 }; diff --git a/core/iwasm/runtime/include/ext-lib-export.h b/core/iwasm/runtime/include/ext-lib-export.h new file mode 100644 index 000000000..d2ae82fca --- /dev/null +++ b/core/iwasm/runtime/include/ext-lib-export.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _EXT_LIB_EXPORT_H_ +#define _EXT_LIB_EXPORT_H_ + +#include "lib-export.h" + +#ifdef __cplusplus +extern "C" { +#endif + +int +get_ext_lib_export_apis(NativeSymbol **p_ext_lib_apis) +{ + *p_ext_lib_apis = extended_native_symbol_defs; + return sizeof(extended_native_symbol_defs) / sizeof(NativeSymbol); +} + +#ifdef __cplusplus +} +#endif + +#endif /* end of _EXT_LIB_EXPORT_H_ */ + diff --git a/core/iwasm/runtime/include/lib-export.h b/core/iwasm/runtime/include/lib-export.h new file mode 100644 index 000000000..d6b335f2e --- /dev/null +++ b/core/iwasm/runtime/include/lib-export.h @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _LIB_EXPORT_H_ +#define _LIB_EXPORT_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct NativeSymbol { + const char *symbol; + void *func_ptr; +} NativeSymbol; + +#define EXPORT_WASM_API(symbol) {#symbol, symbol} +#define EXPORT_WASM_API2(symbol) {#symbol, symbol##_wrapper} + +/** + * Get the exported APIs of base lib + * + * @param p_base_lib_apis return the exported API array of base lib + * + * @return the number of the exported API + */ +int +get_base_lib_export_apis(NativeSymbol **p_base_lib_apis); + +/** + * Get the exported APIs of extend lib + * + * @param p_base_lib_apis return the exported API array of extend lib + * + * @return the number of the exported API + */ +int +get_extend_lib_export_apis(NativeSymbol **p_base_lib_apis); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/core/iwasm/runtime/include/wasm-export.h b/core/iwasm/runtime/include/wasm-export.h new file mode 100644 index 000000000..0492fcb44 --- /dev/null +++ b/core/iwasm/runtime/include/wasm-export.h @@ -0,0 +1,421 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_EXPORT_H +#define _WASM_EXPORT_H + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Uninstantiated WASM module loaded from WASM binary file */ +struct WASMModule; +typedef struct WASMModule *wasm_module_t; + +/* Instantiated WASM module */ +struct WASMModuleInstance; +typedef struct WASMModuleInstance *wasm_module_inst_t; + +/* Function instance */ +struct WASMFunctionInstance; +typedef struct WASMFunctionInstance *wasm_function_inst_t; + +/* WASM section */ +typedef struct wasm_section { + struct wasm_section *next; + /* section type */ + int section_type; + /* section body, not include type and size */ + uint8_t *section_body; + /* section body size */ + uint32_t section_body_size; +} wasm_section_t, *wasm_section_list_t; + +/* Execution environment, e.g. stack info */ +typedef struct WASMExecEnv { + uint8_t *stack; + uint32_t stack_size; +} *wasm_exec_env_t; + +/* Package Type */ +typedef enum { + Wasm_Module_Bytecode = 0, + Wasm_Module_AoT, + Package_Type_Unknown = 0xFFFF +} package_type_t; + +/** + * Initialize the WASM runtime environment. + * + * @return true if success, false otherwise + */ +bool +wasm_runtime_init(); + +/** + * Destroy the WASM runtime environment. + */ +void +wasm_runtime_destroy(); + +/** + * Get the package type of a buffer. + * + * @param buf the package buffer + * @param size the package buffer size + * + * @return the package type, return Package_Type_Unknown if the type is unknown + */ +package_type_t +get_package_type(const uint8_t *buf, uint32_t size); + +/** + * Load a WASM module from a specified byte buffer. + * + * @param buf the byte buffer which contains the WASM binary data + * @param size the size of the buffer + * @param error_buf output of the exception info + * @param error_buf_size the size of the exception string + * + * @return return WASM module loaded, NULL if failed + */ +wasm_module_t +wasm_runtime_load(const uint8_t *buf, uint32_t size, + char *error_buf, uint32_t error_buf_size); + +/** + * Load a WASM module from a specified WASM section list. + * + * @param section_list the section list which contains each section data + * @param error_buf output of the exception info + * @param error_buf_size the size of the exception string + * + * @return return WASM module loaded, NULL if failed + */ +wasm_module_t +wasm_runtime_load_from_sections(wasm_section_list_t section_list, + char *error_buf, uint32_t error_buf_size); + +/** + * Unload a WASM module. + * + * @param module the module to be unloaded + */ +void +wasm_runtime_unload(wasm_module_t module); + +/** + * Instantiate a WASM module. + * + * @param module the WASM module to instantiate + * @param stack_size the default stack size of the module instance, a stack + * will be created when function wasm_runtime_call_wasm() is called + * to run WASM function and the exec_env argument passed to + * wasm_runtime_call_wasm() is NULL. That means this parameter is + * ignored if exec_env is not NULL. + * @param heap_size the default heap size of the module instance, a heap will + * be created besides the app memory space. Both wasm app and native + * function can allocate memory from the heap. If heap_size is 0, the + * default heap size will be used. + * @param error_buf buffer to output the error info if failed + * @param error_buf_size the size of the error buffer + * + * @return return the instantiated WASM module instance, NULL if failed + */ +wasm_module_inst_t +wasm_runtime_instantiate(const wasm_module_t module, + uint32_t stack_size, uint32_t heap_size, + char *error_buf, uint32_t error_buf_size); + +/** + * Deinstantiate a WASM module instance, destroy the resources. + * + * @param module_inst the WASM module instance to destroy + */ +void +wasm_runtime_deinstantiate(wasm_module_inst_t module_inst); + +/** + * Load WASM module instance from AOT file. + * + * @param aot_file the AOT file of a WASM module + * @param aot_file_size the AOT file size + * @param heap_size the default heap size of the module instance, a heap will + * be created besides the app memory space. Both wasm app and native + * function can allocate memory from the heap. If heap_size is 0, the + * default heap size will be used. + * @param error_buf buffer to output the error info if failed + * @param error_buf_size the size of the error buffer + * + * @return the instantiated WASM module instance, NULL if failed + */ +wasm_module_inst_t +wasm_runtime_load_aot(uint8_t *aot_file, uint32_t aot_file_size, + uint32_t heap_size, + char *error_buf, uint32_t error_buf_size); + +/** + * Lookup an exported function in the WASM module instance. + * + * @param module_inst the module instance + * @param name the name of the function + * @param signature the signature of the function, use "i32"/"i64"/"f32"/"f64" + * to represent the type of i32/i64/f32/f64, e.g. "(i32i64)" "(i32)f32" + * + * @return the function instance found, if the module instance is loaded from + * the AOT file, the return value is the function pointer + */ +wasm_function_inst_t +wasm_runtime_lookup_function(const wasm_module_inst_t module_inst, + const char *name, const char *signature); + +/** + * Create execution environment. + * + * @param stack_size the stack size to execute a WASM function + * + * @return the execution environment + */ +wasm_exec_env_t +wasm_runtime_create_exec_env(uint32_t stack_size); + +/** + * Destroy the execution environment. + * + * @param env the execution environment to destroy + */ +void +wasm_runtime_destory_exec_env(wasm_exec_env_t env); + +/** + * Call the given WASM function of a WASM module instance with + * arguments (bytecode and AoT). + * + * @param module_inst the WASM module instance which the function belongs to + * @param exec_env the execution environment to call the function. If the module + * instance is created by AoT mode, it is ignored and just set it to NULL. + * If the module instance is created by bytecode mode and it is NULL, + * a temporary env object will be created + * @param function the function to be called + * @param argc the number of arguments + * @param argv the arguments. If the function method has return value, + * the first (or first two in case 64-bit return value) element of + * argv stores the return value of the called WASM function after this + * function returns. + * + * @return true if success, false otherwise and exception will be thrown, + * the caller can call wasm_runtime_get_exception to get exception info. + */ +bool +wasm_runtime_call_wasm(wasm_module_inst_t module_inst, + wasm_exec_env_t exec_env, + wasm_function_inst_t function, + uint32_t argc, uint32_t argv[]); + +/** + * Get exception info of the WASM module instance. + * + * @param module_inst the WASM module instance + * + * @return the exception string + */ +const char* +wasm_runtime_get_exception(wasm_module_inst_t module_inst); + +/** + * Clear exception info of the WASM module instance. + * + * @param module_inst the WASM module instance + */ +void +wasm_runtime_clear_exception(wasm_module_inst_t module_inst); + +/** + * Attach the current native thread to a WASM module instance. + * A native thread cannot be attached simultaneously to two WASM module + * instances. The WASM module instance will be attached to the native + * thread which it is instantiated in by default. + * + * @param module_inst the WASM module instance to attach + * @param thread_data the thread data that current native thread requires + * the WASM module instance to store + * + * @return true if SUCCESS, false otherwise + */ +bool +wasm_runtime_attach_current_thread(wasm_module_inst_t module_inst, + void *thread_data); + +/** + * Detach the current native thread from a WASM module instance. + * + * @param module_inst the WASM module instance to detach + */ +void +wasm_runtime_detach_current_thread(wasm_module_inst_t module_inst); + +/** + * Get the thread data that the current native thread requires the WASM + * module instance to store when attaching. + * + * @return the thread data stored when attaching + */ +void* +wasm_runtime_get_current_thread_data(); + +/** + * Get current WASM module instance of the current native thread + * + * @return current WASM module instance of the current native thread, NULL + * if not found + */ +wasm_module_inst_t +wasm_runtime_get_current_module_inst(); + +/** + * Allocate memory from the heap of WASM module instance + * + * @param module_inst the WASM module instance which contains heap + * @param size the size bytes to allocate + * + * @return the allocated memory address, which is a relative offset to the + * base address of the module instance's memory space, the value range + * is (-heap_size, 0). Note that it is not an absolute address. + * Return non-zero if success, zero if failed. + */ +int32_t +wasm_runtime_module_malloc(wasm_module_inst_t module_inst, uint32_t size); + +/** + * Free memory to the heap of WASM module instance + * + * @param module_inst the WASM module instance which contains heap + * @param ptr the pointer to free + */ +void +wasm_runtime_module_free(wasm_module_inst_t module_inst, int32_t ptr); + +/** + * Allocate memory from the heap of WASM module instance and initialize + * the memory with src + * + * @param module_inst the WASM module instance which contains heap + * @param src the source data to copy + * @param size the size of the source data + * + * @return the allocated memory address, which is a relative offset to the + * base address of the module instance's memory space, the value range + * is (-heap_size, 0). Note that it is not an absolute address. + * Return non-zero if success, zero if failed. + */ +int32_t +wasm_runtime_module_dup_data(wasm_module_inst_t module_inst, + const char *src, uint32_t size); + +/** + * Validate the app address, check whether it belongs to WASM module + * instance's address space, or in its heap space or memory space. + * + * @param module_inst the WASM module instance + * @param app_offset the app address to validate, which is a relative address + * @param size the size bytes of the app address + * + * @return true if success, false otherwise. If failed, an exception will + * be thrown. + */ +bool +wasm_runtime_validate_app_addr(wasm_module_inst_t module_inst, + int32_t app_offset, uint32_t size); + +/** + * Validate the native address, check whether it belongs to WASM module + * instance's address space, or in its heap space or memory space. + * + * @param module_inst the WASM module instance + * @param native_ptr the native address to validate, which is an absolute + * address + * @param size the size bytes of the app address + * + * @return true if success, false otherwise. If failed, an exception will + * be thrown. + */ +bool +wasm_runtime_validate_native_addr(wasm_module_inst_t module_inst, + void *native_ptr, uint32_t size); + +/** + * Convert app address(relative address) to native address(absolute address) + * + * @param module_inst the WASM module instance + * @param app_offset the app adress + * + * @return the native address converted + */ +void * +wasm_runtime_addr_app_to_native(wasm_module_inst_t module_inst, + int32_t app_offset); + +/** + * Convert native address(absolute address) to app address(relative address) + * + * @param module_inst the WASM module instance + * @param native_ptr the native address + * + * @return the app address converted + */ +int32_t +wasm_runtime_addr_native_to_app(wasm_module_inst_t module_inst, + void *native_ptr); + +/** + * Find the unique main function from a WASM module instance + * and execute that function. + * + * @param module_inst the WASM module instance + * @param argc the number of arguments + * @param argv the arguments array + * + * @return true if the main function is called, false otherwise. + */ +bool +wasm_application_execute_main(wasm_module_inst_t module_inst, + int argc, char *argv[]); + +/** + * Find the specified function in argv[0] from WASM module of current instance + * and execute that function. + * + * @param module_inst the WASM module instance + * @param name the name of the function to execute + * @param argc the number of arguments + * @param argv the arguments array + * + * @return true if the specified function is called, false otherwise. + */ +bool +wasm_application_execute_func(wasm_module_inst_t module_inst, + const char *name, int argc, char *argv[]); + + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_EXPORT_H */ diff --git a/core/iwasm/runtime/include/wasm_hashmap.h b/core/iwasm/runtime/include/wasm_hashmap.h new file mode 100644 index 000000000..c9f719122 --- /dev/null +++ b/core/iwasm/runtime/include/wasm_hashmap.h @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef WASM_HASHMAP_H +#define WASM_HASHMAP_H + +#include "wasm_platform.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* Maximum initial size of hash map */ +#define HASH_MAP_MAX_SIZE 65536 + +struct HashMap; +typedef struct HashMap HashMap; + +/* Hash function: to get the hash value of key. */ +typedef uint32 (*HashFunc)(const void *key); + +/* Key equal function: to check whether two keys are equal. */ +typedef bool (*KeyEqualFunc)(void *key1, void *key2); + +/* Key destroy function: to destroy the key, auto called + when an hash element is removed. */ +typedef void (*KeyDestroyFunc)(void *key); + +/* Value destroy function: to destroy the value, auto called + when an hash element is removed. */ +typedef void (*ValueDestroyFunc)(void *key); + +/** + * Create a hash map. + * + * @param size: the initial size of the hash map + * @param use_lock whether to lock the hash map when operating on it + * @param hash_func hash function of the key, must be specified + * @param key_equal_func key equal function, check whether two keys + * are equal, must be specified + * @param key_destroy_func key destroy function, called when an hash element + * is removed if it is not NULL + * @param value_destroy_func value destroy function, called when an hash + * element is removed if it is not NULL + * + * @return the hash map created, NULL if failed + */ +HashMap* +wasm_hash_map_create(uint32 size, bool use_lock, + HashFunc hash_func, + KeyEqualFunc key_equal_func, + KeyDestroyFunc key_destroy_func, + ValueDestroyFunc value_destroy_func); + +/** + * Insert an element to the hash map + * + * @param map the hash map to insert element + * @key the key of the element + * @value the value of the element + * + * @return true if success, false otherwise + * Note: fail if key is NULL or duplicated key exists in the hash map, + */ +bool +wasm_hash_map_insert(HashMap *map, void *key, void *value); + +/** + * Find an element in the hash map + * + * @param map the hash map to find element + * @key the key of the element + * + * @return the value of the found element if success, NULL otherwise + */ +void* +wasm_hash_map_find(HashMap *map, void *key); + +/** + * Update an element in the hash map with new value + * + * @param map the hash map to update element + * @key the key of the element + * @value the new value of the element + * @p_old_value if not NULL, copies the old value to it + * + * @return true if success, false otherwise + * Note: the old value won't be destroyed by value destory function, + * it will be copied to p_old_value for user to process. + */ +bool +wasm_hash_map_update(HashMap *map, void *key, void *value, + void **p_old_value); + +/** + * Remove an element from the hash map + * + * @param map the hash map to remove element + * @key the key of the element + * @p_old_key if not NULL, copies the old key to it + * @p_old_value if not NULL, copies the old value to it + * + * @return true if success, false otherwise + * Note: the old key and old value won't be destroyed by key destroy + * function and value destroy function, they will be copied to + * p_old_key and p_old_value for user to process. + */ +bool +wasm_hash_map_remove(HashMap *map, void *key, + void **p_old_key, void **p_old_value); + +/** + * Destroy the hashmap + * + * @param map the hash map to destroy + * + * @return true if success, false otherwise + * Note: the key destroy function and value destroy function will be + * called to destroy each element's key and value if they are + * not NULL. + */ +bool +wasm_hash_map_destroy(HashMap *map); + +#ifdef __cplusplus +} +#endif + +#endif /* endof WASM_HASHMAP_H */ + diff --git a/core/iwasm/runtime/include/wasm_log.h b/core/iwasm/runtime/include/wasm_log.h new file mode 100644 index 000000000..112db2f14 --- /dev/null +++ b/core/iwasm/runtime/include/wasm_log.h @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @brief This log system supports wrapping multiple outputs into one + * log message. This is useful for outputting variable-length logs + * without additional memory overhead (the buffer for concatenating + * the message), e.g. exception stack trace, which cannot be printed + * by a single log calling without the help of an additional buffer. + * Avoiding additional memory buffer is useful for resource-constraint + * systems. It can minimize the impact of log system on applications + * and logs can be printed even when no enough memory is available. + * Functions with prefix "_" are private functions. Only macros that + * are not start with "_" are exposed and can be used. + */ + +#ifndef _WASM_LOG_H +#define _WASM_LOG_H + +#include "wasm_platform.h" + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * The following functions are the primitive operations of this log system. + * A normal usage of the log system is to call wasm_log_begin and then call + * wasm_log_printf or wasm_log_vprintf one or multiple times and then call + * wasm_log_end to wrap (mark) the previous outputs into one log message. + * The wasm_log and macros LOG_ERROR etc. can be used to output log messages + * by one log calling. + */ +int _wasm_log_init (void); +void _wasm_log_set_verbose_level (int level); +bool _wasm_log_begin (int level); +void _wasm_log_printf (const char *fmt, ...); +void _wasm_log_vprintf (const char *fmt, va_list ap); +void _wasm_log_end (void); +void _wasm_log (int level, const char *file, int line, + const char *fmt, ...); + +#if WASM_ENABLE_LOG != 0 +# define wasm_log_init() _wasm_log_init () +# define wasm_log_set_verbose_level(l) _wasm_log_set_verbose_level (l) +# define wasm_log_begin(l) _wasm_log_begin (l) +# define wasm_log_printf(...) _wasm_log_printf (__VA_ARGS__) +# define wasm_log_vprintf(...) _wasm_log_vprintf (__VA_ARGS__) +# define wasm_log_end() _wasm_log_end () +# define wasm_log(...) _wasm_log (__VA_ARGS__) +#else /* WASM_ENABLE_LOG != 0 */ +# define wasm_log_init() 0 +# define wasm_log_set_verbose_level(l) (void)0 +# define wasm_log_begin() false +# define wasm_log_printf(...) (void)0 +# define wasm_log_vprintf(...) (void)0 +# define wasm_log_end() (void)0 +# define wasm_log(...) (void)0 +#endif /* WASM_ENABLE_LOG != 0 */ + +#define LOG_ERROR(...) wasm_log (0, NULL, 0, __VA_ARGS__) +#define LOG_WARNING(...) wasm_log (1, NULL, 0, __VA_ARGS__) +#define LOG_VERBOSE(...) wasm_log (2, NULL, 0, __VA_ARGS__) + +#if defined(WASM_DEBUG) +# define LOG_DEBUG(...) _wasm_log (1, __FILE__, __LINE__, __VA_ARGS__) +#else /* defined(WASM_DEBUG) */ +# define LOG_DEBUG(...) (void)0 +#endif /* defined(WASM_DEBUG) */ + +#define LOG_PROFILE_HEAP_GC(heap, size) \ + LOG_VERBOSE("PROF.HEAP.GC: HEAP=%08X SIZE=%d", heap, size) + +#ifdef __cplusplus +} +#endif + + +#endif /* _WASM_LOG_H */ diff --git a/core/iwasm/runtime/include/wasm_vector.h b/core/iwasm/runtime/include/wasm_vector.h new file mode 100644 index 000000000..4723ff687 --- /dev/null +++ b/core/iwasm/runtime/include/wasm_vector.h @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_VECTOR_H +#define _WASM_VECTOR_H + +#include "wasm_platform.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +#define DEFAULT_VECTOR_INIT_SIZE 8 + +typedef struct Vector { + /* size of each element */ + uint32 size_elem; + /* max element number */ + uint32 max_elements; + /* current element num */ + uint32 num_elements; + /* vector data allocated */ + uint8 *data; +} Vector; + +/** + * Initialize vector + * + * @param vector the vector to init + * @param init_length the initial length of the vector + * @param size_elem size of each element + * + * @return true if success, false otherwise + */ +bool +wasm_vector_init(Vector *vector, uint32 init_length, uint32 size_elem); + +/** + * Set element of vector + * + * @param vector the vector to set + * @param index the index of the element to set + * @param elem_buf the element buffer which stores the element data + * + * @return true if success, false otherwise + */ +bool +wasm_vector_set(Vector *vector, uint32 index, const void *elem_buf); + +/** + * Get element of vector + * + * @param vector the vector to get + * @param index the index of the element to get + * @param elem_buf the element buffer to store the element data, + * whose length must be no less than element size + * + * @return true if success, false otherwise + */ +bool +wasm_vector_get(const Vector *vector, uint32 index, void *elem_buf); + +/** + * Insert element of vector + * + * @param vector the vector to insert + * @param index the index of the element to insert + * @param elem_buf the element buffer which stores the element data + * + * @return true if success, false otherwise + */ +bool +wasm_vector_insert(Vector *vector, uint32 index, const void *elem_buf); + +/** + * Append element to the end of vector + * + * @param vector the vector to append + * @param elem_buf the element buffer which stores the element data + * + * @return true if success, false otherwise + */ +bool +wasm_vector_append(Vector *vector, const void *elem_buf); + +/** + * Remove element from vector + * + * @param vector the vector to remove element + * @param index the index of the element to remove + * @param old_elem_buf if not NULL, copies the element data to the buffer + * + * @return true if success, false otherwise + */ +bool +wasm_vector_remove(Vector *vector, uint32 index, void *old_elem_buf); + +/** + * Return the size of the vector + * + * @param vector the vector to get size + * + * @return return the size of the vector + */ +uint32 +wasm_vector_size(const Vector *vector); + +/** + * Destroy the vector + * + * @param vector the vector to destroy + * + * @return true if success, false otherwise + */ +bool +wasm_vector_destroy(Vector *vector); + +#ifdef __cplusplus +} +#endif + +#endif /* endof _WASM_VECTOR_H */ + diff --git a/core/iwasm/runtime/platform/include/wasm_assert.h b/core/iwasm/runtime/platform/include/wasm_assert.h new file mode 100644 index 000000000..687c8e590 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_assert.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_ASSERT_H +#define _WASM_ASSERT_H + +#include "bh_assert.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +#define wasm_assert bh_assert + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_ASSERT_H */ + diff --git a/core/iwasm/runtime/platform/include/wasm_config.h b/core/iwasm/runtime/platform/include/wasm_config.h new file mode 100644 index 000000000..06aa5e107 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_config.h @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_CONFIG_H +#define _WASM_CONFIG_H + +#include "config.h" + +#endif /* end of _WASM_CONFIG_H */ + diff --git a/core/iwasm/runtime/platform/include/wasm_memory.h b/core/iwasm/runtime/platform/include/wasm_memory.h new file mode 100644 index 000000000..549ba4768 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_memory.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_MEMORY_H +#define _WASM_MEMORY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "bh_memory.h" + +#define wasm_malloc bh_malloc +#define wasm_free bh_free + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_MEMORY_H */ + diff --git a/core/iwasm/runtime/platform/include/wasm_platform_log.h b/core/iwasm/runtime/platform/include/wasm_platform_log.h new file mode 100644 index 000000000..3fe55bf59 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_platform_log.h @@ -0,0 +1,24 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_PLATFORM_LOG +#define _WASM_PLATFORM_LOG + +#define wasm_printf printf + +#define wasm_vprintf vprintf + +#endif /* _WASM_PLATFORM_LOG */ diff --git a/core/iwasm/runtime/platform/include/wasm_thread.h b/core/iwasm/runtime/platform/include/wasm_thread.h new file mode 100644 index 000000000..c14ae5982 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_thread.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file wasm_thread.h + * @brief This file contains Beihai platform abstract layer interface for + * thread relative function. + */ + +#ifndef _WASM_THREAD_H +#define _WASM_THREAD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "bh_thread.h" + + +#define ws_thread_sys_init vm_thread_sys_init + +#define ws_thread_sys_destroy vm_thread_sys_destroy + +#define ws_self_thread vm_self_thread + +#define ws_tls_put(ptr) vm_tls_put(0, ptr) + +#define ws_tls_get() vm_tls_get(0) + +static inline int +ws_mutex_init(korp_mutex *mutex, bool is_recursive) +{ + if (is_recursive) + return vm_recursive_mutex_init(mutex); + else + return vm_mutex_init(mutex); +} + +#define ws_mutex_destroy vm_mutex_destroy + +#define ws_mutex_lock vm_mutex_lock + +#define ws_mutex_unlock vm_mutex_unlock + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_THREAD_H */ + diff --git a/core/iwasm/runtime/platform/include/wasm_types.h b/core/iwasm/runtime/platform/include/wasm_types.h new file mode 100644 index 000000000..a0bdbc169 --- /dev/null +++ b/core/iwasm/runtime/platform/include/wasm_types.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_TYPES_H +#define _WASM_TYPES_H + +#include "wasm_config.h" + +typedef unsigned char uint8; +typedef char int8; +typedef unsigned short uint16; +typedef short int16; +typedef unsigned int uint32; +typedef int int32; + +#include "wasm_platform.h" + +#ifndef __cplusplus +#define true 1 +#define false 0 +#define inline __inline +#endif + +#endif /* end of _WASM_TYPES_H */ + diff --git a/core/iwasm/runtime/platform/linux/platform.cmake b/core/iwasm/runtime/platform/linux/platform.cmake new file mode 100644 index 000000000..c01fd0e57 --- /dev/null +++ b/core/iwasm/runtime/platform/linux/platform.cmake @@ -0,0 +1,25 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +add_definitions (-D__POSIX__ -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199309L) + +set (PLATFORM_LIB_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${PLATFORM_LIB_DIR}) +include_directories(${PLATFORM_LIB_DIR}/../include) + +file (GLOB_RECURSE source_all ${PLATFORM_LIB_DIR}/*.c) + +set (WASM_PLATFORM_LIB_SOURCE ${source_all}) + diff --git a/core/iwasm/runtime/platform/linux/wasm-native.c b/core/iwasm/runtime/platform/linux/wasm-native.c new file mode 100644 index 000000000..b24ac184e --- /dev/null +++ b/core/iwasm/runtime/platform/linux/wasm-native.c @@ -0,0 +1,333 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE /* for O_DIRECT */ +#endif + +#include "wasm-native.h" +#include "wasm-runtime.h" +#include "wasm_log.h" +#include "wasm_memory.h" +#include "wasm_platform_log.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define get_module_inst() \ + wasm_runtime_get_current_module_inst() + +#define validate_app_addr(offset, size) \ + wasm_runtime_validate_app_addr(module_inst, offset, size) + +#define addr_app_to_native(offset) \ + wasm_runtime_addr_app_to_native(module_inst, offset) + +#define addr_native_to_app(ptr) \ + wasm_runtime_addr_native_to_app(module_inst, ptr) + +#define module_malloc(size) \ + wasm_runtime_module_malloc(module_inst, size) + +#define module_free(offset) \ + wasm_runtime_module_free(module_inst, offset) + + +static int32 +__syscall0_wrapper(int32 arg0) +{ + switch (arg0) { + case 199: /* getuid */ + /* TODO */ + default: + printf("##_syscall0 called, syscall id: %d\n", arg0); + } + return 0; +} + +static int32 +__syscall1_wrapper(int32 arg0, int32 arg1) +{ + switch (arg0) { + case 6: /* close */ + /* TODO */ + default: + printf("##_syscall1 called, syscall id: %d\n", arg0); + } + return 0; +} + +static int32 +__syscall2_wrapper(int32 arg0, int32 arg1, int32 arg2) +{ + switch (arg0) { + case 183: /* getcwd */ + /* TODO */ + default: + printf("##_syscall2 called, syscall id: %d\n", arg0); + } + return 0; +} + +static int32 +__syscall3_wrapper(int32 arg0, int32 arg1, int32 arg2, int32 arg3) +{ + WASMModuleInstance *module_inst = get_module_inst(); + + switch (arg0) { + case 54: /* ioctl */ + { + /* Implement syscall 54 and syscall 146 to support printf() + for non SIDE_MODULE=1 mode */ + struct winsize *wsz; + + if (!validate_app_addr(arg3, sizeof(struct winsize))) + return 0; + + wsz = (struct winsize*)addr_app_to_native(arg3); + return syscall(54, arg1, arg2, wsz); + } + + case 145: /* readv */ + case 146: /* writev */ + { + /* Implement syscall 54 and syscall 146 to support printf() + for non SIDE_MODULE=1 mode */ + uint32 iovcnt = arg3, i; + struct iovec *vec_begin, *vec; + + if (!validate_app_addr(arg2, sizeof(struct iovec))) + return 0; + + vec_begin = vec = (struct iovec*)addr_app_to_native(arg2); + for (i = 0; i < iovcnt; i++, vec++) { + if (vec->iov_len > 0) { + if (!validate_app_addr((int32)vec->iov_base, 1)) + return 0; + vec->iov_base = addr_app_to_native((int32)vec->iov_base); + } + } + if (arg0 == 145) + return syscall(145, arg1, vec_begin, arg3); + else + return syscall(146, arg1, vec_begin, arg3); + } + + case 3: /* read*/ + case 5: /* open */ + case 221: /* fcntl */ + /* TODO */ + default: + printf("##_syscall3 called, syscall id: %d\n", arg0); + } + return 0; +} + +static int32 +__syscall4_wrapper(int32 arg0, int32 arg1, int32 arg2, + int32 arg3, int32 arg4) +{ + printf("##_syscall4 called, syscall id: %d\n", arg0); + return 0; +} + +static int32 +__syscall5_wrapper(int32 arg0, int32 arg1, int32 arg2, + int32 arg3, int32 arg4, int32 arg5) +{ + switch (arg0) { + case 140: /* llseek */ + /* TODO */ + default: + printf("##_syscall5 called, args[0]: %d\n", arg0); + } + return 0; +} + +#define GET_EMCC_SYSCALL_ARGS() \ + WASMModuleInstance *module_inst = get_module_inst(); \ + int32 *args; \ + if (!validate_app_addr(args_off, 1)) \ + return 0; \ + args = addr_app_to_native(args_off) \ + +#define EMCC_SYSCALL_WRAPPER0(id) \ + static int32 ___syscall##id##_wrapper(int32 _id) { \ + return __syscall0_wrapper(id); \ + } + +#define EMCC_SYSCALL_WRAPPER1(id) \ + static int32 ___syscall##id##_wrapper(int32 _id, int32 args_off) {\ + GET_EMCC_SYSCALL_ARGS(); \ + return __syscall1_wrapper(id, args[0]); \ + } + +#define EMCC_SYSCALL_WRAPPER2(id) \ + static int32 ___syscall##id##_wrapper(int32 _id, int32 args_off) {\ + GET_EMCC_SYSCALL_ARGS(); \ + return __syscall2_wrapper(id, args[0], args[1]); \ + } + +#define EMCC_SYSCALL_WRAPPER3(id) \ + static int32 ___syscall##id##_wrapper(int32 _id, int32 args_off) {\ + GET_EMCC_SYSCALL_ARGS(); \ + return __syscall3_wrapper(id, args[0], args[1], args[2]); \ + } + +#define EMCC_SYSCALL_WRAPPER4(id) \ + static int32 ___syscall##id##_wrapper(int32 _id, int32 args_off) {\ + GET_EMCC_SYSCALL_ARGS(); \ + return __syscall4_wrapper(id, args[0], args[1], args[2], args[3]);\ + } + +#define EMCC_SYSCALL_WRAPPER5(id) \ + static int32 ___syscall##id##_wrapper(int32 _id, int32 args_off) {\ + GET_EMCC_SYSCALL_ARGS(); \ + return __syscall5_wrapper(id, args[0], args[1], args[2], \ + args[3], args[4]); \ + } + +EMCC_SYSCALL_WRAPPER0(199) + +EMCC_SYSCALL_WRAPPER1(6) + +EMCC_SYSCALL_WRAPPER2(183) + +EMCC_SYSCALL_WRAPPER3(3) +EMCC_SYSCALL_WRAPPER3(5) +EMCC_SYSCALL_WRAPPER3(54) +EMCC_SYSCALL_WRAPPER3(145) +EMCC_SYSCALL_WRAPPER3(146) +EMCC_SYSCALL_WRAPPER3(221) + +EMCC_SYSCALL_WRAPPER5(140) + +static int32 +getTotalMemory_wrapper() +{ + WASMModuleInstance *module_inst = wasm_runtime_get_current_module_inst(); + WASMMemoryInstance *memory = module_inst->default_memory; + return NumBytesPerPage * memory->cur_page_count; +} + +static int32 +enlargeMemory_wrapper() +{ + bool ret; + WASMModuleInstance *module_inst = wasm_runtime_get_current_module_inst(); + WASMMemoryInstance *memory = module_inst->default_memory; + uint32 DYNAMICTOP_PTR_offset = module_inst->DYNAMICTOP_PTR_offset; + uint32 addr_data_offset = *(uint32*)(memory->global_data + DYNAMICTOP_PTR_offset); + uint32 *DYNAMICTOP_PTR = (uint32*)(memory->memory_data + addr_data_offset); + uint32 memory_size_expected = *DYNAMICTOP_PTR; + uint32 total_page_count = (memory_size_expected + NumBytesPerPage - 1) / NumBytesPerPage; + + if (total_page_count < memory->cur_page_count) { + return 1; + } + else { + ret = wasm_runtime_enlarge_memory(module_inst, total_page_count - + memory->cur_page_count); + return ret ? 1 : 0; + } +} + +static void +_abort_wrapper(int32 code) +{ + WASMModuleInstance *module_inst = wasm_runtime_get_current_module_inst(); + char buf[32]; + + snprintf(buf, sizeof(buf), "env.abort(%i)", code); + wasm_runtime_set_exception(module_inst, buf); +} + +static void +abortOnCannotGrowMemory_wrapper() +{ + WASMModuleInstance *module_inst = wasm_runtime_get_current_module_inst(); + wasm_runtime_set_exception(module_inst, "abort on cannot grow memory"); +} + +static void +___setErrNo_wrapper(int32 error_no) +{ + errno = error_no; +} + +/* TODO: add function parameter/result types check */ +#define REG_NATIVE_FUNC(module_name, func_name) \ + {#module_name, #func_name, func_name##_wrapper} + +typedef struct WASMNativeFuncDef { + const char *module_name; + const char *func_name; + void *func_ptr; +} WASMNativeFuncDef; + +static WASMNativeFuncDef native_func_defs[] = { + REG_NATIVE_FUNC(env, __syscall0), + REG_NATIVE_FUNC(env, __syscall1), + REG_NATIVE_FUNC(env, __syscall2), + REG_NATIVE_FUNC(env, __syscall3), + REG_NATIVE_FUNC(env, __syscall4), + REG_NATIVE_FUNC(env, __syscall5), + REG_NATIVE_FUNC(env, ___syscall3), + REG_NATIVE_FUNC(env, ___syscall5), + REG_NATIVE_FUNC(env, ___syscall6), + REG_NATIVE_FUNC(env, ___syscall54), + REG_NATIVE_FUNC(env, ___syscall140), + REG_NATIVE_FUNC(env, ___syscall145), + REG_NATIVE_FUNC(env, ___syscall146), + REG_NATIVE_FUNC(env, ___syscall183), + REG_NATIVE_FUNC(env, ___syscall199), + REG_NATIVE_FUNC(env, ___syscall221), + REG_NATIVE_FUNC(env, _abort), + REG_NATIVE_FUNC(env, abortOnCannotGrowMemory), + REG_NATIVE_FUNC(env, enlargeMemory), + REG_NATIVE_FUNC(env, getTotalMemory), + REG_NATIVE_FUNC(env, ___setErrNo), +}; + +void* +wasm_platform_native_func_lookup(const char *module_name, + const char *func_name) +{ + uint32 size = sizeof(native_func_defs) / sizeof(WASMNativeFuncDef); + WASMNativeFuncDef *func_def = native_func_defs; + WASMNativeFuncDef *func_def_end = func_def + size; + + if (!module_name || !func_name) + return NULL; + + while (func_def < func_def_end) { + if (!strcmp(func_def->module_name, module_name) + && !strcmp(func_def->func_name, func_name)) + return (void*)(uintptr_t)func_def->func_ptr; + func_def++; + } + + return NULL; +} + diff --git a/core/iwasm/runtime/platform/linux/wasm_platform.c b/core/iwasm/runtime/platform/linux/wasm_platform.c new file mode 100644 index 000000000..53600a25b --- /dev/null +++ b/core/iwasm/runtime/platform/linux/wasm_platform.c @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_log.h" +#include "wasm_platform.h" +#include "wasm_memory.h" + +#include +#include +#include +#include +#include + +bool is_little_endian = false; + +bool __is_little_endian() +{ + union w + { + int a; + char b; + }c; + + c.a = 1; + return (c.b == 1); +} + +int +wasm_platform_init() +{ + if (__is_little_endian()) + is_little_endian = true; + + return 0; +} + +char* +wasm_read_file_to_buffer(const char *filename, int *ret_size) +{ + char *buffer; + int file; + int file_size, read_size; + struct stat stat_buf; + + if (!filename || !ret_size) { + LOG_ERROR("Read file to buffer failed: invalid filename or ret size.\n"); + return NULL; + } + + if ((file = open(filename, O_RDONLY, 0)) == -1) { + LOG_ERROR("Read file to buffer failed: open file %s failed.\n", + filename); + return NULL; + } + + if (fstat(file, &stat_buf) != 0) { + LOG_ERROR("Read file to buffer failed: fstat file %s failed.\n", + filename); + close(file); + return NULL; + } + + file_size = stat_buf.st_size; + + if (!(buffer = wasm_malloc(file_size))) { + LOG_ERROR("Read file to buffer failed: alloc memory failed.\n"); + close(file); + return NULL; + } + + read_size = read(file, buffer, file_size); + close(file); + + if (read_size < file_size) { + LOG_ERROR("Read file to buffer failed: read file content failed.\n"); + wasm_free(buffer); + return NULL; + } + + *ret_size = file_size; + return buffer; +} + diff --git a/core/iwasm/runtime/platform/linux/wasm_platform.h b/core/iwasm/runtime/platform/linux/wasm_platform.h new file mode 100644 index 000000000..7a6320957 --- /dev/null +++ b/core/iwasm/runtime/platform/linux/wasm_platform.h @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_PLATFORM_H +#define _WASM_PLATFORM_H + +#include "wasm_config.h" +#include "wasm_types.h" + +#include +#include +typedef uint64_t uint64; +typedef int64_t int64; +typedef float float32; +typedef double float64; + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +#define WASM_PLATFORM "Linux" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * Return the offset of the given field in the given type. + * + * @param Type the type containing the filed + * @param field the field in the type + * + * @return the offset of field in Type + */ +#ifndef offsetof +#define offsetof(Type, field) ((size_t)(&((Type *)0)->field)) +#endif + +typedef pthread_t korp_tid; +typedef pthread_mutex_t korp_mutex; + +int wasm_platform_init(); + +extern bool is_little_endian; + +#include + +/* The following operations declared in string.h may be defined as + macros on Linux, so don't declare them as functions here. */ +/* memset */ +/* memcpy */ +/* memmove */ + +/* #include */ + +/* Unit test framework is based on C++, where the declaration of + snprintf is different. */ +#ifndef __cplusplus +int snprintf(char *buffer, size_t count, const char *format, ...); +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* #include */ + +#ifndef __cplusplus +double sqrt(double x); +#endif + +#include +extern int fopen_s(FILE ** pFile, const char *filename, const char *mode); + +char* +wasm_read_file_to_buffer(const char *filename, int *ret_size); + +void* +wasm_dlsym(void *handle, const char *symbol); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/runtime/platform/zephyr/COPYRIGHT b/core/iwasm/runtime/platform/zephyr/COPYRIGHT new file mode 100644 index 000000000..a0e1c83a9 --- /dev/null +++ b/core/iwasm/runtime/platform/zephyr/COPYRIGHT @@ -0,0 +1,126 @@ +# $FreeBSD$ +# @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 + +The compilation of software known as FreeBSD is distributed under the +following terms: + +Copyright (c) 1992-2019 The FreeBSD Project. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The 4.4BSD and 4.4BSD-Lite software is distributed under the following +terms: + +All of the documentation and software included in the 4.4BSD and 4.4BSD-Lite +Releases is copyrighted by The Regents of the University of California. + +Copyright 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 + The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: +This product includes software developed by the University of +California, Berkeley and its contributors. +4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +The Institute of Electrical and Electronics Engineers and the American +National Standards Committee X3, on Information Processing Systems have +given us permission to reprint portions of their documentation. + +In the following statement, the phrase ``this text'' refers to portions +of the system documentation. + +Portions of this text are reprinted and reproduced in electronic form in +the second BSD Networking Software Release, from IEEE Std 1003.1-1988, IEEE +Standard Portable Operating System Interface for Computer Environments +(POSIX), copyright C 1988 by the Institute of Electrical and Electronics +Engineers, Inc. In the event of any discrepancy between these versions +and the original IEEE Standard, the original IEEE Standard is the referee +document. + +In the following statement, the phrase ``This material'' refers to portions +of the system documentation. + +This material is reproduced with permission from American National +Standards Committee X3, on Information Processing Systems. Computer and +Business Equipment Manufacturers Association (CBEMA), 311 First St., NW, +Suite 500, Washington, DC 20001-2178. The developmental work of +Programming Language C was completed by the X3J11 Technical Committee. + +The views and conclusions contained in the software and documentation are +those of the authors and should not be interpreted as representing official +policies, either expressed or implied, of the Regents of the University +of California. + + +NOTE: The copyright of UC Berkeley's Berkeley Software Distribution ("BSD") +source has been updated. The copyright addendum may be found at +ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change and is +included below. + +July 22, 1999 + +To All Licensees, Distributors of Any Version of BSD: + +As you know, certain of the Berkeley Software Distribution ("BSD") source +code files require that further distributions of products containing all or +portions of the software, acknowledge within their advertising materials +that such products contain software developed by UC Berkeley and its +contributors. + +Specifically, the provision reads: + +" * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors." + +Effective immediately, licensees and distributors are no longer required to +include the acknowledgement within advertising materials. Accordingly, the +foregoing paragraph of those BSD Unix files containing it is hereby deleted +in its entirety. + +William Hoskins +Director, Office of Technology Licensing +University of California, Berkeley diff --git a/core/iwasm/runtime/platform/zephyr/wasm-native.c b/core/iwasm/runtime/platform/zephyr/wasm-native.c new file mode 100644 index 000000000..1d35be453 --- /dev/null +++ b/core/iwasm/runtime/platform/zephyr/wasm-native.c @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-native.h" + + +void* +wasm_platform_native_func_lookup(const char *module_name, + const char *func_name) +{ + return NULL; +} + diff --git a/core/iwasm/runtime/platform/zephyr/wasm_math.c b/core/iwasm/runtime/platform/zephyr/wasm_math.c new file mode 100644 index 000000000..bad81eac3 --- /dev/null +++ b/core/iwasm/runtime/platform/zephyr/wasm_math.c @@ -0,0 +1,581 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2004 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include "wasm_log.h" +#include "wasm_platform.h" +#include "wasm_platform_log.h" +#include "wasm_memory.h" + +#define __FDLIBM_STDC__ + +typedef uint32_t u_int32_t; +typedef uint64_t u_int64_t; + +typedef union u32double_tag { + int *pint; + double *pdouble; +} U32DOUBLE; + +static inline int * +pdouble2pint(double *pdouble) +{ + U32DOUBLE u; + u.pdouble = pdouble; + return u.pint; +} + +typedef union +{ + double value; + struct + { + u_int32_t lsw; + u_int32_t msw; + } parts; + struct + { + u_int64_t w; + } xparts; +} ieee_double_shape_type_little; + +typedef union +{ + double value; + struct + { + u_int32_t msw; + u_int32_t lsw; + } parts; + struct + { + u_int64_t w; + } xparts; +} ieee_double_shape_type_big; + +typedef union { + double d; + struct { + unsigned int manl :32; + unsigned int manh :20; + unsigned int exp :11; + unsigned int sign :1; + } bits; +} IEEEd2bits_L; + +typedef union { + double d; + struct { + unsigned int sign :1; + unsigned int exp :11; + unsigned int manh :20; + unsigned int manl :32; + } bits; +} IEEEd2bits_B; + +#define __HIL(x) *(1+pdouble2pint(&x)) +#define __LOL(x) *(pdouble2pint(&x)) +#define __HIB(x) *(int*)&x +#define __LOB(x) *(1+(int*)&x) + +/* Get two 32 bit ints from a double. */ + +#define EXTRACT_WORDS_L(ix0,ix1,d) \ +do { \ + ieee_double_shape_type_little ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define INSERT_WORDS_L(d,ix0,ix1) \ +do { \ + ieee_double_shape_type_little iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) + +/* Get two 32 bit ints from a double. */ + +#define EXTRACT_WORDS_B(ix0,ix1,d) \ +do { \ + ieee_double_shape_type_big ew_u; \ + ew_u.value = (d); \ + (ix0) = ew_u.parts.msw; \ + (ix1) = ew_u.parts.lsw; \ +} while (0) + +/* Set a double from two 32 bit ints. */ + +#define INSERT_WORDS_B(d,ix0,ix1) \ +do { \ + ieee_double_shape_type_big iw_u; \ + iw_u.parts.msw = (ix0); \ + iw_u.parts.lsw = (ix1); \ + (d) = iw_u.value; \ +} while (0) + +/* Get the more significant 32 bit int from a double. */ +#define GET_HIGH_WORD_L(i,d) \ +do { \ + ieee_double_shape_type_little gh_u; \ + gh_u.value = (d); \ + (i) = gh_u.parts.msw; \ +} while (0) + +/* Get the more significant 32 bit int from a double. */ +#define GET_HIGH_WORD_B(i,d) \ +do { \ + ieee_double_shape_type_big gh_u; \ + gh_u.value = (d); \ + (i) = gh_u.parts.msw; \ +} while (0) + +/* Set the more significant 32 bits of a double from an int. */ +#define SET_HIGH_WORD_L(d,v) \ +do { \ + ieee_double_shape_type_little sh_u; \ + sh_u.value = (d); \ + sh_u.parts.msw = (v); \ + (d) = sh_u.value; \ +} while (0) + +/* Set the more significant 32 bits of a double from an int. */ +#define SET_HIGH_WORD_B(d,v) \ +do { \ + ieee_double_shape_type_big sh_u; \ + sh_u.value = (d); \ + sh_u.parts.msw = (v); \ + (d) = sh_u.value; \ +} while (0) + +/* Macro wrappers. */ +#define EXTRACT_WORDS(ix0,ix1,d) do { \ + if (is_little_endian) \ + EXTRACT_WORDS_L(ix0,ix1,d); \ + else \ + EXTRACT_WORDS_B(ix0,ix1,d); \ +} while (0) + +#define INSERT_WORDS(d,ix0,ix1) do { \ + if (is_little_endian) \ + INSERT_WORDS_L(d,ix0,ix1); \ + else \ + INSERT_WORDS_B(d,ix0,ix1); \ +} while (0) + +#define GET_HIGH_WORD(i,d) \ +do { \ + if (is_little_endian) \ + GET_HIGH_WORD_L(i,d); \ + else \ + GET_HIGH_WORD_B(i,d); \ +} while (0) + +#define SET_HIGH_WORD(d,v) \ +do { \ + if (is_little_endian) \ + SET_HIGH_WORD_L(d,v); \ + else \ + SET_HIGH_WORD_B(d,v); \ +} while (0) + +#define __HI(x) (is_little_endian ? __HIL(x) : __HIB(x)) + +#define __LO(x) (is_little_endian ? __LOL(x) : __LOB(x)) + +/* + * Attempt to get strict C99 semantics for assignment with non-C99 compilers. + */ +#if FLT_EVAL_METHOD == 0 || __GNUC__ == 0 +#define STRICT_ASSIGN(type, lval, rval) ((lval) = (rval)) +#else +#define STRICT_ASSIGN(type, lval, rval) do { \ + volatile type __lval; \ + \ + if (sizeof(type) >= sizeof(long double)) \ + (lval) = (rval); \ + else { \ + __lval = (rval); \ + (lval) = __lval; \ + } \ +} while (0) +#endif + +#ifdef __FDLIBM_STDC__ +static const double huge = 1.0e300; +#else +static double huge = 1.0e300; +#endif + +#ifdef __STDC__ +static const double +#else +static double +#endif +tiny = 1.0e-300; + +#ifdef __STDC__ +static const double +#else +static double +#endif +one= 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */ + +#ifdef __STDC__ +static const double +#else +static double +#endif +TWO52[2]={ + 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ + -4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */ +}; + +static double freebsd_sqrt(double x); +static double freebsd_floor(double x); +static double freebsd_ceil(double x); +static double freebsd_fabs(double x); +static double freebsd_rint(double x); +static int freebsd_isnan(double x); + +static double freebsd_sqrt(double x) /* wrapper sqrt */ +{ + double z; + int32_t sign = (int)0x80000000; + int32_t ix0,s0,q,m,t,i; + u_int32_t r,t1,s1,ix1,q1; + + EXTRACT_WORDS(ix0,ix1,x); + + /* take care of Inf and NaN */ + if((ix0&0x7ff00000)==0x7ff00000) { + return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf + sqrt(-inf)=sNaN */ + } + /* take care of zero */ + if(ix0<=0) { + if(((ix0&(~sign))|ix1)==0) return x;/* sqrt(+-0) = +-0 */ + else if(ix0<0) + return (x-x)/(x-x); /* sqrt(-ve) = sNaN */ + } + /* normalize x */ + m = (ix0>>20); + if(m==0) { /* subnormal x */ + while(ix0==0) { + m -= 21; + ix0 |= (ix1>>11); ix1 <<= 21; + } + for(i=0;(ix0&0x00100000)==0;i++) ix0<<=1; + m -= i-1; + ix0 |= (ix1>>(32-i)); + ix1 <<= i; + } + m -= 1023; /* unbias exponent */ + ix0 = (ix0&0x000fffff)|0x00100000; + if(m&1){ /* odd m, double x to make it even */ + ix0 += ix0 + ((ix1&sign)>>31); + ix1 += ix1; + } + m >>= 1; /* m = [m/2] */ + + /* generate sqrt(x) bit by bit */ + ix0 += ix0 + ((ix1&sign)>>31); + ix1 += ix1; + q = q1 = s0 = s1 = 0; /* [q,q1] = sqrt(x) */ + r = 0x00200000; /* r = moving bit from right to left */ + + while(r!=0) { + t = s0+r; + if(t<=ix0) { + s0 = t+r; + ix0 -= t; + q += r; + } + ix0 += ix0 + ((ix1&sign)>>31); + ix1 += ix1; + r>>=1; + } + + r = sign; + while(r!=0) { + t1 = s1+r; + t = s0; + if((t>31); + ix1 += ix1; + r>>=1; + } + + /* use floating add to find out rounding direction */ + if((ix0|ix1)!=0) { + z = one-tiny; /* trigger inexact flag */ + if (z>=one) { + z = one+tiny; + if (q1==(u_int32_t)0xffffffff) { q1=0; q += 1;} + else if (z>one) { + if (q1==(u_int32_t)0xfffffffe) q+=1; + q1+=2; + } else + q1 += (q1&1); + } + } + ix0 = (q>>1)+0x3fe00000; + ix1 = q1>>1; + if ((q&1)==1) ix1 |= sign; + ix0 += (m <<20); + + INSERT_WORDS(z,ix0,ix1); + + return z; +} + +static double freebsd_floor(double x) +{ + int32_t i0,i1,j0; + u_int32_t i,j; + + EXTRACT_WORDS(i0,i1,x); + + j0 = ((i0>>20)&0x7ff)-0x3ff; + if(j0<20) { + if(j0<0) { /* raise inexact if x != 0 */ + if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ + if(i0>=0) {i0=i1=0;} + else if(((i0&0x7fffffff)|i1)!=0) + { i0=0xbff00000;i1=0;} + } + } else { + i = (0x000fffff)>>j0; + if(((i0&i)|i1)==0) return x; /* x is integral */ + if(huge+x>0.0) { /* raise inexact flag */ + if(i0<0) i0 += (0x00100000)>>j0; + i0 &= (~i); i1=0; + } + } + } else if (j0>51) { + if(j0==0x400) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } else { + i = ((u_int32_t)(0xffffffff))>>(j0-20); + if((i1&i)==0) return x; /* x is integral */ + if(huge+x>0.0) { /* raise inexact flag */ + if(i0<0) { + if(j0==20) i0+=1; + else { + j = i1+(1<<(52-j0)); + if(j>20)&0x7ff)-0x3ff; + if(j0<20) { + if(j0<0) { /* raise inexact if x != 0 */ + if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */ + if(i0<0) {i0=0x80000000;i1=0;} + else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;} + } + } else { + i = (0x000fffff)>>j0; + if(((i0&i)|i1)==0) return x; /* x is integral */ + if(huge+x>0.0) { /* raise inexact flag */ + if(i0>0) i0 += (0x00100000)>>j0; + i0 &= (~i); i1=0; + } + } + } else if (j0>51) { + if(j0==0x400) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } else { + i = ((u_int32_t)(0xffffffff))>>(j0-20); + if((i1&i)==0) return x; /* x is integral */ + if(huge+x>0.0) { /* raise inexact flag */ + if(i0>0) { + if(j0==20) i0+=1; + else { + j = i1 + (1<<(52-j0)); + if(j>31)&1; + j0 = ((i0>>20)&0x7ff)-0x3ff; + if(j0<20) { + if(j0<0) { + if(((i0&0x7fffffff)|i1)==0) return x; + i1 |= (i0&0x0fffff); + i0 &= 0xfffe0000; + i0 |= ((i1|-i1)>>12)&0x80000; + SET_HIGH_WORD(x,i0); + STRICT_ASSIGN(double,w,TWO52[sx]+x); + t = w-TWO52[sx]; + GET_HIGH_WORD(i0,t); + SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31)); + return t; + } else { + i = (0x000fffff)>>j0; + if(((i0&i)|i1)==0) return x; /* x is integral */ + i>>=1; + if(((i0&i)|i1)!=0) { + /* + * Some bit is set after the 0.5 bit. To avoid the + * possibility of errors from double rounding in + * w = TWO52[sx]+x, adjust the 0.25 bit to a lower + * guard bit. We do this for all j0<=51. The + * adjustment is trickiest for j0==18 and j0==19 + * since then it spans the word boundary. + */ + if(j0==19) i1 = 0x40000000; else + if(j0==18) i1 = 0x80000000; else + i0 = (i0&(~i))|((0x20000)>>j0); + } + } + } else if (j0>51) { + if(j0==0x400) return x+x; /* inf or NaN */ + else return x; /* x is integral */ + } else { + i = ((u_int32_t)(0xffffffff))>>(j0-20); + if((i1&i)==0) return x; /* x is integral */ + i>>=1; + if((i1&i)!=0) i1 = (i1&(~i))|((0x40000000)>>(j0-20)); + } + INSERT_WORDS(x,i0,i1); + STRICT_ASSIGN(double,w,TWO52[sx]+x); + return w-TWO52[sx]; +} + +static int freebsd_isnan(double d) +{ + if (is_little_endian) { + IEEEd2bits_L u; + u.d = d; + return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); + } + else { + IEEEd2bits_B u; + u.d = d; + return (u.bits.exp == 2047 && (u.bits.manl != 0 || u.bits.manh != 0)); + } +} + +static double freebsd_fabs(double x) +{ + u_int32_t high; + GET_HIGH_WORD(high,x); + SET_HIGH_WORD(x,high&0x7fffffff); + return x; +} + +double sqrt(double x) +{ + return freebsd_sqrt(x); +} + +double floor(double x) +{ + return freebsd_floor(x); +} + +double ceil(double x) +{ + return freebsd_ceil(x); +} + +double fmin(double x, double y) +{ + return x < y ? x : y; +} + +double fmax(double x, double y) +{ + return x > y ? x : y; +} + +double rint(double x) +{ + return freebsd_rint(x); +} + +double fabs(double x) +{ + return freebsd_fabs(x); +} + +int isnan(double x) +{ + return freebsd_isnan(x); +} + +double trunc(double x) +{ + return (x > 0) ? freebsd_floor(x) : freebsd_ceil(x); +} + +int signbit(double x) +{ + return ((__HI(x) & 0x80000000) >> 31); +} + diff --git a/core/iwasm/runtime/platform/zephyr/wasm_platform.c b/core/iwasm/runtime/platform/zephyr/wasm_platform.c new file mode 100644 index 000000000..08b1650eb --- /dev/null +++ b/core/iwasm/runtime/platform/zephyr/wasm_platform.c @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_platform.h" + +#ifndef CONFIG_AEE_ENABLE +static int +_stdout_hook_iwasm(int c) +{ + printk("%c", (char)c); + return 1; +} + +extern void __stdout_hook_install(int (*hook)(int)); +#endif + +bool is_little_endian = false; + +bool __is_little_endian() +{ + union w + { + int a; + char b; + }c; + + c.a = 1; + return (c.b == 1); +} + +int wasm_platform_init() +{ + if (__is_little_endian()) + is_little_endian = true; + +#ifndef CONFIG_AEE_ENABLE + /* Enable printf() in Zephyr */ + __stdout_hook_install(_stdout_hook_iwasm); +#endif + + return 0; +} + diff --git a/core/iwasm/runtime/platform/zephyr/wasm_platform.h b/core/iwasm/runtime/platform/zephyr/wasm_platform.h new file mode 100644 index 000000000..e14d213d7 --- /dev/null +++ b/core/iwasm/runtime/platform/zephyr/wasm_platform.h @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_PLATFORM_H +#define _WASM_PLATFORM_H + +#include "wasm_config.h" +#include "wasm_types.h" +#include +#include +#include +#include + +#include +typedef uint64_t uint64; +typedef int64_t int64; +typedef float float32; +typedef double float64; + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +#define WASM_PLATFORM "Zephyr" + +#include +#include +#include +#include +#include +#include + +/** + * Return the offset of the given field in the given type. + * + * @param Type the type containing the filed + * @param field the field in the type + * + * @return the offset of field in Type + */ +#ifndef offsetof +#define offsetof(Type, field) ((size_t)(&((Type *)0)->field)) +#endif + +typedef struct k_thread korp_thread; +typedef korp_thread *korp_tid; +typedef struct k_mutex korp_mutex; + +int wasm_platform_init(); + +extern bool is_little_endian; + +#include + +/* The following operations declared in string.h may be defined as + macros on Linux, so don't declare them as functions here. */ +/* memset */ +/* memcpy */ +/* memmove */ + +/* #include */ + +/* Unit test framework is based on C++, where the declaration of + snprintf is different. */ +#ifndef __cplusplus +int snprintf(char *buffer, size_t count, const char *format, ...); +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* math functions */ +double sqrt(double x); +double floor(double x); +double ceil(double x); +double fmin(double x, double y); +double fmax(double x, double y); +double rint(double x); +double fabs(double x); +double trunc(double x); +int signbit(double x); +int isnan(double x); + +void* +wasm_dlsym(void *handle, const char *symbol); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/iwasm/runtime/utils/utils.cmake b/core/iwasm/runtime/utils/utils.cmake new file mode 100644 index 000000000..a636cb4c8 --- /dev/null +++ b/core/iwasm/runtime/utils/utils.cmake @@ -0,0 +1,22 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (UTILS_LIB_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${UTILS_LIB_DIR}) + +file (GLOB_RECURSE source_all ${UTILS_LIB_DIR}/*.c ) + +set (WASM_UTILS_LIB_SOURCE ${source_all}) + diff --git a/core/iwasm/runtime/utils/wasm_dlfcn.c b/core/iwasm/runtime/utils/wasm_dlfcn.c new file mode 100644 index 000000000..de7123125 --- /dev/null +++ b/core/iwasm/runtime/utils/wasm_dlfcn.c @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_platform.h" + + +static bool sort_flag = false; + +typedef struct NativeSymbol { + const char *symbol; + void *func_ptr; +} NativeSymbol; + +static bool +sort_symbol_ptr(NativeSymbol *ptr, int len) +{ + int i, j; + NativeSymbol temp; + + for (i = 0; i < len - 1; ++i) { + for (j = i + 1; j < len; ++j) { + if (strcmp((ptr+i)->symbol, (ptr+j)->symbol) > 0) { + temp = ptr[i]; + ptr[i] = ptr[j]; + ptr[j] = temp; + } + } + } + + return true; +} + +static void * +lookup_symbol(NativeSymbol *ptr, int len, const char *symbol) +{ + int low = 0, mid, ret; + int high = len - 1; + + while (low <= high) { + mid = (low + high) / 2; + ret = strcmp(symbol, ptr[mid].symbol); + + if (ret == 0) + return ptr[mid].func_ptr; + else if (ret < 0) + high = mid - 1; + else + low = mid + 1; + } + + return NULL; +} + +int +get_base_lib_export_apis(NativeSymbol **p_base_lib_apis); + +int +get_ext_lib_export_apis(NativeSymbol **p_ext_lib_apis); + +static NativeSymbol *base_native_symbol_defs; +static NativeSymbol *ext_native_symbol_defs; +static int base_native_symbol_len; +static int ext_native_symbol_len; + +void * +wasm_dlsym(void *handle, const char *symbol) +{ + void *ret; + + if (!sort_flag) { + base_native_symbol_len = get_base_lib_export_apis(&base_native_symbol_defs); + ext_native_symbol_len = get_ext_lib_export_apis(&ext_native_symbol_defs); + + if (base_native_symbol_len > 0) + sort_symbol_ptr(base_native_symbol_defs, base_native_symbol_len); + + if (ext_native_symbol_len > 0) + sort_symbol_ptr(ext_native_symbol_defs, ext_native_symbol_len); + + sort_flag = true; + } + + if (!symbol) + return NULL; + + if ((ret = lookup_symbol(base_native_symbol_defs, base_native_symbol_len, + symbol)) + || (ret = lookup_symbol(ext_native_symbol_defs, ext_native_symbol_len, + symbol))) + return ret; + + return NULL; +} + diff --git a/core/iwasm/runtime/utils/wasm_hashmap.c b/core/iwasm/runtime/utils/wasm_hashmap.c new file mode 100644 index 000000000..f0a24a41b --- /dev/null +++ b/core/iwasm/runtime/utils/wasm_hashmap.c @@ -0,0 +1,301 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_hashmap.h" +#include "wasm_log.h" +#include "wasm_thread.h" +#include "wasm_memory.h" + + +typedef struct HashMapElem { + void *key; + void *value; + struct HashMapElem *next; +} HashMapElem; + +struct HashMap { + /* size of element array */ + uint32 size; + /* lock for elements */ + korp_mutex *lock; + /* hash function of key */ + HashFunc hash_func; + /* key equal function */ + KeyEqualFunc key_equal_func; + KeyDestroyFunc key_destroy_func; + ValueDestroyFunc value_destroy_func; + HashMapElem *elements[1]; +}; + +HashMap* +wasm_hash_map_create(uint32 size, bool use_lock, + HashFunc hash_func, + KeyEqualFunc key_equal_func, + KeyDestroyFunc key_destroy_func, + ValueDestroyFunc value_destroy_func) +{ + HashMap *map; + uint32 total_size; + + if (size > HASH_MAP_MAX_SIZE) { + LOG_ERROR("HashMap create failed: size is too large.\n"); + return NULL; + } + + if (!hash_func || !key_equal_func) { + LOG_ERROR("HashMap create failed: hash function or key equal function " + " is NULL.\n"); + return NULL; + } + + total_size = offsetof(HashMap, elements) + + sizeof(HashMapElem) * size + + (use_lock ? sizeof(korp_mutex) : 0); + + if (!(map = wasm_malloc(total_size))) { + LOG_ERROR("HashMap create failed: alloc memory failed.\n"); + return NULL; + } + + memset(map, 0, total_size); + + if (use_lock) { + map->lock = (korp_mutex*) + ((uint8*)map + offsetof(HashMap, elements) + sizeof(HashMapElem) * size); + if (ws_mutex_init(map->lock, false)) { + LOG_ERROR("HashMap create failed: init map lock failed.\n"); + wasm_free(map); + return NULL; + } + } + + map->size = size; + map->hash_func = hash_func; + map->key_equal_func = key_equal_func; + map->key_destroy_func = key_destroy_func; + map->value_destroy_func = value_destroy_func; + return map; +} + +bool +wasm_hash_map_insert(HashMap *map, void *key, void *value) +{ + uint32 index; + HashMapElem *elem; + + if (!map || !key) { + LOG_ERROR("HashMap insert elem failed: map or key is NULL.\n"); + return false; + } + + if (map->lock) { + ws_mutex_lock(map->lock); + } + + index = map->hash_func(key) % map->size; + elem = map->elements[index]; + while (elem) { + if (map->key_equal_func(elem->key, key)) { + LOG_ERROR("HashMap insert elem failed: duplicated key found.\n"); + goto fail; + } + elem = elem->next; + } + + if (!(elem = wasm_malloc(sizeof(HashMapElem)))) { + LOG_ERROR("HashMap insert elem failed: alloc memory failed.\n"); + goto fail; + } + + elem->key = key; + elem->value = value; + elem->next = map->elements[index]; + map->elements[index] = elem; + + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return true; + +fail: + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return false; +} + +void* +wasm_hash_map_find(HashMap *map, void *key) +{ + uint32 index; + HashMapElem *elem; + void *value; + + if (!map || !key) { + LOG_ERROR("HashMap find elem failed: map or key is NULL.\n"); + return NULL; + } + + if (map->lock) { + ws_mutex_lock(map->lock); + } + + index = map->hash_func(key) % map->size; + elem = map->elements[index]; + + while (elem) { + if (map->key_equal_func(elem->key, key)) { + value = elem->value; + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return value; + } + elem = elem->next; + } + + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return NULL; +} + +bool +wasm_hash_map_update(HashMap *map, void *key, void *value, + void **p_old_value) +{ + uint32 index; + HashMapElem *elem; + + if (!map || !key) { + LOG_ERROR("HashMap update elem failed: map or key is NULL.\n"); + return false; + } + + if (map->lock) { + ws_mutex_lock(map->lock); + } + + index = map->hash_func(key) % map->size; + elem = map->elements[index]; + + while (elem) { + if (map->key_equal_func(elem->key, key)) { + if (p_old_value) + *p_old_value = elem->value; + elem->value = value; + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return true; + } + elem = elem->next; + } + + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return false; +} + +bool +wasm_hash_map_remove(HashMap *map, void *key, + void **p_old_key, void **p_old_value) +{ + uint32 index; + HashMapElem *elem, *prev; + + if (!map || !key) { + LOG_ERROR("HashMap remove elem failed: map or key is NULL.\n"); + return false; + } + + if (map->lock) { + ws_mutex_lock(map->lock); + } + + index = map->hash_func(key) % map->size; + prev = elem = map->elements[index]; + + while (elem) { + if (map->key_equal_func(elem->key, key)) { + if (p_old_key) + *p_old_key = elem->key; + if (p_old_value) + *p_old_value = elem->value; + + if (elem == map->elements[index]) + map->elements[index] = elem->next; + else + prev->next = elem->next; + + wasm_free(elem); + + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return true; + } + + prev = elem; + elem = elem->next; + } + + if (map->lock) { + ws_mutex_unlock(map->lock); + } + return false; +} + +bool +wasm_hash_map_destroy(HashMap *map) +{ + uint32 index; + HashMapElem *elem, *next; + + if (!map) { + LOG_ERROR("HashMap destroy failed: map is NULL.\n"); + return false; + } + + if (map->lock) { + ws_mutex_lock(map->lock); + } + + for (index = 0; index < map->size; index++) { + elem = map->elements[index]; + while (elem) { + next = elem->next; + + if (map->key_destroy_func) { + map->key_destroy_func(elem->key); + } + if (map->value_destroy_func) { + map->value_destroy_func(elem->value); + } + wasm_free(elem); + + elem = next; + } + } + + if (map->lock) { + ws_mutex_unlock(map->lock); + ws_mutex_destroy(map->lock); + } + wasm_free(map); + return true; +} diff --git a/core/iwasm/runtime/utils/wasm_log.c b/core/iwasm/runtime/utils/wasm_log.c new file mode 100644 index 000000000..0bbb877b5 --- /dev/null +++ b/core/iwasm/runtime/utils/wasm_log.c @@ -0,0 +1,102 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_log.h" + +#include "wasm_platform_log.h" +#include "wasm_thread.h" + + +/** + * The verbose level of the log system. Only those verbose logs whose + * levels are less than or equal to this value are outputed. + */ +static int log_verbose_level; + +/** + * The lock for protecting the global output stream of logs. + */ +static korp_mutex log_stream_lock; + + +int +_wasm_log_init () +{ + log_verbose_level = 1; + return ws_mutex_init (&log_stream_lock, false); +} + +void +_wasm_log_set_verbose_level (int level) +{ + log_verbose_level = level; +} + +bool +_wasm_log_begin (int level) +{ + korp_tid self; + + if (level > log_verbose_level) { + return false; + } + + /* Try to own the log stream and start the log output. */ + ws_mutex_lock (&log_stream_lock); + self = ws_self_thread (); + wasm_printf ("[%X]: ", (int)self); + + return true; +} + +void +_wasm_log_vprintf (const char *fmt, va_list ap) +{ + wasm_vprintf (fmt, ap); +} + +void +_wasm_log_printf (const char *fmt, ...) +{ + va_list ap; + va_start (ap, fmt); + _wasm_log_vprintf (fmt, ap); + va_end (ap); +} + +void +_wasm_log_end () +{ + ws_mutex_unlock (&log_stream_lock); +} + +void +_wasm_log (int level, const char *file, int line, + const char *fmt, ...) +{ + if (_wasm_log_begin (level)) { + va_list ap; + + if (file) + _wasm_log_printf ("%s:%d ", file, line); + + va_start (ap, fmt); + _wasm_log_vprintf (fmt, ap); + va_end (ap); + + _wasm_log_end (); + } +} diff --git a/core/iwasm/runtime/utils/wasm_vector.c b/core/iwasm/runtime/utils/wasm_vector.c new file mode 100644 index 000000000..f04f4b3fb --- /dev/null +++ b/core/iwasm/runtime/utils/wasm_vector.c @@ -0,0 +1,217 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm_log.h" +#include "wasm_vector.h" +#include "wasm_memory.h" + + +static uint8* +alloc_vector_data(uint32 length, uint32 size_elem) +{ + uint64 total_size = ((uint64)size_elem) * length; + uint8 *data; + + if (total_size > UINT32_MAX) { + return NULL; + } + + if ((data = wasm_malloc((uint32)total_size))) { + memset(data, 0, (uint32)total_size); + } + + return data; +} + +static bool +extend_vector(Vector *vector, uint32 length) +{ + uint8 *data; + + if (length <= vector->max_elements) + return true; + + if (length < vector->size_elem * 3 / 2) + length = vector->size_elem * 3 / 2; + + if (!(data = alloc_vector_data(length, vector->size_elem))) { + return false; + } + + memcpy(data, vector->data, vector->size_elem * vector->max_elements); + free(vector->data); + vector->data = data; + vector->max_elements = length; + return true; +} + +bool +wasm_vector_init(Vector *vector, uint32 init_length, uint32 size_elem) +{ + if (!vector) { + LOG_ERROR("Init vector failed: vector is NULL.\n"); + return false; + } + + if (init_length == 0) { + init_length = 4; + } + + if (!(vector->data = alloc_vector_data(init_length, size_elem))) { + LOG_ERROR("Init vector failed: alloc memory failed.\n"); + return false; + } + + vector->size_elem = size_elem; + vector->max_elements = init_length; + vector->num_elements = 0; + return true; +} + +bool +wasm_vector_set(Vector *vector, uint32 index, const void *elem_buf) +{ + if (!vector || !elem_buf) { + LOG_ERROR("Set vector elem failed: vector or elem buf is NULL.\n"); + return false; + } + + if (index >= vector->num_elements) { + LOG_ERROR("Set vector elem failed: invalid elem index.\n"); + return false; + } + + memcpy(vector->data + vector->size_elem * index, + elem_buf, vector->size_elem); + return true; +} + +bool wasm_vector_get(const Vector *vector, uint32 index, void *elem_buf) +{ + if (!vector || !elem_buf) { + LOG_ERROR("Get vector elem failed: vector or elem buf is NULL.\n"); + return false; + } + + if (index >= vector->num_elements) { + LOG_ERROR("Get vector elem failed: invalid elem index.\n"); + return false; + } + + memcpy(elem_buf, vector->data + vector->size_elem * index, + vector->size_elem); + return true; +} + +bool wasm_vector_insert(Vector *vector, uint32 index, const void *elem_buf) +{ + uint32 i; + uint8 *p; + + if (!vector || !elem_buf) { + LOG_ERROR("Insert vector elem failed: vector or elem buf is NULL.\n"); + return false; + } + + if (index >= vector->num_elements) { + LOG_ERROR("Insert vector elem failed: invalid elem index.\n"); + return false; + } + + if (!extend_vector(vector, vector->num_elements + 1)) { + LOG_ERROR("Insert vector elem failed: extend vector failed.\n"); + return false; + } + + p = vector->data + vector->size_elem * vector->num_elements; + for (i = vector->num_elements - 1; i > index; i--) { + memcpy(p, p - vector->size_elem, vector->size_elem); + p -= vector->size_elem; + } + + memcpy(p, elem_buf, vector->size_elem); + vector->num_elements++; + return true; +} + +bool wasm_vector_append(Vector *vector, const void *elem_buf) +{ + if (!vector || !elem_buf) { + LOG_ERROR("Append vector elem failed: vector or elem buf is NULL.\n"); + return false; + } + + if (!extend_vector(vector, vector->num_elements + 1)) { + LOG_ERROR("Append ector elem failed: extend vector failed.\n"); + return false; + } + + memcpy(vector->data + vector->size_elem * vector->num_elements, + elem_buf, vector->size_elem); + vector->num_elements++; + return true; +} + +bool +wasm_vector_remove(Vector *vector, uint32 index, void *old_elem_buf) +{ + uint32 i; + uint8 *p; + + if (!vector) { + LOG_ERROR("Remove vector elem failed: vector is NULL.\n"); + return false; + } + + if (index >= vector->num_elements) { + LOG_ERROR("Remove vector elem failed: invalid elem index.\n"); + return false; + } + + p = vector->data + vector->size_elem * index; + + if (old_elem_buf) { + memcpy(old_elem_buf, p, vector->size_elem); + } + + for (i = index; i < vector->num_elements - 1; i++) { + memcpy(p, p + vector->size_elem, vector->size_elem); + p += vector->size_elem; + } + + vector->num_elements--; + return true; +} + +uint32 +wasm_vector_size(const Vector *vector) +{ + return vector ? vector->num_elements : 0; +} + +bool +wasm_vector_destroy(Vector *vector) +{ + if (!vector) { + LOG_ERROR("Destroy vector elem failed: vector is NULL.\n"); + return false; + } + + if (vector->data) + wasm_free(vector->data); + memset(vector, 0, sizeof(Vector)); + return true; +} diff --git a/core/iwasm/runtime/vmcore_wasm/invokeNative_general.c b/core/iwasm/runtime/vmcore_wasm/invokeNative_general.c new file mode 100644 index 000000000..19bc6951c --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/invokeNative_general.c @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-runtime.h" + +void invokeNative(uint32 argv[], uint32 argc, void (*native_code)()) +{ + WASMThread *self; + switch(argc) { + case 0: + native_code(); + break; + case 1: + native_code(argv[0]); + break; + case 2: + native_code(argv[0], argv[1]); + break; + case 3: + native_code(argv[0], argv[1], argv[2]); + break; + case 4: + native_code(argv[0], argv[1], argv[2], argv[3]); + break; + case 5: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4]); + break; + case 6: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]); + break; + case 7: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]); + break; + case 8: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]); + break; + case 9: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]); + break; + case 10: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]); + break; + case 11: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]); + break; + case 12: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]); + break; + case 13: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]); + break; + case 14: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]); + break; + case 15: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]); + break; + case 16: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14], argv[15]); + break; + case 17: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14], argv[15], argv[16]); + break; + case 18: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14], argv[15], argv[16], argv[17]); + break; + case 19: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14], argv[15], argv[16], argv[17], argv[18]); + break; + case 20: + native_code(argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14], argv[15], argv[16], argv[17], argv[18], argv[19]); + break; + default: + /* FIXME: If this happen, add more cases. */ + self = wasm_runtime_get_self(); + wasm_runtime_set_exception(self->module_inst, "the argument number of native function exceeds maximum"); + return; + } +} diff --git a/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s b/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s new file mode 100644 index 000000000..8c1d843e0 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/invokeNative_ia32.s @@ -0,0 +1,56 @@ +// Copyright (C) 2019 Intel Corporation. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Author: Ivan Volosyuk +// + .text + .align 2 +.globl invokeNative + .type invokeNative, @function +invokeNative: + + push %ebp + movl %esp, %ebp + push %ecx + movl 8(%ebp), %eax /* eax = argv */ + movl 12(%ebp), %ecx /* ecx = argc */ + test %ecx, %ecx + je restore_ecx /* if ecx == 0, skip pushing arguments */ + leal -4(%eax,%ecx,4), %eax /* eax = eax + ecx * 4 - 4 */ + subl %esp, %eax /* eax = eax - esp */ +1: + push 0(%esp,%eax) + loop 1b /* loop ecx counts */ +restore_ecx: + movl -4(%ebp), %ecx /* restore ecx */ + movl 16(%ebp), %eax /* eax = func_ptr */ + call *%eax + leave + ret + diff --git a/core/iwasm/runtime/vmcore_wasm/vmcore.cmake b/core/iwasm/runtime/vmcore_wasm/vmcore.cmake new file mode 100644 index 000000000..8e3d94ca9 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/vmcore.cmake @@ -0,0 +1,28 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (VMCORE_LIB_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${VMCORE_LIB_DIR}) +include_directories(${VMCORE_LIB_DIR}/../include) + +if (${BUILD_AS_64BIT_SUPPORT} STREQUAL "YES") +file (GLOB_RECURSE source_all ${VMCORE_LIB_DIR}/*.c) +else () +file (GLOB_RECURSE source_all ${VMCORE_LIB_DIR}/*.c ${VMCORE_LIB_DIR}/*.s) +list (REMOVE_ITEM source_all ${VMCORE_LIB_DIR}/invokeNative_general.c) +endif () + +set (VMCORE_LIB_SOURCE ${source_all}) + diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-application.c b/core/iwasm/runtime/vmcore_wasm/wasm-application.c new file mode 100644 index 000000000..5c43b8c8c --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-application.c @@ -0,0 +1,390 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include "wasm.h" +#include "wasm-interp.h" +#include "wasm-runtime.h" +#include "wasm-thread.h" +#include "wasm_assert.h" +#include "wasm_log.h" +#include "wasm_memory.h" +#include "wasm_platform_log.h" + + +static WASMFunctionInstance* +resolve_main_function(const WASMModuleInstance *module_inst) +{ + uint32 i; + for (i = 0; i < module_inst->export_func_count; i++) + if (!strcmp(module_inst->export_functions[i].name, "_main") + || !strcmp(module_inst->export_functions[i].name, "main")) + return module_inst->export_functions[i].function; + + LOG_ERROR("WASM execute application failed: main function not found.\n"); + return NULL; +} + +static bool +check_main_func_type(const WASMType *type) +{ + if (!(type->param_count == 0 || type->param_count == 2) + ||type->result_count > 1) { + LOG_ERROR("WASM execute application failed: invalid main function type.\n"); + return false; + } + + if (type->param_count == 2 + && !(type->types[0] == VALUE_TYPE_I32 + && type->types[1] == VALUE_TYPE_I32)) { + LOG_ERROR("WASM execute application failed: invalid main function type.\n"); + return false; + } + + if (type->result_count + && type->types[type->param_count] != VALUE_TYPE_I32) { + LOG_ERROR("WASM execute application failed: invalid main function type.\n"); + return false; + } + + return true; +} + +bool +wasm_application_execute_main(WASMModuleInstance *module_inst, + int argc, char *argv[]) +{ + WASMFunctionInstance *func = resolve_main_function(module_inst); + uint32 argc1 = 0, argv1[2] = { 0 }; + uint32 total_argv_size = 0, total_size; + int32 argv_buf_offset, i; + char *argv_buf, *p; + int32 *argv_offsets; + + if (!func || func->is_import_func) + return false; + + if (!check_main_func_type(func->u.func->func_type)) + return false; + + if (func->u.func->func_type->param_count) { + for (i = 0; i < argc; i++) + total_argv_size += strlen(argv[i]) + 1; + total_argv_size = align_uint(total_argv_size, 4); + + total_size = total_argv_size + sizeof(int32) * argc; + + if (!(argv_buf_offset = wasm_runtime_module_malloc(module_inst, total_size))) + return false; + + argv_buf = p = wasm_runtime_addr_app_to_native(module_inst, argv_buf_offset); + argv_offsets = (int32*)(p + total_argv_size); + + for (i = 0; i < argc; i++) { + memcpy(p, argv[i], strlen(argv[i]) + 1); + argv_offsets[i] = argv_buf_offset + (p - argv_buf); + p += strlen(argv[i]) + 1; + } + + argc1 = 2; + argv1[0] = argc; + argv1[1] = (uint32)wasm_runtime_addr_native_to_app(module_inst, argv_offsets); + } + + return wasm_runtime_call_wasm(module_inst, NULL, func, argc1, argv1); +} + +static WASMFunctionInstance* +resolve_function(const WASMModuleInstance *module_inst, char *name) +{ + uint32 i; + for (i = 0; i < module_inst->export_func_count; i++) + if (!strcmp(module_inst->export_functions[i].name, name)) + return module_inst->export_functions[i].function; + return NULL; +} + +union ieee754_float { + float f; + + /* This is the IEEE 754 single-precision format. */ + union { + struct { + unsigned int negative:1; + unsigned int exponent:8; + unsigned int mantissa:23; + } ieee_big_endian; + struct { + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int negative:1; + } ieee_little_endian; + } ieee; +}; + +union ieee754_double { + double d; + + /* This is the IEEE 754 double-precision format. */ + union { + struct { + unsigned int negative:1; + unsigned int exponent:11; + /* Together these comprise the mantissa. */ + unsigned int mantissa0:20; + unsigned int mantissa1:32; + } ieee_big_endian; + + struct { + /* Together these comprise the mantissa. */ + unsigned int mantissa1:32; + unsigned int mantissa0:20; + unsigned int exponent:11; + unsigned int negative:1; + } ieee_little_endian; + } ieee; +}; + +bool +wasm_application_execute_func(WASMModuleInstance *module_inst, + char *name, int argc, char *argv[]) +{ + WASMFunctionInstance *func; + WASMType *type; + uint32 argc1, *argv1; + int32 i, p; + const char *exception; + + wasm_assert(argc >= 0); + func = resolve_function(module_inst, name); + if (!func || func->is_import_func) { + LOG_ERROR("Wasm lookup function %s failed.\n", name); + return false; + } + + type = func->u.func->func_type; + if (type->param_count != (uint32)argc) { + LOG_ERROR("Wasm prepare param failed: invalid param count.\n"); + return false; + } + + argc1 = func->param_cell_num; + argv1 = wasm_malloc(sizeof(uint32) * (argc1 > 2 ? argc1 : 2)); + if (argv1 == NULL) { + LOG_ERROR("Wasm prepare param failed: malloc failed.\n"); + return false; + } + + /* Parse arguments */ + for (i = 0, p = 0; i < argc; i++) { + char *endptr; + wasm_assert(argv[i] != NULL); + if (argv[i][0] == '\0') { + LOG_ERROR("Wasm prepare param failed: invalid num (%s).\n", argv[i]); + goto fail; + } + switch (type->types[i]) { + case VALUE_TYPE_I32: + argv1[p++] = strtoul(argv[i], &endptr, 0); + break; + case VALUE_TYPE_I64: + { + union { uint64 val; uint32 parts[2]; } u; + u.val = strtoull(argv[i], &endptr, 0); + argv1[p++] = u.parts[0]; + argv1[p++] = u.parts[1]; + break; + } + case VALUE_TYPE_F32: + { + float32 f32 = strtof(argv[i], &endptr); + if (isnan(f32)) { + if (argv[i][0] == '-') { + f32 = -f32; + } + if (endptr[0] == ':') { + uint32 sig; + union ieee754_float u; + sig = strtoul(endptr + 1, &endptr, 0); + u.f = f32; + if (is_little_endian) + u.ieee.ieee_little_endian.mantissa = sig; + else + u.ieee.ieee_big_endian.mantissa = sig; + f32 = u.f; + } + } + *(float32*)&argv1[p++] = f32; + break; + } + case VALUE_TYPE_F64: + { + union { float64 val; uint32 parts[2]; } u; + u.val = strtod(argv[i], &endptr); + if (isnan(u.val)) { + if (argv[i][0] == '-') { + u.val = -u.val; + } + if (endptr[0] == ':') { + uint64 sig; + union ieee754_double ud; + sig = strtoull(endptr + 1, &endptr, 0); + ud.d = u.val; + if (is_little_endian) { + ud.ieee.ieee_little_endian.mantissa0 = sig >> 32; + ud.ieee.ieee_little_endian.mantissa1 = sig; + } + else { + ud.ieee.ieee_big_endian.mantissa0 = sig >> 32; + ud.ieee.ieee_big_endian.mantissa1 = sig; + } + u.val = ud.d; + } + } + argv1[p++] = u.parts[0]; + argv1[p++] = u.parts[1]; + break; + } + } + if (*endptr != '\0' && *endptr != '_') { + LOG_ERROR("Wasm prepare param failed: invalid num (%s).\n", argv[i]); + goto fail; + } + if (errno != 0) { + LOG_ERROR("Wasm prepare param failed: errno %d.\n", errno); + goto fail; + } + } + wasm_assert(p == (int32)argc1); + + wasm_runtime_set_exception(module_inst, NULL); + if (!wasm_runtime_call_wasm(module_inst, NULL, func, argc1, argv1)) { + exception = wasm_runtime_get_exception(module_inst); + wasm_printf("%s\n", exception); + goto fail; + } + + /* print return value */ + switch (type->types[type->param_count]) { + case VALUE_TYPE_I32: + wasm_printf("0x%x:i32", argv1[0]); + break; + case VALUE_TYPE_I64: + { + union { uint64 val; uint32 parts[2]; } u; + u.parts[0] = argv1[0]; + u.parts[1] = argv1[1]; + wasm_printf("0x%llx:i64", u.val); + break; + } + case VALUE_TYPE_F32: + wasm_printf("%.7g:f32", *(float32*)argv1); + break; + case VALUE_TYPE_F64: + { + union { float64 val; uint32 parts[2]; } u; + u.parts[0] = argv1[0]; + u.parts[1] = argv1[1]; + wasm_printf("%.7g:f64", u.val); + break; + } + } + wasm_printf("\n"); + + wasm_free(argv1); + return true; + +fail: + wasm_free(argv1); + return false; +} + +static bool +check_type(uint8 type, const char *p) +{ + const char *str = "i32"; + + if (strlen(p) < 3) + return false; + + switch (type) { + case VALUE_TYPE_I32: + str = "i32"; + break; + case VALUE_TYPE_I64: + str = "i64"; + break; + case VALUE_TYPE_F32: + str = "f32"; + break; + case VALUE_TYPE_F64: + str = "f64"; + break; + } + if (strncmp(p, str, 3)) + return false; + + return true; +} + +static bool +check_function_type(const WASMType *type, + const char *signature) +{ + uint32 i; + const char *p = signature; + + if (!p || *p++ != '(') + return false; + + for (i = 0; i < type->param_count; i++) { + if (!check_type(type->types[i], p)) + return false; + p += 3; + } + + if (*p++ != ')') + return false; + + if (type->result_count) { + if (!check_type(type->types[type->param_count], p)) + return false; + p += 3; + } + + if (*p != '\0') + return false; + + return true; +} + +WASMFunctionInstance* +wasm_runtime_lookup_function(const WASMModuleInstance *module_inst, + const char *name, + const char *signature) +{ + uint32 i; + for (i = 0; i < module_inst->export_func_count; i++) + if (!strcmp(module_inst->export_functions[i].name, name) + && check_function_type( + module_inst->export_functions[i].function->u.func->func_type, + signature)) + return module_inst->export_functions[i].function; + return NULL; +} + diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-interp.c b/core/iwasm/runtime/vmcore_wasm/wasm-interp.c new file mode 100644 index 000000000..6f86bc7f5 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-interp.c @@ -0,0 +1,2160 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-interp.h" +#include "wasm-runtime.h" +#include "wasm-thread.h" +#include "wasm-opcode.h" +#include "wasm-loader.h" +#include "wasm_log.h" +#include "wasm_memory.h" + +typedef int32 CellType_I32; +typedef int64 CellType_I64; +typedef float32 CellType_F32; +typedef float64 CellType_F64; + +#define BR_TABLE_TMP_BUF_LEN 32 + +/* 64-bit Memory accessors. */ +#if WASM_CPU_SUPPORTS_UNALIGNED_64BIT_ACCESS != 0 +#define PUT_I64_TO_ADDR(addr, value) do { \ + *(int64*)(addr) = (int64)(value); \ + } while (0) + +#define PUT_F64_TO_ADDR(addr, value) do { \ + *(float64*)(addr) = (float64)(value); \ + } while (0) + +#define GET_I64_FROM_ADDR(addr) (*(int64*)(addr)) +#define GET_F64_FROM_ADDR(addr) (*(float64*)(addr)) +#else /* WASM_CPU_SUPPORTS_UNALIGNED_64BIT_ACCESS != 0 */ +#define PUT_I64_TO_ADDR(addr, value) do { \ + union { int64 val; uint32 parts[2]; } u; \ + u.val = (value); \ + (addr)[0] = u.parts[0]; \ + (addr)[1] = u.parts[1]; \ + } while (0) +#define PUT_F64_TO_ADDR(addr, value) do { \ + union { float64 val; uint32 parts[2]; } u; \ + u.val = (value); \ + (addr)[0] = u.parts[0]; \ + (addr)[1] = u.parts[1]; \ + } while (0) + +static inline int64 +GET_I64_FROM_ADDR(uint32 *addr) +{ + union { int64 val; uint32 parts[2]; } u; + u.parts[0] = addr[0]; + u.parts[1] = addr[1]; + return u.val; +} + +static inline float64 +GET_F64_FROM_ADDR (uint32 *addr) +{ + union { float64 val; uint32 parts[2]; } u; + u.parts[0] = addr[0]; + u.parts[1] = addr[1]; + return u.val; +} +#endif /* WASM_CPU_SUPPORTS_UNALIGNED_64BIT_ACCESS != 0 */ + +#define is_valid_addr(memory, heap, addr) \ + (memory->base_addr <= addr && addr <= memory->end_addr) \ + +#define CHECK_MEMORY_OVERFLOW() do { \ + uint8 *maddr1; \ + if (flags != 2) \ + LOG_VERBOSE("unaligned load/store in wasm interp, flag is: %d.\n", flags);\ + if (offset + addr < addr) { \ + wasm_runtime_set_exception(module, "out of bounds memory access"); \ + goto got_exception; \ + } \ + maddr = memory->memory_data + (offset + addr); \ + if (!is_valid_addr(memory, NULL, maddr)) { \ + wasm_runtime_set_exception(module, "out of bounds memory access"); \ + goto got_exception; \ + } \ + maddr1 = maddr + LOAD_SIZE[opcode - WASM_OP_I32_LOAD]; \ + if (!is_valid_addr(memory, NULL, maddr1)) { \ + wasm_runtime_set_exception(module, "out of bounds memory access"); \ + goto got_exception; \ + } \ + } while (0) + +static inline uint32 +rotl32(uint32 n, unsigned int c) +{ + const unsigned int mask = (31); + c = c % 32; + c &= mask; + return (n<>( (-c)&mask )); +} + +static inline uint32 +rotr32(uint32 n, unsigned int c) +{ + const unsigned int mask = (31); + c = c % 32; + c &= mask; + return (n>>c) | (n<<( (-c)&mask )); +} + +static inline uint64 +rotl64(uint64 n, unsigned int c) +{ + const unsigned int mask = (63); + c = c % 64; + c &= mask; + return (n<>( (-c)&mask )); +} + +static inline uint64 +rotr64(uint64 n, unsigned int c) +{ + const unsigned int mask = (63); + c = c % 64; + c &= mask; + return (n>>c) | (n<<( (-c)&mask )); +} + +static inline double +wa_fmax(double a, double b) +{ + double c = fmax(a, b); + if (c==0 && a==b) + return signbit(a) ? b : a; + return c; +} + +static inline double +wa_fmin(double a, double b) +{ + double c = fmin(a, b); + if (c==0 && a==b) + return signbit(a) ? a : b; + return c; +} + +static inline uint32 +clz32(uint32 type) +{ + uint32 num = 0; + if (type == 0) + return 32; + while (!(type & 0x80000000)) { + num++; + type <<= 1; + } + return num; +} + +static inline uint32 +clz64(uint64 type) +{ + uint32 num = 0; + if (type == 0) + return 64; + while (!(type & 0x8000000000000000LL)) { + num++; + type <<= 1; + } + return num; +} + +static inline uint32 +ctz32(uint32 type) +{ + uint32 num = 0; + if (type == 0) + return 32; + while (!(type & 1)) { + num++; + type >>= 1; + } + return num; +} + +static inline uint32 +ctz64(uint64 type) +{ + uint32 num = 0; + if (type == 0) + return 64; + while (!(type & 1)) { + num++; + type >>= 1; + } + return num; +} + +static inline uint32 +popcount32(uint32 u) +{ + uint32 ret = 0; + while (u) { + u = (u & (u - 1)); + ret++; + } + return ret; +} + +static inline uint32 +popcount64(uint64 u) +{ + uint32 ret = 0; + while (u) { + u = (u & (u - 1)); + ret++; + } + return ret; +} + +static inline WASMGlobalInstance* +get_global(const WASMModuleInstance *module, uint32 global_idx) +{ + if (global_idx >= module->global_count) + return NULL; + + return module->globals + global_idx; +} + +static inline uint8* +get_global_addr(WASMMemoryInstance *memory, WASMGlobalInstance *global) +{ + return memory->global_data + global->data_offset; +} + +static uint64 +read_leb(const uint8 *buf, uint32 *p_offset, uint32 maxbits, bool sign) +{ + uint64 result = 0; + uint32 shift = 0; + uint32 bcnt = 0; + uint64 byte; + + while (true) { + byte = buf[*p_offset]; + *p_offset += 1; + result |= ((byte & 0x7f) << shift); + shift += 7; + if ((byte & 0x80) == 0) { + break; + } + bcnt += 1; + } + if (sign && (shift < maxbits) && (byte & 0x40)) { + /* Sign extend */ + result |= - (1 << shift); + } + return result; +} + +#define PUSH_I32(value) do { \ + *(int32*)frame_sp++ = (int32)(value); \ + } while (0) + +#define PUSH_F32(value) do { \ + *(float32*)frame_sp++ = (float32)(value); \ + } while (0) + +#define PUSH_I64(value) do { \ + PUT_I64_TO_ADDR(frame_sp, value); \ + frame_sp += 2; \ + } while (0) + +#define PUSH_F64(value) do { \ + PUT_F64_TO_ADDR(frame_sp, value); \ + frame_sp += 2; \ + } while (0) + +#define PUSH_CSP(type, ret_type, start, else_, end) do {\ + wasm_assert(frame_csp < frame->csp_boundary); \ + frame_csp->block_type = type; \ + frame_csp->return_type = ret_type; \ + frame_csp->start_addr = start; \ + frame_csp->else_addr = else_; \ + frame_csp->end_addr = end; \ + frame_csp->frame_sp = frame_sp; \ + frame_csp++; \ + } while (0) + +#define POP_I32() (--frame_sp, *(int32*)frame_sp) + +#define POP_F32() (--frame_sp, *(float32*)frame_sp) + +#define POP_I64() (frame_sp -= 2, GET_I64_FROM_ADDR(frame_sp)) + +#define POP_F64() (frame_sp -= 2, GET_F64_FROM_ADDR(frame_sp)) + +#define POP_CSP_CHECK_OVERFLOW(n) do { \ + wasm_assert(frame_csp - n >= frame->csp_bottom); \ + } while (0) + +#define POP_CSP() do { \ + POP_CSP_CHECK_OVERFLOW(1); \ + --frame_csp; \ + } while (0) + +#define POP_CSP_N(n) do { \ + uint32 *frame_sp_old = frame_sp; \ + POP_CSP_CHECK_OVERFLOW(n + 1); \ + frame_csp -= n; \ + if ((frame_csp - 1)->block_type != BLOCK_TYPE_LOOP) \ + /* block block/if/function, jump to end of block */ \ + frame_ip = (frame_csp - 1)->end_addr; \ + else /* loop block, jump to start of block */ \ + frame_ip = (frame_csp - 1)->start_addr; \ + /* copy return value of block */ \ + frame_sp = (frame_csp - 1)->frame_sp; \ + switch ((frame_csp - 1)->return_type) { \ + case VALUE_TYPE_I32: \ + PUSH_I32(*(frame_sp_old - 1)); \ + break; \ + case VALUE_TYPE_I64: \ + PUSH_I64(GET_I64_FROM_ADDR(frame_sp_old - 2)); \ + break; \ + case VALUE_TYPE_F32: \ + PUSH_F32(*(float32*)(frame_sp_old - 1)); \ + break; \ + case VALUE_TYPE_F64: \ + PUSH_F64(GET_F64_FROM_ADDR(frame_sp_old - 2)); \ + break; \ + } \ + } while (0) + +#define local_off(n) (frame_lp + cur_func->local_offsets[n]) + +#define LOCAL_I32(n) (*(int32*)(local_off(n))) + +#define SET_LOCAL_I32(N, val) do { \ + int n = (N); \ + *(int32*)(local_off(n)) = (int32)(val); \ + } while (0) + +#define LOCAL_F32(n) (*(float32*)(local_off(n))) + +#define SET_LOCAL_F32(N, val) do { \ + int n = (N); \ + *(float32*)(local_off(n)) = (float32)(val); \ + } while (0) + +#define LOCAL_I64(n) (GET_I64_FROM_ADDR(local_off(n))) + +#define SET_LOCAL_I64(N, val) do { \ + int n = (N); \ + PUT_I64_TO_ADDR(local_off(n), val); \ + } while (0) + +#define LOCAL_F64(n) (GET_F64_FROM_ADDR(local_off(n))) + +#define SET_LOCAL_F64(N, val) do { \ + int n = (N); \ + PUT_F64_TO_ADDR(local_off(n), val); \ + } while (0) + +/* Pop the given number of elements from the given frame's stack. */ +#define POP(N) do { \ + int n = (N); \ + frame_sp -= n; \ + } while (0) + +#define SYNC_ALL_TO_FRAME() do { \ + frame->sp = frame_sp; \ + frame->ip = frame_ip; \ + frame->csp = frame_csp; \ + } while (0) + +#define UPDATE_ALL_FROM_FRAME() do { \ + frame_sp = frame->sp; \ + frame_ip = frame->ip; \ + frame_csp = frame->csp; \ + } while (0) + +#define read_leb_uint64(p, p_end, res) do { \ + uint32 _off = 0; \ + res = read_leb(p, &_off, 64, false); \ + p += _off; \ +} while (0) + +#define read_leb_int64(p, p_end, res) do { \ + uint32 _off = 0; \ + res = (int64)read_leb(p, &_off, 64, true); \ + p += _off; \ +} while (0) + +#define read_leb_uint32(p, p_end, res) do { \ + uint32 _off = 0; \ + res = (uint32)read_leb(p, &_off, 32, false); \ + p += _off; \ +} while (0) + +#define read_leb_int32(p, p_end, res) do { \ + uint32 _off = 0; \ + res = (int32)read_leb(p, &_off, 32, true); \ + p += _off; \ +} while (0) + +#define read_leb_uint8(p, p_end, res) do { \ + uint32 _off = 0; \ + res = (uint8)read_leb(p, &_off, 7, false); \ + p += _off; \ +} while (0) + +#define RECOVER_CONTEXT(new_frame) do { \ + frame = (new_frame); \ + cur_func = frame->function; \ + prev_frame = frame->prev_frame; \ + frame_ip = frame->ip; \ + frame_ip_end = wasm_runtime_get_func_code_end(cur_func); \ + frame_lp = frame->lp; \ + frame_sp = frame->sp; \ + frame_csp = frame->csp; \ + } while (0) + +#if WASM_ENABLE_LABELS_AS_VALUES != 0 +#define GET_OPCODE() opcode = *(frame_ip - 1); +#else +#define GET_OPCODE() (void)0 +#endif + +#define DEF_OP_LOAD(operation) do { \ + uint32 offset, flags, addr; \ + GET_OPCODE(); \ + read_leb_uint32(frame_ip, frame_ip_end, flags); \ + read_leb_uint32(frame_ip, frame_ip_end, offset); \ + addr = POP_I32(); \ + CHECK_MEMORY_OVERFLOW(); \ + operation; \ + (void)flags; \ + } while (0) + +#define DEF_OP_STORE(sval_type, sval_op_type, operation) do { \ + uint32 offset, flags, addr; \ + sval_type sval; \ + GET_OPCODE(); \ + read_leb_uint32(frame_ip, frame_ip_end, flags); \ + read_leb_uint32(frame_ip, frame_ip_end, offset); \ + sval = POP_##sval_op_type(); \ + addr = POP_I32(); \ + CHECK_MEMORY_OVERFLOW(); \ + operation; \ + (void)flags; \ + } while (0) + +#define DEF_OP_I_CONST(ctype, src_op_type) do { \ + ctype cval; \ + read_leb_##ctype(frame_ip, frame_ip_end, cval); \ + PUSH_##src_op_type(cval); \ + } while (0) + +#define DEF_OP_EQZ(src_op_type) do { \ + uint32 val; \ + val = POP_##src_op_type() == 0; \ + PUSH_I32(val); \ + } while (0) + +#define DEF_OP_CMP(src_type, src_op_type, cond) do { \ + uint32 res; \ + src_type val1, val2; \ + val2 = POP_##src_op_type(); \ + val1 = POP_##src_op_type(); \ + res = val1 cond val2; \ + PUSH_I32(res); \ + } while (0) + +#define DEF_OP_BIT_COUNT(src_type, src_op_type, operation) do { \ + src_type val1, val2; \ + val1 = POP_##src_op_type(); \ + val2 = operation(val1); \ + PUSH_##src_op_type(val2); \ + } while (0) + +#define DEF_OP_NUMERIC(src_type1, src_type2, src_op_type, operation) do { \ + frame_sp -= sizeof(src_type2)/sizeof(uint32); \ + *(src_type1*)(frame_sp - sizeof(src_type1)/sizeof(uint32)) operation##= \ + *(src_type2*)(frame_sp); \ + } while (0) + +#define DEF_OP_MATH(src_type, src_op_type, method) do { \ + src_type val; \ + val = POP_##src_op_type(); \ + PUSH_##src_op_type(method(val)); \ + } while (0) + +#define DEF_OP_TRUNC(dst_type, dst_op_type, src_type, src_op_type, \ + min_cond, max_cond) do { \ + src_type value = POP_##src_op_type(); \ + if (isnan(value)) { \ + wasm_runtime_set_exception(module, \ + "invalid conversion to integer"); \ + goto got_exception; \ + } \ + else if (value min_cond || value max_cond) { \ + wasm_runtime_set_exception(module, "integer overflow"); \ + goto got_exception; \ + } \ + PUSH_##dst_op_type(((dst_type)value)); \ + } while (0) + +#define DEF_OP_CONVERT(dst_type, dst_op_type, \ + src_type, src_op_type) do { \ + dst_type value = (dst_type)(src_type)POP_##src_op_type(); \ + PUSH_##dst_op_type(value); \ + } while (0) + +#define GET_LOCAL_INDEX_AND_TYPE() do { \ + param_count = cur_func->u.func->func_type->param_count; \ + local_count = cur_func->u.func->local_count; \ + read_leb_uint32(frame_ip, frame_ip_end, local_idx); \ + wasm_assert(local_idx < param_count + local_count); \ + if (local_idx < param_count) \ + local_type = cur_func->u.func->func_type->types[local_idx]; \ + else \ + local_type = \ + cur_func->u.func->local_types[local_idx - param_count]; \ + } while (0) + +static inline int32 +sign_ext_8_32(int8 val) +{ + if (val & 0x80) + return val | 0xffffff00; + return val; +} + +static inline int32 +sign_ext_16_32(int16 val) +{ + if (val & 0x8000) + return val | 0xffff0000; + return val; +} + +static inline int64 +sign_ext_8_64(int8 val) +{ + if (val & 0x80) + return val | 0xffffffffffffff00; + return val; +} + +static inline int64 +sign_ext_16_64(int16 val) +{ + if (val & 0x8000) + return val | 0xffffffffffff0000; + return val; +} + +static inline int64 +sign_ext_32_64(int32 val) +{ + if (val & 0x80000000) + return val | 0xffffffff00000000; + return val; +} + +static inline void +word_copy(uint32 *dest, uint32 *src, unsigned num) +{ + for (; num > 0; num--) + *dest++ = *src++; +} + +static inline WASMInterpFrame* +ALLOC_FRAME(WASMThread *self, uint32 size, WASMInterpFrame *prev_frame) +{ + WASMInterpFrame *frame = wasm_thread_alloc_wasm_frame(self, size); + + if (frame) + frame->prev_frame = prev_frame; + else { + wasm_runtime_set_exception(self->module_inst, + "WASM interp failed, alloc frame failed."); + } + + return frame; +} + +static inline void +FREE_FRAME(WASMThread *self, WASMInterpFrame *frame) +{ + wasm_thread_free_wasm_frame(self, frame); +} + +typedef void (*GenericFunctionPointer)(); +int64 invokeNative(uint32 *args, uint32 sz, GenericFunctionPointer f); + +typedef float64 (*Float64FuncPtr)(uint32*, uint32, GenericFunctionPointer); +typedef float32 (*Float32FuncPtr)(uint32*, uint32, GenericFunctionPointer); +typedef int64 (*Int64FuncPtr)(uint32*, uint32, GenericFunctionPointer); +typedef int32 (*Int32FuncPtr)(uint32*, uint32, GenericFunctionPointer); +typedef void (*VoidFuncPtr)(uint32*, uint32, GenericFunctionPointer); + +static Int64FuncPtr invokeNative_Int64 = (Int64FuncPtr)invokeNative; +static Int32FuncPtr invokeNative_Int32 = (Int32FuncPtr)invokeNative; +static Float64FuncPtr invokeNative_Float64 = (Float64FuncPtr)invokeNative; +static Float32FuncPtr invokeNative_Float32 = (Float32FuncPtr)invokeNative; +static VoidFuncPtr invokeNative_Void = (VoidFuncPtr)invokeNative; + +static void +wasm_interp_call_func_native(WASMThread *self, + WASMFunctionInstance *cur_func, + WASMInterpFrame *prev_frame) +{ + unsigned local_cell_num = 2; + WASMInterpFrame *frame; + typedef void (*F)(WASMThread*, uint32 *argv); + union { F f; void *v; } u; + uint32 argv_buf[32], *argv, argc = cur_func->param_cell_num; + + if (!(frame = ALLOC_FRAME + (self, wasm_interp_interp_frame_size(local_cell_num), prev_frame))) + return; + + frame->function = cur_func; + frame->ip = NULL; + frame->sp = frame->lp + local_cell_num; + + wasm_thread_set_cur_frame (self, frame); + + if (argc <= 32) + argv = argv_buf; + else { + if (!(argv = wasm_malloc(sizeof(uint32) * argc))) { + wasm_runtime_set_exception(self->module_inst, + "WASM call native failed: alloc memory for argv failed."); + return; + } + } + + word_copy(argv, frame->lp, argc); + + u.v = cur_func->u.func_import->func_ptr_linked; + { + WASMType *func_type = cur_func->u.func_import->func_type; + uint8 ret_type = func_type->result_count + ? func_type->types[func_type->param_count] + : VALUE_TYPE_VOID; + GenericFunctionPointer f = (GenericFunctionPointer)(uintptr_t)u.v; + + if (func_type->result_count == 0) { + invokeNative_Void(argv, argc, f); + } + else { + switch (ret_type) { + case VALUE_TYPE_I32: + argv[0] = invokeNative_Int32(argv, argc, f); + break; + case VALUE_TYPE_I64: + PUT_I64_TO_ADDR(argv, invokeNative_Int64(argv, argc, f)); + break; + case VALUE_TYPE_F32: + *(float32*)argv = invokeNative_Float32(argv, argc, f); + break; + case VALUE_TYPE_F64: + PUT_F64_TO_ADDR(argv, invokeNative_Float64(argv, argc, f)); + break; + } + } + } + + if (cur_func->ret_cell_num == 1) { + prev_frame->sp[0] = argv[0]; + prev_frame->sp++; + } + else if (cur_func->ret_cell_num == 2) { + prev_frame->sp[0] = argv[0]; + prev_frame->sp[1] = argv[1]; + prev_frame->sp += 2; + } + + if (argc > 32) + wasm_free(argv); + + FREE_FRAME(self, frame); + wasm_thread_set_cur_frame(self, prev_frame); +} + +#if WASM_ENABLE_LABELS_AS_VALUES != 0 + +#define HANDLE_OP(opcode) HANDLE_##opcode +#define FETCH_OPCODE_AND_DISPATCH() goto *handle_table[*frame_ip++] +#define HANDLE_OP_END() FETCH_OPCODE_AND_DISPATCH() + +#else /* else of WASM_ENABLE_LABELS_AS_VALUES */ + +#define HANDLE_OP(opcode) case opcode +#define HANDLE_OP_END() continue + +#endif /* end of WASM_ENABLE_LABELS_AS_VALUES */ + +static void +wasm_interp_call_func_bytecode(WASMThread *self, + WASMFunctionInstance *cur_func, + WASMInterpFrame *prev_frame) +{ + WASMModuleInstance *module = self->module_inst; + WASMMemoryInstance *memory = module->default_memory; + WASMTableInstance *table = module->default_table; + uint8 opcode_IMPDEP2 = WASM_OP_IMPDEP2; + WASMInterpFrame *frame = NULL; + /* Points to this special opcode so as to jump to the + call_method_from_entry. */ + register uint8 *frame_ip = &opcode_IMPDEP2; /* cache of frame->ip */ + register uint32 *frame_lp = NULL; /* cache of frame->lp */ + register uint32 *frame_sp = NULL; /* cache of frame->sp */ + WASMBranchBlock *frame_csp = NULL; + uint8 *frame_ip_end = frame_ip + 1; + uint8 opcode, block_ret_type; + uint32 *depths = NULL; + uint32 depth_buf[BR_TABLE_TMP_BUF_LEN]; + uint32 i, depth, cond, count, fidx, tidx, frame_size = 0, all_cell_num = 0; + int32 didx, val; + uint8 *else_addr, *end_addr; + uint8 *maddr; + +#if WASM_ENABLE_LABELS_AS_VALUES != 0 + #define HANDLE_OPCODE(op) &&HANDLE_##op + DEFINE_GOTO_TABLE (handle_table); + #undef HANDLE_OPCODE +#endif + + /* Size of memory load. + This starts with the first memory load operator at opcode 0x28 */ + uint32 LOAD_SIZE[] = { + 4, 8, 4, 8, 1, 1, 2, 2, 1, 1, 2, 2, 4, 4, /* loads */ + 4, 8, 4, 8, 1, 2, 1, 2, 4 }; /* stores */ + +#if WASM_ENABLE_LABELS_AS_VALUES == 0 + while (frame_ip < frame_ip_end) { + opcode = *frame_ip++; + switch (opcode) { +#else + FETCH_OPCODE_AND_DISPATCH (); +#endif + /* control instructions */ + HANDLE_OP (WASM_OP_UNREACHABLE): + wasm_runtime_set_exception(module, "unreachable"); + goto got_exception; + + HANDLE_OP (WASM_OP_NOP): + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_BLOCK): + read_leb_uint32(frame_ip, frame_ip_end, block_ret_type); + + if (!wasm_loader_find_block_addr(module->branch_set, frame_ip, + frame_ip_end, BLOCK_TYPE_BLOCK, + &else_addr, &end_addr, + NULL, 0)) { + wasm_runtime_set_exception(module, "wasm loader find block addr failed"); + goto got_exception; + } + + PUSH_CSP(BLOCK_TYPE_BLOCK, block_ret_type, frame_ip, NULL, end_addr); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_LOOP): + read_leb_uint32(frame_ip, frame_ip_end, block_ret_type); + + if (!wasm_loader_find_block_addr(module->branch_set, frame_ip, + frame_ip_end, BLOCK_TYPE_LOOP, + &else_addr, &end_addr, + NULL, 0)) { + wasm_runtime_set_exception(module, "wasm loader find block addr failed"); + goto got_exception; + } + + PUSH_CSP(BLOCK_TYPE_LOOP, block_ret_type, frame_ip, NULL, end_addr); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_IF): + read_leb_uint32(frame_ip, frame_ip_end, block_ret_type); + + if (!wasm_loader_find_block_addr(module->branch_set, frame_ip, + frame_ip_end, BLOCK_TYPE_IF, + &else_addr, &end_addr, + NULL, 0)) { + wasm_runtime_set_exception(module, "wasm loader find block addr failed"); + goto got_exception; + } + + cond = POP_I32(); + + PUSH_CSP(BLOCK_TYPE_IF, block_ret_type, frame_ip, else_addr, end_addr); + + /* condition of the if branch is false, else condition is met */ + if (cond == 0) { + /* if there is no else branch, go to the end addr */ + if (else_addr == NULL) { + POP_CSP(); + frame_ip = end_addr + 1; + } + /* if there is an else branch, go to the else addr */ + else + frame_ip = else_addr + 1; + } + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_ELSE): + /* comes from the if branch in WASM_OP_IF */ + frame_ip = (frame_csp - 1)->end_addr; + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_END): + if (frame_csp > frame->csp_bottom + 1) { + POP_CSP(); + } + else { /* end of function, treat as WASM_OP_RETURN */ + frame_sp -= cur_func->ret_cell_num; + for (i = 0; i < cur_func->ret_cell_num; i++) { + *prev_frame->sp++ = frame_sp[i]; + } + goto return_func; + } + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_BR): + read_leb_uint32(frame_ip, frame_ip_end, depth); + POP_CSP_N(depth); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_BR_IF): + read_leb_uint32(frame_ip, frame_ip_end, depth); + cond = POP_I32(); + if (cond) + POP_CSP_N(depth); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_BR_TABLE): + read_leb_uint32(frame_ip, frame_ip_end, count); + if (count <= BR_TABLE_TMP_BUF_LEN) + depths = depth_buf; + else { + if (!(depths = wasm_malloc(sizeof(uint32) * count))) { + wasm_runtime_set_exception(module, "WASM interp failed, " + "alloc block memory for br_table failed."); + goto got_exception; + } + } + for (i = 0; i < count; i++) { + read_leb_uint32(frame_ip, frame_ip_end, depths[i]); + } + read_leb_uint32(frame_ip, frame_ip_end, depth); + didx = POP_I32(); + if (didx >= 0 && (uint32)didx < count) { + depth = depths[didx]; + } + if (depths != depth_buf) { + wasm_free(depths); + depths = NULL; + } + POP_CSP_N(depth); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_RETURN): + frame_sp -= cur_func->ret_cell_num; + for (i = 0; i < cur_func->ret_cell_num; i++) { + *prev_frame->sp++ = frame_sp[i]; + } + goto return_func; + + HANDLE_OP (WASM_OP_CALL): + read_leb_uint32(frame_ip, frame_ip_end, fidx); + wasm_assert(fidx < module->function_count); + cur_func = module->functions + fidx; + goto call_func_from_interp; + + HANDLE_OP (WASM_OP_CALL_INDIRECT): + { + WASMType *cur_type, *cur_func_type; + /* TODO: test */ + read_leb_uint32(frame_ip, frame_ip_end, tidx); + if (tidx >= module->module->type_count) { + wasm_runtime_set_exception(module, "type index is overflow"); + goto got_exception; + } + cur_type = module->module->types[tidx]; + + /* to skip 0x00 here */ + frame_ip++; + val = POP_I32(); + + if (val < 0 || val >= (int32)table->cur_size) { + wasm_runtime_set_exception(module, "undefined element"); + goto got_exception; + } + + fidx = ((uint32*)table->base_addr)[val]; + if (fidx >= module->function_count) { + wasm_runtime_set_exception(module, "function index is overflow"); + goto got_exception; + } + + cur_func = module->functions + fidx; + + if (cur_func->is_import_func) + cur_func_type = cur_func->u.func_import->func_type; + else + cur_func_type = cur_func->u.func->func_type; + if (!wasm_type_equal(cur_type, cur_func_type)) { + wasm_runtime_set_exception(module, "indirect call type mismatch"); + goto got_exception; + } + goto call_func_from_interp; + } + + /* parametric instructions */ + HANDLE_OP (WASM_OP_DROP): + { + wasm_runtime_set_exception(module, + "wasm interp failed: unsupported opcode"); + goto got_exception; + } + + HANDLE_OP (WASM_OP_DROP_32): + { + frame_sp--; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_DROP_64): + { + frame_sp -= 2; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_SELECT): + { + wasm_runtime_set_exception(module, + "wasm interp failed: unsupported opcode"); + goto got_exception; + } + + HANDLE_OP (WASM_OP_SELECT_32): + { + cond = POP_I32(); + frame_sp--; + if (!cond) + *(frame_sp - 1) = *frame_sp; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_SELECT_64): + { + cond = POP_I32(); + frame_sp -= 2; + if (!cond) { + *(frame_sp - 2) = *frame_sp; + *(frame_sp - 1) = *(frame_sp + 1); + } + HANDLE_OP_END (); + } + + /* variable instructions */ + HANDLE_OP (WASM_OP_GET_LOCAL): + { + uint32 local_idx, param_count, local_count; + uint8 local_type; + + GET_LOCAL_INDEX_AND_TYPE(); + + switch (local_type) { + case VALUE_TYPE_I32: + PUSH_I32(LOCAL_I32(local_idx)); + break; + case VALUE_TYPE_F32: + PUSH_F32(LOCAL_F32(local_idx)); + break; + case VALUE_TYPE_I64: + PUSH_I64(LOCAL_I64(local_idx)); + break; + case VALUE_TYPE_F64: + PUSH_F64(LOCAL_F64(local_idx)); + break; + default: + wasm_runtime_set_exception(module, + "get local type is invalid"); + goto got_exception; + } + (void)local_count; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_SET_LOCAL): + { + uint32 local_idx, param_count, local_count; + uint8 local_type; + + GET_LOCAL_INDEX_AND_TYPE(); + + switch (local_type) { + case VALUE_TYPE_I32: + SET_LOCAL_I32(local_idx, POP_I32()); + break; + case VALUE_TYPE_F32: + SET_LOCAL_F32(local_idx, POP_F32()); + break; + case VALUE_TYPE_I64: + SET_LOCAL_I64(local_idx, POP_I64()); + break; + case VALUE_TYPE_F64: + SET_LOCAL_F64(local_idx, POP_F64()); + break; + default: + wasm_runtime_set_exception(module, + "set local type is invalid"); + goto got_exception; + } + (void)local_count; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_TEE_LOCAL): + { + uint32 local_idx, param_count, local_count; + uint8 local_type; + + GET_LOCAL_INDEX_AND_TYPE(); + + switch (local_type) { + case VALUE_TYPE_I32: + SET_LOCAL_I32(local_idx, *(frame_sp - 1)); + break; + case VALUE_TYPE_F32: + SET_LOCAL_F32(local_idx, *(float32*)(frame_sp - 1)); + break; + case VALUE_TYPE_I64: + SET_LOCAL_I64(local_idx, GET_I64_FROM_ADDR(frame_sp - 2)); + break; + case VALUE_TYPE_F64: + SET_LOCAL_F64(local_idx, GET_F64_FROM_ADDR(frame_sp - 2)); + break; + default: + wasm_runtime_set_exception(module, "tee local type is invalid"); + goto got_exception; + } + (void)local_count; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_GET_GLOBAL): + { + WASMGlobalInstance *global; + uint32 global_idx; + + read_leb_uint32(frame_ip, frame_ip_end, global_idx); + + global = get_global(module, global_idx); + wasm_assert(global && global_idx < module->global_count); + + switch (global->type) { + case VALUE_TYPE_I32: + PUSH_I32(*(uint32*)get_global_addr(memory, global)); + break; + case VALUE_TYPE_F32: + PUSH_F32(*(float32*)get_global_addr(memory, global)); + break; + case VALUE_TYPE_I64: + PUSH_I64(*(uint64*)get_global_addr(memory, global)); + break; + case VALUE_TYPE_F64: + PUSH_F64(*(float64*)get_global_addr(memory, global)); + break; + default: + wasm_runtime_set_exception(module, "get global type is invalid"); + goto got_exception; + } + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_SET_GLOBAL): + { + WASMGlobalInstance *global; + uint32 global_idx; + uint8 *global_addr; + + read_leb_uint32(frame_ip, frame_ip_end, global_idx); + + global = get_global(module, global_idx); + wasm_assert(global && global_idx < module->global_count); + + global_addr = get_global_addr(memory, global); + switch (global->type) { + case VALUE_TYPE_I32: + *(uint32*)global_addr = POP_I32(); + break; + case VALUE_TYPE_F32: + *(float32*)global_addr = POP_F32(); + break; + case VALUE_TYPE_I64: + PUT_I64_TO_ADDR((uint32*)global_addr, POP_I64()); + break; + case VALUE_TYPE_F64: + PUT_F64_TO_ADDR((uint32*)global_addr, POP_F64()); + break; + default: + wasm_runtime_set_exception(module, "set global index is overflow"); + goto got_exception; + } + HANDLE_OP_END (); + } + + /* memory load instructions */ + HANDLE_OP (WASM_OP_I32_LOAD): + DEF_OP_LOAD(PUSH_I32(*(int32*)maddr)); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD): + DEF_OP_LOAD(PUSH_I64(GET_I64_FROM_ADDR((uint32*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_LOAD): + DEF_OP_LOAD(PUSH_F32(*(float32*)maddr)); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_LOAD): + DEF_OP_LOAD(PUSH_F64(GET_F64_FROM_ADDR((uint32*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LOAD8_S): + DEF_OP_LOAD(PUSH_I32(sign_ext_8_32(*(int8*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LOAD8_U): + DEF_OP_LOAD(PUSH_I32((uint32)(*(uint8*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LOAD16_S): + DEF_OP_LOAD(PUSH_I32(sign_ext_16_32(*(int16*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LOAD16_U): + DEF_OP_LOAD(PUSH_I32((uint32)(*(uint16*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD8_S): + DEF_OP_LOAD(PUSH_I64(sign_ext_8_64(*(int8*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD8_U): + DEF_OP_LOAD(PUSH_I64((uint64)(*(uint8*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD16_S): + DEF_OP_LOAD(PUSH_I64(sign_ext_16_64(*(int16*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD16_U): + DEF_OP_LOAD(PUSH_I64((uint64)(*(uint16*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD32_S): + DEF_OP_LOAD(PUSH_I64(sign_ext_32_64(*(int32*)maddr))); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LOAD32_U): + DEF_OP_LOAD(PUSH_I64((uint64)(*(uint32*)maddr))); + HANDLE_OP_END (); + + /* memory store instructions */ + HANDLE_OP (WASM_OP_I32_STORE): + DEF_OP_STORE(uint32, I32, *(int32*)maddr = sval); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_STORE): + DEF_OP_STORE(uint64, I64, PUT_I64_TO_ADDR((uint32*)maddr, sval)); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_STORE): + { + uint32 offset, flags, addr; + GET_OPCODE(); + read_leb_uint32(frame_ip, frame_ip_end, flags); + read_leb_uint32(frame_ip, frame_ip_end, offset); + frame_sp--; + addr = POP_I32(); + CHECK_MEMORY_OVERFLOW(); + *(uint32*)maddr = frame_sp[1]; + (void)flags; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F64_STORE): + { + uint32 offset, flags, addr; + GET_OPCODE(); + read_leb_uint32(frame_ip, frame_ip_end, flags); + read_leb_uint32(frame_ip, frame_ip_end, offset); + frame_sp -= 2; + addr = POP_I32(); + CHECK_MEMORY_OVERFLOW(); + *(uint32*)maddr = frame_sp[1]; + *((uint32*)maddr + 1) = frame_sp[2]; + (void)flags; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_STORE8): + DEF_OP_STORE(uint32, I32, *(uint8*)maddr = (uint8)sval); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_STORE16): + DEF_OP_STORE(uint32, I32, *(uint16*)maddr = (uint16)sval); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_STORE8): + DEF_OP_STORE(uint64, I64, *(uint8*)maddr = (uint8)sval); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_STORE16): + DEF_OP_STORE(uint64, I64, *(uint16*)maddr = (uint16)sval); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_STORE32): + DEF_OP_STORE(uint64, I64, *(uint32*)maddr = (uint32)sval); + HANDLE_OP_END (); + + /* memory size and memory grow instructions */ + HANDLE_OP (WASM_OP_MEMORY_SIZE): + { + uint32 reserved; + read_leb_uint32(frame_ip, frame_ip_end, reserved); + PUSH_I32(memory->cur_page_count); + (void)reserved; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_MEMORY_GROW): + { + uint32 reserved, prev_page_count, delta, tmp; + + read_leb_uint32(frame_ip, frame_ip_end, reserved); + prev_page_count = memory->cur_page_count; + delta = POP_I32(); + PUSH_I32(prev_page_count); + if (delta == 0) + HANDLE_OP_END (); + else if (delta + prev_page_count > memory->max_page_count || + delta + prev_page_count < prev_page_count) { + tmp = POP_I32(); + PUSH_I32(-1); + (void)tmp; + HANDLE_OP_END (); + } + + if (!wasm_runtime_enlarge_memory(module, delta)) + goto got_exception; + + memory = module->default_memory; + + (void)reserved; + HANDLE_OP_END (); + } + + /* constant instructions */ + HANDLE_OP (WASM_OP_I32_CONST): + DEF_OP_I_CONST(int32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_CONST): + DEF_OP_I_CONST(int64, I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_CONST): + { + uint8 *p_float = (uint8*)frame_sp++; + for (i = 0; i < sizeof(float32); i++) + *p_float++ = *frame_ip++; + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F64_CONST): + { + uint8 *p_float = (uint8*)frame_sp++; + frame_sp++; + for (i = 0; i < sizeof(float64); i++) + *p_float++ = *frame_ip++; + HANDLE_OP_END (); + } + + /* comparison instructions of i32 */ + HANDLE_OP (WASM_OP_I32_EQZ): + DEF_OP_EQZ(I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_EQ): + DEF_OP_CMP(uint32, I32, ==); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_NE): + DEF_OP_CMP(uint32, I32, !=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LT_S): + DEF_OP_CMP(int32, I32, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LT_U): + DEF_OP_CMP(uint32, I32, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_GT_S): + DEF_OP_CMP(int32, I32, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_GT_U): + DEF_OP_CMP(uint32, I32, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LE_S): + DEF_OP_CMP(int32, I32, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_LE_U): + DEF_OP_CMP(uint32, I32, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_GE_S): + DEF_OP_CMP(int32, I32, >=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_GE_U): + DEF_OP_CMP(uint32, I32, >=); + HANDLE_OP_END (); + + /* comparison instructions of i64 */ + HANDLE_OP (WASM_OP_I64_EQZ): + DEF_OP_EQZ(I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_EQ): + DEF_OP_CMP(uint64, I64, ==); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_NE): + DEF_OP_CMP(uint64, I64, !=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LT_S): + DEF_OP_CMP(int64, I64, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LT_U): + DEF_OP_CMP(uint64, I64, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_GT_S): + DEF_OP_CMP(int64, I64, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_GT_U): + DEF_OP_CMP(uint64, I64, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LE_S): + DEF_OP_CMP(int64, I64, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_LE_U): + DEF_OP_CMP(uint64, I64, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_GE_S): + DEF_OP_CMP(int64, I64, >=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_GE_U): + DEF_OP_CMP(uint64, I64, >=); + HANDLE_OP_END (); + + /* comparison instructions of f32 */ + HANDLE_OP (WASM_OP_F32_EQ): + DEF_OP_CMP(float32, F32, ==); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_NE): + DEF_OP_CMP(float32, F32, !=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_LT): + DEF_OP_CMP(float32, F32, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_GT): + DEF_OP_CMP(float32, F32, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_LE): + DEF_OP_CMP(float32, F32, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_GE): + DEF_OP_CMP(float32, F32, >=); + HANDLE_OP_END (); + + /* comparison instructions of f64 */ + HANDLE_OP (WASM_OP_F64_EQ): + DEF_OP_CMP(float64, F64, ==); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_NE): + DEF_OP_CMP(float64, F64, !=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_LT): + DEF_OP_CMP(float64, F64, <); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_GT): + DEF_OP_CMP(float64, F64, >); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_LE): + DEF_OP_CMP(float64, F64, <=); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_GE): + DEF_OP_CMP(float64, F64, >=); + HANDLE_OP_END (); + + /* numberic instructions of i32 */ + HANDLE_OP (WASM_OP_I32_CLZ): + DEF_OP_BIT_COUNT(uint32, I32, clz32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_CTZ): + DEF_OP_BIT_COUNT(uint32, I32, ctz32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_POPCNT): + DEF_OP_BIT_COUNT(uint32, I32, popcount32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_ADD): + DEF_OP_NUMERIC(uint32, uint32, I32, +); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_SUB): + DEF_OP_NUMERIC(uint32, uint32, I32, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_MUL): + DEF_OP_NUMERIC(uint32, uint32, I32, *); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_DIV_S): + { + int32 a, b; + + b = POP_I32(); + a = POP_I32(); + if (a == (int32)0x80000000 && b == -1) { + wasm_runtime_set_exception(module, "integer overflow"); + goto got_exception; + } + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I32(a / b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_DIV_U): + { + uint32 a, b; + + b = POP_I32(); + a = POP_I32(); + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I32(a / b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_REM_S): + { + int32 a, b; + + b = POP_I32(); + a = POP_I32(); + if (a == (int32)0x80000000 && b == -1) { + PUSH_I32(0); + HANDLE_OP_END (); + } + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I32(a % b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_REM_U): + { + uint32 a, b; + + b = POP_I32(); + a = POP_I32(); + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I32(a % b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_AND): + DEF_OP_NUMERIC(uint32, uint32, I32, &); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_OR): + DEF_OP_NUMERIC(uint32, uint32, I32, |); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_XOR): + DEF_OP_NUMERIC(uint32, uint32, I32, ^); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_SHL): + DEF_OP_NUMERIC(uint32, uint32, I32, <<); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_SHR_S): + DEF_OP_NUMERIC(int32, uint32, I32, >>); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_SHR_U): + DEF_OP_NUMERIC(uint32, uint32, I32, >>); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_ROTL): + { + uint32 a, b; + + b = POP_I32(); + a = POP_I32(); + PUSH_I32(rotl32(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_ROTR): + { + uint32 a, b; + + b = POP_I32(); + a = POP_I32(); + PUSH_I32(rotr32(a, b)); + HANDLE_OP_END (); + } + + /* numberic instructions of i64 */ + HANDLE_OP (WASM_OP_I64_CLZ): + DEF_OP_BIT_COUNT(uint64, I64, clz64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_CTZ): + DEF_OP_BIT_COUNT(uint64, I64, ctz64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_POPCNT): + DEF_OP_BIT_COUNT(uint64, I64, popcount64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_ADD): + DEF_OP_NUMERIC(uint64, uint64, I64, +); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_SUB): + DEF_OP_NUMERIC(uint64, uint64, I64, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_MUL): + DEF_OP_NUMERIC(uint64, uint64, I64, *); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_DIV_S): + { + int64 a, b; + + b = POP_I64(); + a = POP_I64(); + if (a == (int64)0x8000000000000000LL && b == -1) { + wasm_runtime_set_exception(module, "integer overflow"); + goto got_exception; + } + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I64(a / b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I64_DIV_U): + { + uint64 a, b; + + b = POP_I64(); + a = POP_I64(); + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I64(a / b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I64_REM_S): + { + int64 a, b; + + b = POP_I64(); + a = POP_I64(); + if (a == (int64)0x8000000000000000LL && b == -1) { + PUSH_I64(0); + HANDLE_OP_END (); + } + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I64(a % b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I64_REM_U): + { + uint64 a, b; + + b = POP_I64(); + a = POP_I64(); + if (b == 0) { + wasm_runtime_set_exception(module, "integer divide by zero"); + goto got_exception; + } + PUSH_I64(a % b); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I64_AND): + DEF_OP_NUMERIC(uint64, uint64, I64, &); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_OR): + DEF_OP_NUMERIC(uint64, uint64, I64, |); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_XOR): + DEF_OP_NUMERIC(uint64, uint64, I64, ^); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_SHL): + DEF_OP_NUMERIC(uint64, uint64, I64, <<); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_SHR_S): + DEF_OP_NUMERIC(int64, uint64, I64, >>); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_SHR_U): + DEF_OP_NUMERIC(uint64, uint64, I64, >>); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_ROTL): + { + uint64 a, b; + + b = POP_I64(); + a = POP_I64(); + PUSH_I64(rotl64(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I64_ROTR): + { + uint64 a, b; + + b = POP_I64(); + a = POP_I64(); + PUSH_I64(rotr64(a, b)); + HANDLE_OP_END (); + } + + /* numberic instructions of f32 */ + HANDLE_OP (WASM_OP_F32_ABS): + DEF_OP_MATH(float32, F32, fabs); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_NEG): + DEF_OP_MATH(float32, F32, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_CEIL): + DEF_OP_MATH(float32, F32, ceil); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_FLOOR): + DEF_OP_MATH(float32, F32, floor); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_TRUNC): + DEF_OP_MATH(float32, F32, trunc); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_NEAREST): + DEF_OP_MATH(float32, F32, rint); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_SQRT): + DEF_OP_MATH(float32, F32, sqrt); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_ADD): + DEF_OP_NUMERIC(float32, float32, F32, +); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_SUB): + DEF_OP_NUMERIC(float32, float32, F32, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_MUL): + DEF_OP_NUMERIC(float32, float32, F32, *); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_DIV): + DEF_OP_NUMERIC(float32, float32, F32, /); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_MIN): + { + float32 a, b; + + b = POP_F32(); + a = POP_F32(); + PUSH_F32(wa_fmin(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F32_MAX): + { + float32 a, b; + + b = POP_F32(); + a = POP_F32(); + PUSH_F32(wa_fmax(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F32_COPYSIGN): + { + float32 a, b; + + b = POP_F32(); + a = POP_F32(); + PUSH_F32(signbit(b) ? -fabs(a) : fabs(a)); + HANDLE_OP_END (); + } + + /* numberic instructions of f64 */ + HANDLE_OP (WASM_OP_F64_ABS): + DEF_OP_MATH(float64, F64, fabs); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_NEG): + DEF_OP_MATH(float64, F64, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_CEIL): + DEF_OP_MATH(float64, F64, ceil); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_FLOOR): + DEF_OP_MATH(float64, F64, floor); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_TRUNC): + DEF_OP_MATH(float64, F64, trunc); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_NEAREST): + DEF_OP_MATH(float64, F64, rint); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_SQRT): + DEF_OP_MATH(float64, F64, sqrt); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_ADD): + DEF_OP_NUMERIC(float64, float64, F64, +); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_SUB): + DEF_OP_NUMERIC(float64, float64, F64, -); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_MUL): + DEF_OP_NUMERIC(float64, float64, F64, *); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_DIV): + DEF_OP_NUMERIC(float64, float64, F64, /); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_MIN): + { + float64 a, b; + + b = POP_F64(); + a = POP_F64(); + PUSH_F64(wa_fmin(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F64_MAX): + { + float64 a, b; + + b = POP_F64(); + a = POP_F64(); + PUSH_F64(wa_fmax(a, b)); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_F64_COPYSIGN): + { + float64 a, b; + + b = POP_F64(); + a = POP_F64(); + PUSH_F64(signbit(b) ? -fabs(a) : fabs(a)); + HANDLE_OP_END (); + } + + /* conversions of i32 */ + HANDLE_OP (WASM_OP_I32_WRAP_I64): + { + int32 value = (int32)(POP_I64() & 0xFFFFFFFFLL); + PUSH_I32(value); + HANDLE_OP_END (); + } + + HANDLE_OP (WASM_OP_I32_TRUNC_S_F32): + /* Copy the float32/float64 values from WAVM, need to test more. + We don't use INT32_MIN/INT32_MAX/UINT32_MIN/UINT32_MAX, + since float/double values of ieee754 cannot precisely represent + all int32/uint32/int64/uint64 values, e.g.: + UINT32_MAX is 4294967295, but (float32)4294967295 is 4294967296.0f, + but not 4294967295.0f. */ + DEF_OP_TRUNC(int32, I32, float32, F32, <= -2147483904.0f, + >= 2147483648.0f); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_TRUNC_U_F32): + DEF_OP_TRUNC(uint32, I32, float32, F32, <= -1.0f, + >= 4294967296.0f); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_TRUNC_S_F64): + DEF_OP_TRUNC(int32, I32, float64, F64, <= -2147483649.0, + >= 2147483648.0); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I32_TRUNC_U_F64): + DEF_OP_TRUNC(uint32, I32, float64, F64, <= -1.0 , + >= 4294967296.0); + HANDLE_OP_END (); + + /* conversions of i64 */ + HANDLE_OP (WASM_OP_I64_EXTEND_S_I32): + DEF_OP_CONVERT(int64, I64, int32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_EXTEND_U_I32): + DEF_OP_CONVERT(int64, I64, uint32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_TRUNC_S_F32): + DEF_OP_TRUNC(int64, I64, float32, F32, <= -9223373136366403584.0f, + >= 9223372036854775808.0f); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_TRUNC_U_F32): + DEF_OP_TRUNC(uint64, I64, float32, F32, <= -1.0f, + >= 18446744073709551616.0f); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_TRUNC_S_F64): + DEF_OP_TRUNC(int64, I64, float64, F64, <= -9223372036854777856.0, + >= 9223372036854775808.0); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_I64_TRUNC_U_F64): + DEF_OP_TRUNC(uint64, I64, float64, F64, <= -1.0, + >= 18446744073709551616.0); + HANDLE_OP_END (); + + /* conversions of f32 */ + HANDLE_OP (WASM_OP_F32_CONVERT_S_I32): + DEF_OP_CONVERT(float32, F32, int32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_CONVERT_U_I32): + DEF_OP_CONVERT(float32, F32, uint32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_CONVERT_S_I64): + DEF_OP_CONVERT(float32, F32, int64, I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_CONVERT_U_I64): + DEF_OP_CONVERT(float32, F32, uint64, I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F32_DEMOTE_F64): + DEF_OP_CONVERT(float32, F32, float64, F64); + HANDLE_OP_END (); + + /* conversions of f64 */ + HANDLE_OP (WASM_OP_F64_CONVERT_S_I32): + DEF_OP_CONVERT(float64, F64, int32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_CONVERT_U_I32): + DEF_OP_CONVERT(float64, F64, uint32, I32); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_CONVERT_S_I64): + DEF_OP_CONVERT(float64, F64, int64, I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_CONVERT_U_I64): + DEF_OP_CONVERT(float64, F64, uint64, I64); + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_F64_PROMOTE_F32): + DEF_OP_CONVERT(float64, F64, float32, F32); + HANDLE_OP_END (); + + /* reinterpretations */ + HANDLE_OP (WASM_OP_I32_REINTERPRET_F32): + HANDLE_OP (WASM_OP_I64_REINTERPRET_F64): + HANDLE_OP (WASM_OP_F32_REINTERPRET_I32): + HANDLE_OP (WASM_OP_F64_REINTERPRET_I64): + HANDLE_OP_END (); + + HANDLE_OP (WASM_OP_IMPDEP2): + frame = prev_frame; + frame_ip = frame->ip; + frame_sp = frame->sp; + frame_csp = frame->csp; + goto call_func_from_entry; + +#if WASM_ENABLE_LABELS_AS_VALUES == 0 + default: + wasm_runtime_set_exception(module, "wasm interp failed: unsupported opcode"); + goto got_exception; + } +#endif + +#if WASM_ENABLE_LABELS_AS_VALUES != 0 + HANDLE_OP (WASM_OP_IMPDEP1): + HANDLE_OP (WASM_OP_UNUSED_0x06): + HANDLE_OP (WASM_OP_UNUSED_0x07): + HANDLE_OP (WASM_OP_UNUSED_0x08): + HANDLE_OP (WASM_OP_UNUSED_0x09): + HANDLE_OP (WASM_OP_UNUSED_0x0a): + HANDLE_OP (WASM_OP_UNUSED_0x12): + HANDLE_OP (WASM_OP_UNUSED_0x13): + HANDLE_OP (WASM_OP_UNUSED_0x14): + HANDLE_OP (WASM_OP_UNUSED_0x15): + HANDLE_OP (WASM_OP_UNUSED_0x16): + HANDLE_OP (WASM_OP_UNUSED_0x17): + HANDLE_OP (WASM_OP_UNUSED_0x18): + HANDLE_OP (WASM_OP_UNUSED_0x19): + HANDLE_OP (WASM_OP_UNUSED_0x1c): + HANDLE_OP (WASM_OP_UNUSED_0x1d): + HANDLE_OP (WASM_OP_UNUSED_0x1e): + HANDLE_OP (WASM_OP_UNUSED_0x1f): + HANDLE_OP (WASM_OP_UNUSED_0x25): + HANDLE_OP (WASM_OP_UNUSED_0x26): + HANDLE_OP (WASM_OP_UNUSED_0x27): + { + wasm_runtime_set_exception(module, "wasm interp failed: unsupported opcode"); + goto got_exception; + } +#endif + +#if WASM_ENABLE_LABELS_AS_VALUES == 0 + continue; +#else + FETCH_OPCODE_AND_DISPATCH (); +#endif + + call_func_from_interp: + /* Only do the copy when it's called from interpreter. */ + { + WASMInterpFrame *outs_area = wasm_thread_wasm_stack_top(self); + POP(cur_func->param_cell_num); + SYNC_ALL_TO_FRAME(); + word_copy(outs_area->lp, frame_sp, cur_func->param_cell_num); + prev_frame = frame; + } + + call_func_from_entry: + { + if (cur_func->is_import_func) { + wasm_interp_call_func_native(self, cur_func, prev_frame); + prev_frame = frame->prev_frame; + cur_func = frame->function; + UPDATE_ALL_FROM_FRAME(); + + memory = module->default_memory; + if (wasm_runtime_get_exception(module)) + goto got_exception; + } + else { + WASMType *func_type; + uint8 ret_type; + + all_cell_num = cur_func->param_cell_num + cur_func->local_cell_num + + cur_func->u.func->max_stack_cell_num + + cur_func->u.func->max_block_num * sizeof(WASMBranchBlock) / 4; + frame_size = wasm_interp_interp_frame_size(all_cell_num); + + if (!(frame = ALLOC_FRAME(self, frame_size, prev_frame))) { + frame = prev_frame; + goto got_exception; + } + + /* Initialize the interpreter context. */ + frame->function = cur_func; + frame_ip = wasm_runtime_get_func_code(cur_func); + frame_ip_end = wasm_runtime_get_func_code_end(cur_func); + frame_lp = frame->lp; + + frame_sp = frame->sp_bottom = frame_lp + cur_func->param_cell_num + + cur_func->local_cell_num; + frame->sp_boundary = frame->sp_bottom + cur_func->u.func->max_stack_cell_num; + + frame_csp = frame->csp_bottom = (WASMBranchBlock*)frame->sp_boundary; + frame->csp_boundary = frame->csp_bottom + cur_func->u.func->max_block_num; + + /* Initialize the local varialbes */ + memset(frame_lp + cur_func->param_cell_num, 0, + cur_func->local_cell_num * 4); + + /* Push function block as first block */ + func_type = cur_func->u.func->func_type; + ret_type = func_type->result_count + ? func_type->types[func_type->param_count] + : VALUE_TYPE_VOID; + PUSH_CSP(BLOCK_TYPE_FUNCTION, ret_type, + frame_ip, NULL, frame_ip_end - 1); + + wasm_thread_set_cur_frame(self, (WASMRuntimeFrame*)frame); + } + HANDLE_OP_END (); + } + + return_func: + { + FREE_FRAME(self, frame); + wasm_thread_set_cur_frame(self, (WASMRuntimeFrame*)prev_frame); + + if (!prev_frame->ip) + /* Called from native. */ + return; + + RECOVER_CONTEXT(prev_frame); + HANDLE_OP_END (); + } + + got_exception: + if (depths && depths != depth_buf) { + wasm_free(depths); + depths = NULL; + } + return; + +#if WASM_ENABLE_LABELS_AS_VALUES == 0 + } +#else + FETCH_OPCODE_AND_DISPATCH (); +#endif + +} + +void +wasm_interp_call_wasm(WASMFunctionInstance *function, + uint32 argc, uint32 argv[]) +{ + WASMThread *self = wasm_runtime_get_self(); + WASMRuntimeFrame *prev_frame = wasm_thread_get_cur_frame(self); + WASMInterpFrame *frame, *outs_area; + + /* Allocate sufficient cells for all kinds of return values. */ + unsigned all_cell_num = 2, i; + /* This frame won't be used by JITed code, so only allocate interp + frame here. */ + unsigned frame_size = wasm_interp_interp_frame_size(all_cell_num); + + if (argc != function->param_cell_num) { + char buf[128]; + snprintf(buf, sizeof(buf), + "invalid argument count %d, expected %d", + argc, function->param_cell_num); + wasm_runtime_set_exception(self->module_inst, buf); + return; + } + + /* TODO: check stack overflow. */ + + if (!(frame = ALLOC_FRAME(self, frame_size, (WASMInterpFrame*)prev_frame))) + return; + + outs_area = wasm_thread_wasm_stack_top(self); + frame->function = NULL; + frame->ip = NULL; + /* There is no local variable. */ + frame->sp = frame->lp + 0; + + if (argc > 0) + word_copy(outs_area->lp, argv, argc); + + wasm_thread_set_cur_frame(self, frame); + + if (function->is_import_func) + wasm_interp_call_func_native(self, function, frame); + else + wasm_interp_call_func_bytecode(self, function, frame); + + /* Output the return value to the caller */ + if (!wasm_runtime_get_exception(self->module_inst)) { + for (i = 0; i < function->ret_cell_num; i++) + argv[i] = *(frame->sp + i - function->ret_cell_num); + } + + wasm_thread_set_cur_frame(self, prev_frame); + FREE_FRAME(self, frame); +} diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-interp.h b/core/iwasm/runtime/vmcore_wasm/wasm-interp.h new file mode 100644 index 000000000..84f409800 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-interp.h @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_INTERP_H +#define _WASM_INTERP_H + +#include "wasm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct WASMFunctionInstance; + +typedef struct WASMInterpFrame { + /* The frame of the caller that are calling the current function. */ + struct WASMInterpFrame *prev_frame; + + /* The current WASM function. */ + struct WASMFunctionInstance *function; + + /* Instruction pointer of the bytecode array. */ + uint8 *ip; + + /* Operand stack top pointer of the current frame. The bottom of + the stack is the next cell after the last local variable. */ + uint32 *sp_bottom; + uint32 *sp_boundary; + uint32 *sp; + + WASMBranchBlock *csp_bottom; + WASMBranchBlock *csp_boundary; + WASMBranchBlock *csp; + + /* Frame data, the layout is: + lp: param_cell_count + local_cell_count + sp_bottom to sp_boundary: stack of data + csp_bottom to csp_boundary: stack of block + ref to frame end: data types of local vairables and stack data + */ + uint32 lp[1]; +} WASMInterpFrame; + +/** + * Calculate the size of interpreter area of frame of a function. + * + * @param all_cell_num number of all cells including local variables + * and the working stack slots + * + * @return the size of interpreter area of the frame + */ +static inline unsigned +wasm_interp_interp_frame_size(unsigned all_cell_num) +{ + return align_uint(offsetof(WASMInterpFrame, lp) + all_cell_num * 5, 4); +} + +void +wasm_interp_call_wasm(struct WASMFunctionInstance *function, + uint32 argc, uint32 argv[]); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_INTERP_H */ diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-loader.c b/core/iwasm/runtime/vmcore_wasm/wasm-loader.c new file mode 100644 index 000000000..c5dba2950 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-loader.c @@ -0,0 +1,2874 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-loader.h" +#include "wasm.h" +#include "wasm-native.h" +#include "wasm-opcode.h" +#include "wasm-runtime.h" +#include "wasm_log.h" +#include "wasm_memory.h" + +/* Read a value of given type from the address pointed to by the given + pointer and increase the pointer to the position just after the + value being read. */ +#define TEMPLATE_READ_VALUE(Type, p) \ + (p += sizeof(Type), *(Type *)(p - sizeof(Type))) + +static void +set_error_buf(char *error_buf, uint32 error_buf_size, const char *string) +{ + if (error_buf != NULL) + snprintf(error_buf, error_buf_size, "%s", string); +} + +#define CHECK_BUF(buf, buf_end, length) do { \ + if (buf + length > buf_end) { \ + set_error_buf(error_buf, error_buf_size, "unexpected end"); \ + return false; \ + } \ +} while (0) + +static bool +read_leb(const uint8 *buf, const uint8 *buf_end, + uint32 *p_offset, uint32 maxbits, + bool sign, uint64 *p_result, + char* error_buf, uint32 error_buf_size) +{ + uint64 result = 0; + uint32 shift = 0; + uint32 bcnt = 0; + uint64 byte; + + while (true) { + CHECK_BUF(buf, buf_end, 1); + byte = buf[*p_offset]; + *p_offset += 1; + result |= ((byte & 0x7f) << shift); + shift += 7; + if ((byte & 0x80) == 0) { + break; + } + bcnt += 1; + } + if (bcnt > (maxbits + 7 - 1) / 7) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: unsigned LEB overflow."); + return false; + } + if (sign && (shift < maxbits) && (byte & 0x40)) { + /* Sign extend */ + result |= - (1 << shift); + } + *p_result = result; + return true; +} + +#define read_uint8(p) TEMPLATE_READ_VALUE(uint8, p) +#define read_uint32(p) TEMPLATE_READ_VALUE(uint32, p) +#define read_bool(p) TEMPLATE_READ_VALUE(bool, p) + +#define read_leb_uint64(p, p_end, res) do { \ + uint32 off = 0; \ + uint64 res64; \ + if (!read_leb(p, p_end, &off, 64, false, &res64, \ + error_buf, error_buf_size)) \ + return false; \ + p += off; \ + res = (uint64)res64; \ +} while (0) + +#define read_leb_int64(p, p_end, res) do { \ + uint32 off = 0; \ + uint64 res64; \ + if (!read_leb(p, p_end, &off, 64, true, &res64, \ + error_buf, error_buf_size)) \ + return false; \ + p += off; \ + res = (int64)res64; \ +} while (0) + +#define read_leb_uint32(p, p_end, res) do { \ + uint32 off = 0; \ + uint64 res64; \ + if (!read_leb(p, p_end, &off, 32, false, &res64, \ + error_buf, error_buf_size)) \ + return false; \ + p += off; \ + res = (uint32)res64; \ +} while (0) + +#define read_leb_int32(p, p_end, res) do { \ + uint32 off = 0; \ + uint64 res64; \ + if (!read_leb(p, p_end, &off, 32, true, &res64, \ + error_buf, error_buf_size)) \ + return false; \ + p += off; \ + res = (uint32)res64; \ +} while (0) + +#define read_leb_uint8(p, p_end, res) do { \ + uint32 off = 0; \ + uint64 res64; \ + if (!read_leb(p, p_end, &off, 7, false, &res64, \ + error_buf, error_buf_size)) \ + return false; \ + p += off; \ + res = (uint32)res64; \ +} while (0) + +static char* +const_str_set_insert(const uint8 *str, int32 len, WASMModule *module, + char* error_buf, uint32 error_buf_size) +{ + HashMap *set = module->const_str_set; + char *c_str = wasm_malloc(len + 1), *value; + + if (!c_str) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: alloc memory failed."); + return NULL; + } + + memcpy(c_str, str, len); + c_str[len] = '\0'; + + if ((value = wasm_hash_map_find(set, c_str))) { + wasm_free(c_str); + return value; + } + + if (!wasm_hash_map_insert(set, c_str, c_str)) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: " + "insert string to hash map failed."); + wasm_free(c_str); + return NULL; + } + + return c_str; +} + +static bool +load_init_expr(const uint8 **p_buf, const uint8 *buf_end, + InitializerExpression *init_expr, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = *p_buf, *p_end = buf_end; + uint8 flag, end_byte, *p_float; + uint32 i; + + CHECK_BUF(p, p_end, 1); + init_expr->init_expr_type = read_uint8(p); + flag = init_expr->init_expr_type; + + switch (flag) { + /* i32.const */ + case INIT_EXPR_TYPE_I32_CONST: + read_leb_int32(p, p_end, init_expr->u.i32); + break; + /* i64.const */ + case INIT_EXPR_TYPE_I64_CONST: + read_leb_int64(p, p_end, init_expr->u.i64); + break; + /* f32.const */ + case INIT_EXPR_TYPE_F32_CONST: + CHECK_BUF(p, p_end, 4); + p_float = (uint8*)&init_expr->u.f32; + for (i = 0; i < sizeof(float32); i++) + *p_float++ = *p++; + break; + /* f64.const */ + case INIT_EXPR_TYPE_F64_CONST: + CHECK_BUF(p, p_end, 8); + p_float = (uint8*)&init_expr->u.f64; + for (i = 0; i < sizeof(float64); i++) + *p_float++ = *p++; + break; + /* get_global */ + case INIT_EXPR_TYPE_GET_GLOBAL: + read_leb_uint32(p, p_end, init_expr->u.global_index); + break; + default: + set_error_buf(error_buf, error_buf_size, "type mismatch"); + return false; + } + CHECK_BUF(p, p_end, 1); + end_byte = read_uint8(p); + if (end_byte != 0x0b) { + set_error_buf(error_buf, error_buf_size, "unexpected end"); + return false; + } + *p_buf = p; + + return true; +} + +static bool +load_type_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end, *p_org; + uint32 type_count, param_count, result_count, i, j; + uint8 flag; + WASMType *type; + + read_leb_uint32(p, p_end, type_count); + + if (type_count) { + module->type_count = type_count; + if (!(module->types = wasm_malloc(sizeof(WASMType*) * type_count))) { + set_error_buf(error_buf, error_buf_size, + "Load type section failed: alloc memory failed."); + return false; + } + + memset(module->types, 0, sizeof(WASMType*) * type_count); + + for (i = 0; i < type_count; i++) { + CHECK_BUF(p, p_end, 1); + flag = read_uint8(p); + if (flag != 0x60) { + set_error_buf(error_buf, error_buf_size, + "Load type section failed: invalid type flag."); + return false; + } + + read_leb_uint32(p, p_end, param_count); + + /* Resolve param count and result count firstly */ + p_org = p; + CHECK_BUF(p, p_end, param_count); + p += param_count; + read_leb_uint32(p, p_end, result_count); + wasm_assert(result_count <= 1); + CHECK_BUF(p, p_end, result_count); + p = p_org; + + if (!(type = module->types[i] = wasm_malloc(offsetof(WASMType, types) + + sizeof(uint8) * (param_count + result_count)))) + return false; + + /* Resolve param types and result types */ + type->param_count = param_count; + type->result_count = result_count; + for (j = 0; j < param_count; j++) { + CHECK_BUF(p, p_end, 1); + type->types[j] = read_uint8(p); + } + read_leb_uint32(p, p_end, result_count); + for (j = 0; j < result_count; j++) { + CHECK_BUF(p, p_end, 1); + type->types[param_count + j] = read_uint8(p); + } + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load type section failed: invalid section size."); + return false; + } + + LOG_VERBOSE("Load type section success.\n"); + return true; +} + +static bool +load_table_import(const uint8 **p_buf, const uint8 *buf_end, + WASMTableImport *table, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = *p_buf, *p_end = buf_end; + + read_leb_uint8(p, p_end, table->elem_type); + wasm_assert(table->elem_type == TABLE_ELEM_TYPE_ANY_FUNC); + read_leb_uint32(p, p_end, table->flags); + read_leb_uint32(p, p_end, table->init_size); + if (table->flags & 1) + read_leb_uint32(p, p_end, table->max_size); + else + table->max_size = 0x10000; + + *p_buf = p; + return true; +} + +static bool +load_memory_import(const uint8 **p_buf, const uint8 *buf_end, + WASMMemoryImport *memory, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = *p_buf, *p_end = buf_end; + + read_leb_uint32(p, p_end, memory->flags); + read_leb_uint32(p, p_end, memory->init_page_count); + if (memory->flags & 1) + read_leb_uint32(p, p_end, memory->max_page_count); + else + /* Limit the maximum memory size to 4GB */ + memory->max_page_count = 0x10000; + + *p_buf = p; + return true; +} + +static bool +load_table(const uint8 **p_buf, const uint8 *buf_end, WASMTable *table, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = *p_buf, *p_end = buf_end; + + read_leb_uint8(p, p_end, table->elem_type); + wasm_assert(table->elem_type == TABLE_ELEM_TYPE_ANY_FUNC); + read_leb_uint32(p, p_end, table->flags); + read_leb_uint32(p, p_end, table->init_size); + if (table->flags & 1) + read_leb_uint32(p, p_end, table->max_size); + else + table->max_size = 0x10000; + + *p_buf = p; + return true; +} + +static bool +load_memory(const uint8 **p_buf, const uint8 *buf_end, WASMMemory *memory, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = *p_buf, *p_end = buf_end; + + read_leb_uint32(p, p_end, memory->flags); + read_leb_uint32(p, p_end, memory->init_page_count); + if (memory->flags & 1) + read_leb_uint32(p, p_end, memory->max_page_count); + else + /* Limit the maximum memory size to 4GB */ + memory->max_page_count = 0x10000; + + *p_buf = p; + return true; +} + +static void* +resolve_sym(const char *module_name, const char *field_name) +{ + void *sym; + + if (strcmp(module_name, "env") != 0) + return NULL; + + if (field_name[0] == '_' + && (sym = wasm_dlsym(NULL, field_name + 1))) + return sym; + + return NULL; +} + +static bool +load_import_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end, *p_old; + uint32 import_count, name_len, type_index, i, u32, flags; + WASMImport *import; + WASMImport *import_functions = NULL, *import_tables = NULL; + WASMImport *import_memories = NULL, *import_globals = NULL; + char *module_name, *field_name; + uint8 mutable, u8, kind; + + read_leb_uint32(p, p_end, import_count); + + if (import_count) { + module->import_count = import_count; + if (!(module->imports = wasm_malloc(sizeof(WASMImport) * import_count))) { + set_error_buf(error_buf, error_buf_size, + "Load import section failed: alloc memory failed."); + return false; + } + + memset(module->imports, 0, sizeof(WASMImport) * import_count); + + p_old = p; + + /* Scan firstly to get import count of each type */ + for (i = 0; i < import_count; i++) { + /* module name */ + read_leb_uint32(p, p_end, name_len); + CHECK_BUF(p, p_end, name_len); + p += name_len; + + /* field name */ + read_leb_uint32(p, p_end, name_len); + CHECK_BUF(p, p_end, name_len); + p += name_len; + + read_leb_uint8(p, p_end, kind); + + switch (kind) { + case IMPORT_KIND_FUNC: /* import function */ + read_leb_uint32(p, p_end, type_index); + module->import_function_count++; + break; + + case IMPORT_KIND_TABLE: /* import table */ + read_leb_uint8(p, p_end, u8); + read_leb_uint32(p, p_end, flags); + read_leb_uint32(p, p_end, u32); + if (flags & 1) + read_leb_uint32(p, p_end, u32); + module->import_table_count++; + if (module->import_table_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple tables"); + return false; + } + break; + + case IMPORT_KIND_MEMORY: /* import memory */ + read_leb_uint32(p, p_end, flags); + read_leb_uint32(p, p_end, u32); + if (flags & 1) + read_leb_uint32(p, p_end, u32); + module->import_memory_count++; + if (module->import_memory_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple memories"); + return false; + } + break; + + case IMPORT_KIND_GLOBAL: /* import global */ + read_leb_uint8(p, p_end, u8); + read_leb_uint8(p, p_end, u8); + module->import_global_count++; + break; + + default: + set_error_buf(error_buf, error_buf_size, + "Load import section failed: invalid import type."); + return false; + } + } + + if (module->import_function_count) + import_functions = module->import_functions = module->imports; + if (module->import_table_count) + import_tables = module->import_tables = + module->imports + module->import_function_count; + if (module->import_memory_count) + import_memories = module->import_memories = + module->imports + module->import_function_count + module->import_table_count; + if (module->import_global_count) + import_globals = module->import_globals = + module->imports + module->import_function_count + module->import_table_count + + module->import_memory_count; + + p = p_old; + + /* Scan again to read the data */ + for (i = 0; i < import_count; i++) { + /* load module name */ + read_leb_uint32(p, p_end, name_len); + CHECK_BUF(p, p_end, name_len); + if (!(module_name = const_str_set_insert + (p, name_len, module, error_buf, error_buf_size))) { + return false; + } + p += name_len; + + /* load field name */ + read_leb_uint32(p, p_end, name_len); + CHECK_BUF(p, p_end, name_len); + if (!(field_name = const_str_set_insert + (p, name_len, module, error_buf, error_buf_size))) { + return false; + } + p += name_len; + + read_leb_uint8(p, p_end, kind); + switch (kind) { + case IMPORT_KIND_FUNC: /* import function */ + import = import_functions++; + read_leb_uint32(p, p_end, type_index); + if (type_index >= module->type_count) { + set_error_buf(error_buf, error_buf_size, + "Load import section failed: " + "invalid function type index."); + return false; + } + import->u.function.func_type = module->types[type_index]; + + if (!(import->u.function.func_ptr_linked = wasm_native_func_lookup + (module_name, field_name))) { + if (!(import->u.function.func_ptr_linked = + resolve_sym(module_name, field_name))) { + if (error_buf != NULL) + snprintf(error_buf, error_buf_size, + "Load import section failed: " + "resolve import function (%s, %s) failed.", + module_name, field_name); + return false; + + } + import->u.function.call_type = CALL_TYPE_C_INTRINSIC; + break; + } + import->u.function.call_type = CALL_TYPE_WRAPPER; + break; + + case IMPORT_KIND_TABLE: /* import table */ + import = import_tables++; + if (!load_table_import(&p, p_end, &import->u.table, + error_buf, error_buf_size)) + return false; + if (module->import_table_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple tables"); + return false; + } + break; + + case IMPORT_KIND_MEMORY: /* import memory */ + import = import_memories++; + if (!load_memory_import(&p, p_end, &import->u.memory, + error_buf, error_buf_size)) + return false; + if (module->import_table_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple memories"); + return false; + } + break; + + case IMPORT_KIND_GLOBAL: /* import global */ + import = import_globals++; + read_leb_uint8(p, p_end, import->u.global.type); + read_leb_uint8(p, p_end, mutable); + import->u.global.is_mutable = mutable & 1 ? true : false; + if (!(wasm_native_global_lookup(module_name, field_name, + &import->u.global))) { + if (error_buf != NULL) + snprintf(error_buf, error_buf_size, + "Load import section failed: " + "resolve import global (%s, %s) failed.", + module_name, field_name); + return false; + } + break; + + default: + set_error_buf(error_buf, error_buf_size, + "Load import section failed: " + "invalid import type."); + return false; + } + import->kind = kind; + import->u.names.module_name = module_name; + import->u.names.field_name = field_name; + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load import section failed: " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load import section success.\n"); + (void)u8; + (void)u32; + return true; +} + +static bool +load_function_section(const uint8 *buf, const uint8 *buf_end, + const uint8 *buf_code, const uint8 *buf_code_end, + WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + const uint8 *p_code = buf_code, *p_code_end, *p_code_save; + uint32 func_count, total_size; + uint32 code_count, code_size, type_index, i, j, k, local_type_index; + uint32 local_count, local_set_count, sub_local_count; + uint8 type; + WASMFunction *func; + + read_leb_uint32(p, p_end, func_count); + + read_leb_uint32(p_code, buf_code_end, code_count); + if (func_count != code_count) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: invalid function count."); + return false; + } + + if (func_count) { + module->function_count = func_count; + if (!(module->functions = wasm_malloc(sizeof(WASMFunction*) * func_count))) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: alloc memory failed."); + return false; + } + + memset(module->functions, 0, sizeof(WASMFunction*) * func_count); + + for (i = 0; i < func_count; i++) { + /* Resolve function type */ + read_leb_uint32(p, p_end, type_index); + if (type_index >= module->type_count) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: " + "invalid function type index."); + return false; + } + + read_leb_uint32(p_code, buf_code_end, code_size); + if (code_size == 0) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: " + "invalid function code size."); + return false; + } + + /* Resolve local set count */ + p_code_end = p_code + code_size; + local_count = 0; + read_leb_uint32(p_code, buf_code_end, local_set_count); + p_code_save = p_code; + + /* Calculate total local count */ + for (j = 0; j < local_set_count; j++) { + read_leb_uint32(p_code, buf_code_end, sub_local_count); + read_leb_uint8(p_code, buf_code_end, type); + local_count += sub_local_count; + } + + /* Alloc memory, layout: function structure + local types */ + code_size = p_code_end - p_code; + total_size = sizeof(WASMFunction) + local_count; + + if (!(func = module->functions[i] = wasm_malloc(total_size))) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: alloc memory failed."); + return false; + } + + /* Set function type, local count, code size and code body */ + memset(func, 0, total_size); + func->func_type = module->types[type_index]; + func->local_count = local_count; + if (local_count > 0) + func->local_types = (uint8*)func + sizeof(WASMFunction); + func->code_size = code_size; + func->code = (uint8*)p_code; + + /* Load each local type */ + p_code = p_code_save; + local_type_index = 0; + for (j = 0; j < local_set_count; j++) { + read_leb_uint32(p_code, buf_code_end, sub_local_count); + read_leb_uint8(p_code, buf_code_end, type); + for (k = 0; k < sub_local_count; k++) { + func->local_types[local_type_index++] = type; + } + } + p_code = p_code_end; + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load function section failed: " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load function section success.\n"); + return true; +} + +static bool +load_table_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 table_count, i; + WASMTable *table; + + read_leb_uint32(p, p_end, table_count); + wasm_assert(table_count == 1); + + if (table_count) { + if (table_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple memories"); + return false; + } + module->table_count = table_count; + if (!(module->tables = wasm_malloc(sizeof(WASMTable) * table_count))) { + set_error_buf(error_buf, error_buf_size, + "Load table section failed: alloc memory failed."); + return false; + } + + memset(module->tables, 0, sizeof(WASMTable) * table_count); + + /* load each table */ + table = module->tables; + for (i = 0; i < table_count; i++, table++) + if (!load_table(&p, p_end, table, error_buf, error_buf_size)) + return false; + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load table section failed: invalid section size."); + return false; + } + + LOG_VERBOSE("Load table section success.\n"); + return true; +} + +static bool +load_memory_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 memory_count, i; + WASMMemory *memory; + + read_leb_uint32(p, p_end, memory_count); + wasm_assert(memory_count == 1); + + if (memory_count) { + if (memory_count > 1) { + set_error_buf(error_buf, error_buf_size, "multiple memories"); + return false; + } + module->memory_count = memory_count; + if (!(module->memories = wasm_malloc(sizeof(WASMMemory) * memory_count))) { + set_error_buf(error_buf, error_buf_size, + "Load memory section failed: alloc memory failed."); + return false; + } + + memset(module->memories, 0, sizeof(WASMMemory) * memory_count); + + /* load each memory */ + memory = module->memories; + for (i = 0; i < memory_count; i++, memory++) + if (!load_memory(&p, p_end, memory, error_buf, error_buf_size)) + return false; + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load memory section failed: invalid section size."); + return false; + } + + LOG_VERBOSE("Load memory section success.\n"); + return true; +} + +static bool +load_global_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 global_count, i; + WASMGlobal *global; + + read_leb_uint32(p, p_end, global_count); + + if (global_count) { + module->global_count = global_count; + if (!(module->globals = wasm_malloc(sizeof(WASMGlobal) * global_count))) { + set_error_buf(error_buf, error_buf_size, + "Load global section failed: alloc memory failed."); + return false; + } + + memset(module->globals, 0, sizeof(WASMGlobal) * global_count); + + global = module->globals; + + for(i = 0; i < global_count; i++, global++) { + CHECK_BUF(p, p_end, 1); + global->type = read_uint8(p); + CHECK_BUF(p, p_end, 1); + global->is_mutable = read_bool(p); + + /* initialize expression */ + if (!load_init_expr(&p, p_end, &(global->init_expr), error_buf, error_buf_size)) + return false; + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load global section failed: invalid section size."); + return false; + } + + LOG_VERBOSE("Load global section success.\n"); + return true; +} + +static bool +load_export_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 export_count, i, index; + uint8 str_len; + WASMExport *export; + + read_leb_uint32(p, p_end, export_count); + + if (export_count) { + module->export_count = export_count; + if (!(module->exports = wasm_malloc(sizeof(WASMExport) * export_count))) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: alloc memory failed."); + return false; + } + + memset(module->exports, 0, sizeof(WASMExport) * export_count); + + export = module->exports; + for (i = 0; i < export_count; i++, export++) { + read_leb_uint32(p, p_end, str_len); + CHECK_BUF(p, p_end, str_len); + if (!(export->name = const_str_set_insert(p, str_len, module, + error_buf, error_buf_size))) { + return false; + } + p += str_len; + CHECK_BUF(p, p_end, 1); + export->kind = read_uint8(p); + read_leb_uint32(p, p_end, index); + export->index = index; + + switch(export->kind) { + /*function index*/ + case EXPORT_KIND_FUNC: + if (index >= module->function_count + module->import_function_count) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "function index is out of range."); + return false; + } + break; + /*table index*/ + case EXPORT_KIND_TABLE: + if (index >= module->table_count + module->import_table_count) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "table index is out of range."); + return false; + } + break; + /*memory index*/ + case EXPORT_KIND_MEMORY: + if (index >= module->memory_count + module->import_memory_count) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "memory index is out of range."); + return false; + } + break; + /*global index*/ + case EXPORT_KIND_GLOBAL: + if (index >= module->global_count + module->import_global_count) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "global index is out of range."); + return false; + } + break; + default: + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "kind flag is unexpected."); + return false; + } + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load export section failed: " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load export section success.\n"); + return true; +} + +static bool +load_table_segment_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 table_segment_count, i, j, table_index, function_count, function_index; + WASMTableSeg *table_segment; + + read_leb_uint32(p, p_end, table_segment_count); + + if (table_segment_count) { + module->table_seg_count = table_segment_count; + if (!(module->table_segments = wasm_malloc + (sizeof(WASMTableSeg) * table_segment_count))) { + set_error_buf(error_buf, error_buf_size, + "Load table segment section failed: " + "alloc memory failed."); + return false; + } + + memset(module->table_segments, 0, sizeof(WASMTableSeg) * table_segment_count); + + table_segment = module->table_segments; + for (i = 0; i < table_segment_count; i++, table_segment++) { + read_leb_uint32(p, p_end, table_index); + table_segment->table_index = table_index; + + /* initialize expression */ + if (!load_init_expr(&p, p_end, &(table_segment->base_offset), + error_buf, error_buf_size)) + return false; + + read_leb_uint32(p, p_end, function_count); + table_segment->function_count = function_count; + if (!(table_segment->func_indexes = (uint32 *) + wasm_malloc(sizeof(uint32) * function_count))) { + set_error_buf(error_buf, error_buf_size, + "Load table segment section failed: " + "alloc memory failed."); + return false; + } + for (j = 0; j < function_count; j++) { + read_leb_uint32(p, p_end, function_index); + table_segment->func_indexes[j] = function_index; + } + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load table segment section failed, " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load table segment section success.\n"); + return true; +} + +static bool +load_data_segment_section(const uint8 *buf, const uint8 *buf_end, + WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 data_seg_count, i, mem_index, data_seg_len; + WASMDataSeg *dataseg; + InitializerExpression init_expr; + + read_leb_uint32(p, p_end, data_seg_count); + + if (data_seg_count) { + module->data_seg_count = data_seg_count; + if (!(module->data_segments = + wasm_malloc(sizeof(WASMDataSeg*) * data_seg_count))) { + set_error_buf(error_buf, error_buf_size, + "Load data segment section failed, " + "alloc memory failed."); + return false; + } + + memset(module->data_segments, 0, sizeof(WASMDataSeg*) * data_seg_count); + + for (i = 0; i < data_seg_count; i++) { + read_leb_uint32(p, p_end, mem_index); + + if (!load_init_expr(&p, p_end, &init_expr, error_buf, error_buf_size)) + return false; + + read_leb_uint32(p, p_end, data_seg_len); + + if (!(dataseg = module->data_segments[i] = + wasm_malloc(sizeof(WASMDataSeg)))) { + set_error_buf(error_buf, error_buf_size, + "Load data segment section failed: " + "alloc memory failed."); + return false; + } + + memcpy(&dataseg->base_offset, &init_expr, sizeof(init_expr)); + + dataseg->memory_index = mem_index; + dataseg->data_length = data_seg_len; + CHECK_BUF(p, p_end, data_seg_len); + dataseg->data = (uint8*)p; + p += data_seg_len; + } + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load data segment section failed, " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load data segment section success.\n"); + return true; +} + +static bool +load_code_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + /* code has been loaded in function section, so pass it here */ + /* TODO: should check if there really have section_size code bytes */ + LOG_VERBOSE("Load code segment section success.\n"); + return true; +} + +static bool +load_start_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *p = buf, *p_end = buf_end; + uint32 start_function; + + read_leb_uint32(p, p_end, start_function); + + if (start_function) { + if (start_function >= module->function_count + module->import_function_count) { + set_error_buf(error_buf, error_buf_size, + "Load start section failed: " + "function index is out of range."); + return false; + } + module->start_function = start_function; + } + + if (p != p_end) { + set_error_buf(error_buf, error_buf_size, + "Load start section failed: " + "invalid section size."); + return false; + } + + LOG_VERBOSE("Load start section success.\n"); + return true; +} + +static bool +wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, + char *error_buf, uint32 error_buf_size); + +static bool +load_from_sections(WASMModule *module, WASMSection *sections, + char *error_buf, uint32 error_buf_size) +{ + WASMSection *section = sections; + const uint8 *buf, *buf_end, *buf_code = NULL, *buf_code_end = NULL; + uint32 i; + + while (section) { + if (section->section_type == SECTION_TYPE_CODE) { + buf_code = section->section_body; + buf_code_end = buf_code + section->section_body_size; + break; + } + section = section->next; + } + + if (!buf_code) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: find code section failed."); + return false; + } + + section = sections; + while (section) { + buf = section->section_body; + buf_end = buf + section->section_body_size; + switch (section->section_type) { + case SECTION_TYPE_USER: + /* unsupported user section, ignore it. */ + break; + case SECTION_TYPE_TYPE: + if (!load_type_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_IMPORT: + if (!load_import_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_FUNC: + if (!load_function_section(buf, buf_end, buf_code, buf_code_end, + module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_TABLE: + if (!load_table_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_MEMORY: + if (!load_memory_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_GLOBAL: + if (!load_global_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_EXPORT: + if (!load_export_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_START: + if (!load_start_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_ELEM: + if (!load_table_segment_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_CODE: + if (!load_code_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + case SECTION_TYPE_DATA: + if (!load_data_segment_section(buf, buf_end, module, error_buf, error_buf_size)) + return false; + break; + default: + set_error_buf(error_buf, error_buf_size, "invalid section id"); + return false; + } + + section = section->next; + } + + for (i = 0; i < module->function_count; i++) { + WASMFunction *func = module->functions[i]; + if (!wasm_loader_prepare_bytecode(module, func, error_buf, error_buf_size)) + return false; + } + + return true; +} + +static uint32 +branch_set_hash(const void *key) +{ + return ((uintptr_t)key >> 4) ^ ((uintptr_t)key >> 14); +} + +static bool +branch_set_key_equal(void *start_addr1, void *start_addr2) +{ + return start_addr1 == start_addr2 ? true : false; +} + +static void +branch_set_value_destroy(void *value) +{ + wasm_free(value); +} + +static WASMModule* +create_module(char *error_buf, uint32 error_buf_size) +{ + WASMModule *module = wasm_malloc(sizeof(WASMModule)); + + if (!module) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: alloc memory failed."); + return NULL; + } + + memset(module, 0, sizeof(WASMModule)); + + /* Set start_function to -1, means no start function */ + module->start_function = (uint32)-1; + + if (!(module->const_str_set = wasm_hash_map_create(32, false, + (HashFunc)wasm_string_hash, + (KeyEqualFunc)wasm_string_equal, + NULL, + wasm_free))) + goto fail; + + if (!(module->branch_set = wasm_hash_map_create(64, true, + branch_set_hash, + branch_set_key_equal, + NULL, + branch_set_value_destroy))) + goto fail; + + return module; + +fail: + wasm_loader_unload(module); + return NULL; +} + +WASMModule * +wasm_loader_load_from_sections(WASMSection *section_list, + char *error_buf, uint32 error_buf_size) +{ + WASMModule *module = create_module(error_buf, error_buf_size); + if (!module) + return NULL; + + if (!load_from_sections(module, section_list, error_buf, error_buf_size)) { + wasm_loader_unload(module); + return NULL; + } + + LOG_VERBOSE("Load module from sections success.\n"); + return module; +} + +static void +destroy_sections(WASMSection *section_list) +{ + WASMSection *section = section_list, *next; + while (section) { + next = section->next; + wasm_free(section); + section = next; + } +} + +static bool +create_sections(const uint8 *buf, uint32 size, + WASMSection **p_section_list, + char *error_buf, uint32 error_buf_size) +{ + WASMSection *section_list_end = NULL, *section; + const uint8 *p = buf, *p_end = buf + size/*, *section_body*/; + uint8 section_type; + uint32 section_size; + + p += 8; + while (p < p_end) { + CHECK_BUF(p, p_end, 1); + section_type = read_uint8(p); + if (section_type <= SECTION_TYPE_DATA) { + read_leb_uint32(p, p_end, section_size); + CHECK_BUF(p, p_end, section_size); + + if (!(section = wasm_malloc(sizeof(WASMSection)))) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: alloc memory failed."); + return false; + } + + memset(section, 0, sizeof(WASMSection)); + section->section_type = section_type; + section->section_body = p; + section->section_body_size = section_size; + + if (!*p_section_list) + *p_section_list = section_list_end = section; + else { + section_list_end->next = section; + section_list_end = section; + } + + p += section_size; + } + else { + set_error_buf(error_buf, error_buf_size, "invalid section type"); + return false; + } + } + + return true; +} + +static bool +load(const uint8 *buf, uint32 size, WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + const uint8 *buf_end = buf + size; + const uint8 *p = buf, *p_end = buf_end; + uint32 magic_number, version; + WASMSection *section_list = NULL; + + CHECK_BUF(p, p_end, sizeof(uint32)); + if ((magic_number = read_uint32(p)) != WASM_MAGIC_NUMBER) { + set_error_buf(error_buf, error_buf_size, "magic header not detected"); + return false; + } + + CHECK_BUF(p, p_end, sizeof(uint32)); + if ((version = read_uint32(p)) != WASM_CURRENT_VERSION) { + set_error_buf(error_buf, error_buf_size, "unknown binary version"); + return false; + } + + if (!create_sections(buf, size, §ion_list, error_buf, error_buf_size) + || !load_from_sections(module, section_list, error_buf, error_buf_size)) { + destroy_sections(section_list); + return false; + } + + destroy_sections(section_list); + return true; +} + +WASMModule* +wasm_loader_load(const uint8 *buf, uint32 size, char *error_buf, uint32 error_buf_size) +{ + WASMModule *module = wasm_malloc(sizeof(WASMModule)); + + if (!module) { + set_error_buf(error_buf, error_buf_size, + "WASM module load failed: alloc memory failed."); + return NULL; + } + + memset(module, 0, sizeof(WASMModule)); + + /* Set start_function to -1, means no start function */ + module->start_function = (uint32)-1; + + if (!(module->const_str_set = wasm_hash_map_create(32, false, + (HashFunc)wasm_string_hash, + (KeyEqualFunc)wasm_string_equal, + NULL, + wasm_free))) + goto fail; + + if (!(module->branch_set = wasm_hash_map_create(64, true, + branch_set_hash, + branch_set_key_equal, + NULL, + branch_set_value_destroy))) + goto fail; + + if (!load(buf, size, module, error_buf, error_buf_size)) + goto fail; + + LOG_VERBOSE("Load module success.\n"); + return module; + +fail: + wasm_loader_unload(module); + return NULL; +} + +void +wasm_loader_unload(WASMModule *module) +{ + uint32 i; + + if (!module) + return; + + if (module->types) { + for (i = 0; i < module->type_count; i++) { + if (module->types[i]) + wasm_free(module->types[i]); + } + wasm_free(module->types); + } + + if (module->imports) + wasm_free(module->imports); + + if (module->functions) { + for (i = 0; i < module->function_count; i++) { + if (module->functions[i]) + wasm_free(module->functions[i]); + } + wasm_free(module->functions); + } + + if (module->tables) + wasm_free(module->tables); + + if (module->memories) + wasm_free(module->memories); + + if (module->globals) + wasm_free(module->globals); + + if (module->exports) + wasm_free(module->exports); + + if (module->table_segments) { + for (i = 0; i < module->table_seg_count; i++) { + if (module->table_segments[i].func_indexes) + wasm_free(module->table_segments[i].func_indexes); + } + wasm_free(module->table_segments); + } + + if (module->data_segments) { + for (i = 0; i < module->data_seg_count; i++) { + if (module->data_segments[i]) + wasm_free(module->data_segments[i]); + } + wasm_free(module->data_segments); + } + + if (module->const_str_set) + wasm_hash_map_destroy(module->const_str_set); + + if (module->branch_set) + wasm_hash_map_destroy(module->branch_set); + + wasm_free(module); +} + +typedef struct block_addr { + uint8 block_type; + uint8 *else_addr; + uint8 *end_addr; +} block_addr; + +bool +wasm_loader_find_block_addr(HashMap *branch_set, + const uint8 *start_addr, + const uint8 *code_end_addr, + uint8 block_type, + uint8 **p_else_addr, + uint8 **p_end_addr, + char *error_buf, + uint32 error_buf_size) +{ + const uint8 *p = start_addr, *p_end = code_end_addr; + uint8 *else_addr = NULL; + uint32 block_nested_depth = 1, count, i, u32, u64; + uint8 opcode, u8; + block_addr *block; + + if ((block = wasm_hash_map_find(branch_set, (void*)start_addr))) { + if (block->block_type != block_type) + return false; + if (block_type == BLOCK_TYPE_IF) /* if block */ + *p_else_addr = block->else_addr; + *p_end_addr = block->end_addr; + return true; + } + + while (p < code_end_addr) { + opcode = *p++; + + switch (opcode) { + case WASM_OP_UNREACHABLE: + case WASM_OP_NOP: + break; + + case WASM_OP_BLOCK: + case WASM_OP_LOOP: + case WASM_OP_IF: + read_leb_uint32(p, p_end, u32); /* blocktype */ + block_nested_depth++; + break; + + case WASM_OP_ELSE: + if (block_type == BLOCK_TYPE_IF && block_nested_depth == 1) + else_addr = (uint8*)(p - 1); + break; + + case WASM_OP_END: + if (block_nested_depth == 1) { + if (block_type == BLOCK_TYPE_IF) + *p_else_addr = else_addr; + *p_end_addr = (uint8*)(p - 1); + + if ((block = wasm_malloc(sizeof(block_addr)))) { + block->block_type = block_type; + if (block_type == BLOCK_TYPE_IF) + block->else_addr = else_addr; + block->end_addr = (uint8*)(p - 1); + + if (!wasm_hash_map_insert(branch_set, (void*)start_addr, block)) + wasm_free(block); + } + + return true; + } + else + block_nested_depth--; + break; + + case WASM_OP_BR: + case WASM_OP_BR_IF: + read_leb_uint32(p, p_end, u32); /* labelidx */ + break; + + case WASM_OP_BR_TABLE: + read_leb_uint32(p, p_end, count); /* lable num */ + for (i = 0; i <= count; i++) /* lableidxs */ + read_leb_uint32(p, p_end, u32); + break; + + case WASM_OP_RETURN: + break; + + case WASM_OP_CALL: + read_leb_uint32(p, p_end, u32); /* funcidx */ + break; + + case WASM_OP_CALL_INDIRECT: + read_leb_uint32(p, p_end, u32); /* typeidx */ + read_leb_uint8(p, p_end, u8); /* 0x00 */ + break; + + case WASM_OP_DROP: + case WASM_OP_SELECT: + case WASM_OP_DROP_32: + case WASM_OP_DROP_64: + case WASM_OP_SELECT_32: + case WASM_OP_SELECT_64: + break; + + case WASM_OP_GET_LOCAL: + case WASM_OP_SET_LOCAL: + case WASM_OP_TEE_LOCAL: + case WASM_OP_GET_GLOBAL: + case WASM_OP_SET_GLOBAL: + read_leb_uint32(p, p_end, u32); /* localidx */ + break; + + case WASM_OP_I32_LOAD: + case WASM_OP_I64_LOAD: + case WASM_OP_F32_LOAD: + case WASM_OP_F64_LOAD: + case WASM_OP_I32_LOAD8_S: + case WASM_OP_I32_LOAD8_U: + case WASM_OP_I32_LOAD16_S: + case WASM_OP_I32_LOAD16_U: + case WASM_OP_I64_LOAD8_S: + case WASM_OP_I64_LOAD8_U: + case WASM_OP_I64_LOAD16_S: + case WASM_OP_I64_LOAD16_U: + case WASM_OP_I64_LOAD32_S: + case WASM_OP_I64_LOAD32_U: + case WASM_OP_I32_STORE: + case WASM_OP_I64_STORE: + case WASM_OP_F32_STORE: + case WASM_OP_F64_STORE: + case WASM_OP_I32_STORE8: + case WASM_OP_I32_STORE16: + case WASM_OP_I64_STORE8: + case WASM_OP_I64_STORE16: + case WASM_OP_I64_STORE32: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + break; + + case WASM_OP_MEMORY_SIZE: + case WASM_OP_MEMORY_GROW: + read_leb_uint32(p, p_end, u32); /* 0x00 */ + break; + + case WASM_OP_I32_CONST: + read_leb_uint32(p, p_end, u32); + break; + case WASM_OP_I64_CONST: + read_leb_uint64(p, p_end, u64); + break; + case WASM_OP_F32_CONST: + p += sizeof(float32); + break; + case WASM_OP_F64_CONST: + p += sizeof(float64); + break; + + case WASM_OP_I32_EQZ: + case WASM_OP_I32_EQ: + case WASM_OP_I32_NE: + case WASM_OP_I32_LT_S: + case WASM_OP_I32_LT_U: + case WASM_OP_I32_GT_S: + case WASM_OP_I32_GT_U: + case WASM_OP_I32_LE_S: + case WASM_OP_I32_LE_U: + case WASM_OP_I32_GE_S: + case WASM_OP_I32_GE_U: + case WASM_OP_I64_EQZ: + case WASM_OP_I64_EQ: + case WASM_OP_I64_NE: + case WASM_OP_I64_LT_S: + case WASM_OP_I64_LT_U: + case WASM_OP_I64_GT_S: + case WASM_OP_I64_GT_U: + case WASM_OP_I64_LE_S: + case WASM_OP_I64_LE_U: + case WASM_OP_I64_GE_S: + case WASM_OP_I64_GE_U: + case WASM_OP_F32_EQ: + case WASM_OP_F32_NE: + case WASM_OP_F32_LT: + case WASM_OP_F32_GT: + case WASM_OP_F32_LE: + case WASM_OP_F32_GE: + case WASM_OP_F64_EQ: + case WASM_OP_F64_NE: + case WASM_OP_F64_LT: + case WASM_OP_F64_GT: + case WASM_OP_F64_LE: + case WASM_OP_F64_GE: + case WASM_OP_I32_CLZ: + case WASM_OP_I32_CTZ: + case WASM_OP_I32_POPCNT: + case WASM_OP_I32_ADD: + case WASM_OP_I32_SUB: + case WASM_OP_I32_MUL: + case WASM_OP_I32_DIV_S: + case WASM_OP_I32_DIV_U: + case WASM_OP_I32_REM_S: + case WASM_OP_I32_REM_U: + case WASM_OP_I32_AND: + case WASM_OP_I32_OR: + case WASM_OP_I32_XOR: + case WASM_OP_I32_SHL: + case WASM_OP_I32_SHR_S: + case WASM_OP_I32_SHR_U: + case WASM_OP_I32_ROTL: + case WASM_OP_I32_ROTR: + case WASM_OP_I64_CLZ: + case WASM_OP_I64_CTZ: + case WASM_OP_I64_POPCNT: + case WASM_OP_I64_ADD: + case WASM_OP_I64_SUB: + case WASM_OP_I64_MUL: + case WASM_OP_I64_DIV_S: + case WASM_OP_I64_DIV_U: + case WASM_OP_I64_REM_S: + case WASM_OP_I64_REM_U: + case WASM_OP_I64_AND: + case WASM_OP_I64_OR: + case WASM_OP_I64_XOR: + case WASM_OP_I64_SHL: + case WASM_OP_I64_SHR_S: + case WASM_OP_I64_SHR_U: + case WASM_OP_I64_ROTL: + case WASM_OP_I64_ROTR: + case WASM_OP_F32_ABS: + case WASM_OP_F32_NEG: + case WASM_OP_F32_CEIL: + case WASM_OP_F32_FLOOR: + case WASM_OP_F32_TRUNC: + case WASM_OP_F32_NEAREST: + case WASM_OP_F32_SQRT: + case WASM_OP_F32_ADD: + case WASM_OP_F32_SUB: + case WASM_OP_F32_MUL: + case WASM_OP_F32_DIV: + case WASM_OP_F32_MIN: + case WASM_OP_F32_MAX: + case WASM_OP_F32_COPYSIGN: + case WASM_OP_F64_ABS: + case WASM_OP_F64_NEG: + case WASM_OP_F64_CEIL: + case WASM_OP_F64_FLOOR: + case WASM_OP_F64_TRUNC: + case WASM_OP_F64_NEAREST: + case WASM_OP_F64_SQRT: + case WASM_OP_F64_ADD: + case WASM_OP_F64_SUB: + case WASM_OP_F64_MUL: + case WASM_OP_F64_DIV: + case WASM_OP_F64_MIN: + case WASM_OP_F64_MAX: + case WASM_OP_F64_COPYSIGN: + case WASM_OP_I32_WRAP_I64: + case WASM_OP_I32_TRUNC_S_F32: + case WASM_OP_I32_TRUNC_U_F32: + case WASM_OP_I32_TRUNC_S_F64: + case WASM_OP_I32_TRUNC_U_F64: + case WASM_OP_I64_EXTEND_S_I32: + case WASM_OP_I64_EXTEND_U_I32: + case WASM_OP_I64_TRUNC_S_F32: + case WASM_OP_I64_TRUNC_U_F32: + case WASM_OP_I64_TRUNC_S_F64: + case WASM_OP_I64_TRUNC_U_F64: + case WASM_OP_F32_CONVERT_S_I32: + case WASM_OP_F32_CONVERT_U_I32: + case WASM_OP_F32_CONVERT_S_I64: + case WASM_OP_F32_CONVERT_U_I64: + case WASM_OP_F32_DEMOTE_F64: + case WASM_OP_F64_CONVERT_S_I32: + case WASM_OP_F64_CONVERT_U_I32: + case WASM_OP_F64_CONVERT_S_I64: + case WASM_OP_F64_CONVERT_U_I64: + case WASM_OP_F64_PROMOTE_F32: + case WASM_OP_I32_REINTERPRET_F32: + case WASM_OP_I64_REINTERPRET_F64: + case WASM_OP_F32_REINTERPRET_I32: + case WASM_OP_F64_REINTERPRET_I64: + break; + + default: + LOG_ERROR("WASM loader find block addr failed: invalid opcode %02x.\n", + opcode); + break; + } + } + + (void)u32; + (void)u64; + (void)u8; + return false; +} + +#define REF_I32 VALUE_TYPE_I32 +#define REF_F32 VALUE_TYPE_F32 +#define REF_I64_1 VALUE_TYPE_I64 +#define REF_I64_2 VALUE_TYPE_I64 +#define REF_F64_1 VALUE_TYPE_F64 +#define REF_F64_2 VALUE_TYPE_F64 + +typedef struct BranchBlock { + uint8 block_type; + uint8 return_type; + bool jumped_by_br; + uint8 *start_addr; + uint8 *else_addr; + uint8 *end_addr; + uint32 stack_cell_num; +} BranchBlock; + +static void* +memory_realloc(void *mem_old, uint32 size_old, uint32 size_new) +{ + uint8 *mem_new; + wasm_assert(size_new > size_old); + if ((mem_new = wasm_malloc(size_new))) { + memcpy(mem_new, mem_old, size_old); + memset(mem_new + size_old, 0, size_new - size_old); + wasm_free(mem_old); + } + return mem_new; +} + +#define MEM_REALLOC(mem, size_old, size_new) do { \ + void *mem_new = memory_realloc(mem, size_old, size_new);\ + if (!mem_new) { \ + set_error_buf(error_buf, error_buf_size, \ + "WASM loader prepare bytecode failed: " \ + "alloc memory failed"); \ + goto fail; \ + } \ + mem = mem_new; \ + } while (0) + +static bool +check_stack_push(uint8 **p_frame_ref_bottom, uint8 **p_frame_ref_boundary, + uint8 **p_frame_ref, uint32 *p_frame_ref_size, + uint32 stack_cell_num, + char *error_buf, uint32 error_buf_size) +{ + if (*p_frame_ref >= *p_frame_ref_boundary) { + MEM_REALLOC(*p_frame_ref_bottom, *p_frame_ref_size, + *p_frame_ref_size + 16); + *p_frame_ref_size += 16; + *p_frame_ref_boundary = *p_frame_ref_bottom + *p_frame_ref_size; + *p_frame_ref = *p_frame_ref_bottom + stack_cell_num; + } + return true; +fail: + return false; +} + +#define CHECK_STACK_PUSH() do { \ + if (!check_stack_push(&frame_ref_bottom, &frame_ref_boundary,\ + &frame_ref, &frame_ref_size, \ + stack_cell_num, \ + error_buf, error_buf_size)) \ + goto fail; \ + } while (0) + +static bool +check_stack_pop(uint8 type, uint8 *frame_ref, uint32 stack_cell_num, + char *error_buf, uint32 error_buf_size, + const char *type_str) +{ + if (((type == VALUE_TYPE_I32 || type == VALUE_TYPE_F32) + && stack_cell_num < 1) + || ((type == VALUE_TYPE_I64 || type == VALUE_TYPE_F64) + && stack_cell_num < 2)) { + set_error_buf(error_buf, error_buf_size, + "type mismatch: expected data but stack was empty"); + return false; + } + + if ((type == VALUE_TYPE_I32 && *(frame_ref - 1) != REF_I32) + || (type == VALUE_TYPE_F32 && *(frame_ref - 1) != REF_F32) + || (type == VALUE_TYPE_I64 + && (*(frame_ref - 2) != REF_I64_1 || *(frame_ref - 1) != REF_I64_2)) + || (type == VALUE_TYPE_F64 + && (*(frame_ref - 2) != REF_F64_1 || *(frame_ref - 1) != REF_F64_2))) { + if (error_buf != NULL) + snprintf(error_buf, error_buf_size, "%s%s%s", + "type mismatch: expected ", type_str, " but got other"); + return false; + } + return true; +} + +#define CHECK_STACK_POP(TYPE, type) do { \ + if (!check_stack_pop(VALUE_TYPE_##TYPE, \ + frame_ref, stack_cell_num, \ + error_buf, error_buf_size, #type)) \ + goto fail; \ + } while (0) + +#define PUSH_I32() do { \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_I32; \ + stack_cell_num++; \ + if (stack_cell_num > max_stack_cell_num) \ + max_stack_cell_num = stack_cell_num; \ + } while (0) + +#define PUSH_F32() do { \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_F32; \ + stack_cell_num++; \ + if (stack_cell_num > max_stack_cell_num) \ + max_stack_cell_num = stack_cell_num; \ + } while (0) + +#define PUSH_I64() do { \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_I64_1; \ + stack_cell_num++; \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_I64_2; \ + stack_cell_num++; \ + if (stack_cell_num > max_stack_cell_num) \ + max_stack_cell_num = stack_cell_num; \ + } while (0) + +#define PUSH_F64() do { \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_F64_1; \ + stack_cell_num++; \ + CHECK_STACK_PUSH(); \ + *frame_ref++ = REF_F64_2; \ + stack_cell_num++; \ + if (stack_cell_num > max_stack_cell_num) \ + max_stack_cell_num = stack_cell_num; \ + } while (0) + +#define POP_I32() do { \ + CHECK_STACK_POP(I32, i32); \ + stack_cell_num--; \ + frame_ref--; \ + } while (0) + +#define POP_I64() do { \ + CHECK_STACK_POP(I64, i64); \ + stack_cell_num -= 2; \ + frame_ref -= 2; \ + } while (0) + +#define POP_F32() do { \ + CHECK_STACK_POP(F32, f32); \ + stack_cell_num--; \ + frame_ref--; \ + } while (0) + +#define POP_F64() do { \ + CHECK_STACK_POP(F64, f64); \ + stack_cell_num -= 2; \ + frame_ref -= 2; \ + } while (0) + +static bool +push_type(uint8 type, uint8 **p_frame_ref_bottom, + uint8 **p_frame_ref_boundary, + uint8 **p_frame_ref, uint32 *p_frame_ref_size, + uint32 *p_stack_cell_num, uint32 *p_max_stack_cell_num, + char *error_buf, uint32 error_buf_size) +{ + uint8 *frame_ref = *p_frame_ref; + uint32 frame_ref_size = *p_frame_ref_size; + uint32 max_stack_cell_num = *p_max_stack_cell_num; + uint32 stack_cell_num = *p_stack_cell_num; + + switch (type) { + case VALUE_TYPE_I64: + case VALUE_TYPE_F64: + if (!check_stack_push(p_frame_ref_bottom, p_frame_ref_boundary, + &frame_ref, &frame_ref_size, + stack_cell_num, + error_buf, error_buf_size)) + goto fail; + *frame_ref++ = type; + stack_cell_num++; + if (stack_cell_num > max_stack_cell_num) + max_stack_cell_num = stack_cell_num; + case VALUE_TYPE_I32: + case VALUE_TYPE_F32: + if (!check_stack_push(p_frame_ref_bottom, p_frame_ref_boundary, + &frame_ref, &frame_ref_size, + stack_cell_num, + error_buf, error_buf_size)) + goto fail; + *frame_ref++ = type; + stack_cell_num++; + if (stack_cell_num > max_stack_cell_num) + max_stack_cell_num = stack_cell_num; + break; + } + + *p_frame_ref = frame_ref; + *p_frame_ref_size = frame_ref_size; + *p_max_stack_cell_num = max_stack_cell_num; + *p_stack_cell_num = stack_cell_num; + return true; +fail: + return false; +} + +#define PUSH_TYPE(type) do { \ + if (!push_type(type, &frame_ref_bottom, \ + &frame_ref_boundary, \ + &frame_ref, &frame_ref_size, \ + &stack_cell_num, &max_stack_cell_num, \ + error_buf, error_buf_size)) \ + goto fail; \ + } while (0) + +static bool +pop_type(uint8 type, uint8 **p_frame_ref, uint32 *p_stack_cell_num, + char *error_buf, uint32 error_buf_size) +{ + char *type_str[] = { "f64", "f32", "i64", "i32" }; + switch (type) { + case VALUE_TYPE_I64: + case VALUE_TYPE_F64: + if (!check_stack_pop(type, *p_frame_ref, *p_stack_cell_num, + error_buf, error_buf_size, + type_str[type - VALUE_TYPE_F64])) + return false; + *p_frame_ref -= 2; + *p_stack_cell_num -= 2; + break; + case VALUE_TYPE_I32: + case VALUE_TYPE_F32: + if (!check_stack_pop(type, *p_frame_ref, *p_stack_cell_num, + error_buf, error_buf_size, + type_str[type - VALUE_TYPE_F64])) + return false; + *p_frame_ref -= 1; + *p_stack_cell_num -= 1; + break; + } + return true; +} + +#define POP_TYPE(type) do { \ + if (!pop_type(type, &frame_ref, &stack_cell_num,\ + error_buf, error_buf_size)) \ + goto fail; \ + } while (0) + +#define CHECK_CSP_PUSH() do { \ + if (frame_csp >= frame_csp_boundary) { \ + MEM_REALLOC(frame_csp_bottom, frame_csp_size, \ + frame_csp_size + 8 * sizeof(BranchBlock));\ + frame_csp_size += 8 * sizeof(BranchBlock); \ + frame_csp_boundary = frame_csp_bottom + \ + frame_csp_size / sizeof(BranchBlock); \ + frame_csp = frame_csp_bottom + csp_num; \ + } \ + } while (0) + +#define CHECK_CSP_POP() do { \ + if (csp_num < 1) { \ + set_error_buf(error_buf, error_buf_size, \ + "type mismatch: expected data but block stack was empty");\ + goto fail; \ + } \ + } while (0) + +#define PUSH_CSP(type, ret_type, _start_addr) do { \ + CHECK_CSP_PUSH(); \ + frame_csp->block_type = type; \ + frame_csp->jumped_by_br = false; \ + frame_csp->return_type = ret_type; \ + frame_csp->start_addr = _start_addr; \ + frame_csp->else_addr = NULL; \ + frame_csp->end_addr = NULL; \ + frame_csp->stack_cell_num = stack_cell_num; \ + frame_csp++; \ + csp_num++; \ + if (csp_num > max_csp_num) \ + max_csp_num = csp_num; \ + } while (0) + +#define POP_CSP() do { \ + CHECK_CSP_POP(); \ + frame_csp--; \ + csp_num--; \ + } while (0) + +#define GET_LOCAL_INDEX_AND_TYPE() do { \ + read_leb_uint32(p, p_end, local_idx); \ + if (local_idx >= param_count + local_count) { \ + set_error_buf(error_buf, error_buf_size, \ + "invalid index: local index out of range"); \ + goto fail; \ + } \ + local_type = local_idx < param_count \ + ? param_types[local_idx] \ + : local_types[local_idx - param_count]; \ + } while (0) + +#define CHECK_BR(depth) do { \ + if (csp_num < depth + 1) { \ + set_error_buf(error_buf, error_buf_size, "type mismatch: " \ + "expected data but block stack was empty"); \ + goto fail; \ + } \ + if ((frame_csp - (depth + 1))->block_type != BLOCK_TYPE_LOOP) { \ + uint8 tmp_ret_type = (frame_csp - (depth + 1))->return_type; \ + if ((tmp_ret_type == VALUE_TYPE_I32 \ + && (stack_cell_num < 1 || *(frame_ref - 1) != REF_I32)) \ + || (tmp_ret_type == VALUE_TYPE_F32 \ + && (stack_cell_num < 1 || *(frame_ref - 1) != REF_F32))\ + || (tmp_ret_type == VALUE_TYPE_I64 \ + && (stack_cell_num < 2 \ + || *(frame_ref - 2) != REF_I64_1 \ + || *(frame_ref - 1) != REF_I64_2)) \ + || (tmp_ret_type == VALUE_TYPE_F64 \ + && (stack_cell_num < 2 \ + || *(frame_ref - 2) != REF_F64_1 \ + || *(frame_ref - 1) != REF_F64_2))) { \ + set_error_buf(error_buf, error_buf_size, "type mismatch: " \ + "expected data but stack was empty or other type"); \ + goto fail; \ + } \ + (frame_csp - (depth + 1))->jumped_by_br = true; \ + } \ + } while (0) + +static bool +wasm_loader_prepare_bytecode(WASMModule *module, WASMFunction *func, + char *error_buf, uint32 error_buf_size) +{ + HashMap *branch_set = module->branch_set; + block_addr *block; + uint8 *p = func->code, *p_end = func->code + func->code_size; + uint8 *frame_lp_ref_bottom = NULL; + uint8 *frame_ref_bottom = NULL, *frame_ref_boundary, *frame_ref; + BranchBlock *frame_csp_bottom = NULL, *frame_csp_boundary, *frame_csp; + uint32 param_count, local_count, global_count; + uint32 param_cell_num, local_cell_num; + uint32 max_stack_cell_num = 0, max_csp_num = 0; + uint32 stack_cell_num = 0, csp_num = 0; + uint32 frame_ref_size, frame_csp_size; + uint8 *param_types, ret_type, *local_types, local_type, global_type; + uint32 count, i, local_idx, global_idx, block_return_type, depth, u32; + int32 i32, i32_const = 0; + int64 i64; + uint8 opcode, u8; + bool return_value = false, is_i32_const = false; + + global_count = module->import_global_count + module->global_count; + + param_count = func->func_type->param_count; + param_types = func->func_type->types; + ret_type = func->func_type->result_count + ? param_types[param_count] : VALUE_TYPE_VOID; + + local_count = func->local_count; + local_types = func->local_types; + + param_cell_num = wasm_get_cell_num(param_types, param_count); + local_cell_num = wasm_get_cell_num(local_types, local_count); + + if (!(frame_lp_ref_bottom = wasm_malloc(param_cell_num + local_cell_num))) { + set_error_buf(error_buf, error_buf_size, + "WASM loader prepare bytecode failed: alloc memory failed"); + goto fail; + } + memset(frame_lp_ref_bottom, 0, param_cell_num + local_cell_num); + + frame_ref_size = 32; + if (!(frame_ref_bottom = frame_ref = wasm_malloc(frame_ref_size))) { + set_error_buf(error_buf, error_buf_size, + "WASM loader prepare bytecode failed: alloc memory failed"); + goto fail; + } + memset(frame_ref_bottom, 0, frame_ref_size); + frame_ref_boundary = frame_ref_bottom + frame_ref_size; + + frame_csp_size = sizeof(BranchBlock) * 8; + if (!(frame_csp_bottom = frame_csp = wasm_malloc(frame_csp_size))) { + set_error_buf(error_buf, error_buf_size, + "WASM loader prepare bytecode failed: alloc memory failed"); + goto fail; + } + + memset(frame_csp_bottom, 0, frame_csp_size); + frame_csp_boundary = frame_csp_bottom + 8; + + PUSH_CSP(BLOCK_TYPE_FUNCTION, ret_type, p); + (frame_csp - 1)->jumped_by_br = true; + + while (p < p_end) { + opcode = *p++; + + switch (opcode) { + case WASM_OP_UNREACHABLE: + goto handle_op_br; + + case WASM_OP_NOP: + break; + + case WASM_OP_BLOCK: + read_leb_uint32(p, p_end, block_return_type); + PUSH_CSP(BLOCK_TYPE_BLOCK, block_return_type, p); + break; + + case WASM_OP_LOOP: + read_leb_uint32(p, p_end, block_return_type); + PUSH_CSP(BLOCK_TYPE_LOOP, block_return_type, p); + break; + + case WASM_OP_IF: + POP_I32(); + read_leb_uint32(p, p_end, block_return_type); + PUSH_CSP(BLOCK_TYPE_IF, block_return_type, p); + if (!is_i32_const) + (frame_csp - 1)->jumped_by_br = true; + else { + if (!i32_const) { + if(!wasm_loader_find_block_addr(branch_set, + (frame_csp - 1)->start_addr, + p_end, + (frame_csp - 1)->block_type, + &(frame_csp - 1)->else_addr, + &(frame_csp - 1)->end_addr, + error_buf, error_buf_size)) + goto fail; + + if ((frame_csp - 1)->else_addr) + p = (frame_csp - 1)->else_addr; + else + p = (frame_csp - 1)->end_addr; + } + } + break; + + case WASM_OP_ELSE: + if (csp_num < 2) { + set_error_buf(error_buf, error_buf_size, "invalid else"); + goto fail; + } + + if ((frame_csp - 1)->block_type != BLOCK_TYPE_IF) { + set_error_buf(error_buf, error_buf_size, "invalid else"); + goto fail; + } + + (frame_csp - 1)->else_addr = p - 1; + stack_cell_num = (frame_csp - 1)->stack_cell_num; + frame_ref = frame_ref_bottom + stack_cell_num; + break; + + case WASM_OP_END: + { + POP_CSP(); + + POP_TYPE(frame_csp->return_type); + PUSH_TYPE(frame_csp->return_type); + + if (csp_num > 0) { + frame_csp->end_addr = p - 1; + + if (wasm_hash_map_find(branch_set, (void*)frame_csp->start_addr)) + break; + + if (!(block = wasm_malloc(sizeof(block_addr)))) { + set_error_buf(error_buf, error_buf_size, + "WASM loader prepare bytecode failed: " + "alloc memory failed"); + goto fail; + } + + block->block_type = frame_csp->block_type; + block->else_addr = (void*)frame_csp->else_addr; + block->end_addr = (void*)frame_csp->end_addr; + + if (!wasm_hash_map_insert(branch_set, (void*)frame_csp->start_addr, + block)) { + set_error_buf(error_buf, error_buf_size, + "WASM loader prepare bytecode failed: " + "alloc memory failed"); + wasm_free(block); + goto fail; + } + } + break; + } + + case WASM_OP_BR: + { + read_leb_uint32(p, p_end, depth); + CHECK_BR(depth); + +handle_op_br: + for (i = 1; i <= csp_num; i++) + if ((frame_csp - i)->jumped_by_br) + break; + + block_return_type = (frame_csp - i)->return_type; + + if(!wasm_loader_find_block_addr(branch_set, + (frame_csp - i)->start_addr, + p_end, + (frame_csp - i)->block_type, + &(frame_csp - i)->else_addr, + &(frame_csp - i)->end_addr, + error_buf, error_buf_size)) + goto fail; + + stack_cell_num = (frame_csp - i)->stack_cell_num; + frame_ref = frame_ref_bottom + stack_cell_num; + csp_num -= i - 1; + frame_csp -= i - 1; + + if ((frame_csp - 1)->block_type == BLOCK_TYPE_IF + && (frame_csp - 1)->else_addr != NULL + && p <= (frame_csp - 1)->else_addr) + p = (frame_csp - 1)->else_addr; + else { + p = (frame_csp - 1)->end_addr; + PUSH_TYPE(block_return_type); + } + + break; + } + + case WASM_OP_BR_IF: + read_leb_uint32(p, p_end, depth); + POP_I32(); + CHECK_BR(depth); + if (!is_i32_const) + (frame_csp - (depth + 1))->jumped_by_br = true; + else { + if (i32_const) + goto handle_op_br; + } + break; + + case WASM_OP_BR_TABLE: + { + read_leb_uint32(p, p_end, count); + POP_I32(); + + /* TODO: check the const */ + for (i = 0; i <= count; i++) { + read_leb_uint32(p, p_end, depth); + CHECK_BR(depth); + } + goto handle_op_br; + } + + case WASM_OP_RETURN: + { + POP_TYPE(ret_type); + PUSH_TYPE(ret_type); + + if(!wasm_loader_find_block_addr(branch_set, + (frame_csp - 1)->start_addr, + p_end, + (frame_csp - 1)->block_type, + &(frame_csp - 1)->else_addr, + &(frame_csp - 1)->end_addr, + error_buf, error_buf_size)) + goto fail; + + stack_cell_num = (frame_csp - 1)->stack_cell_num; + frame_ref = frame_ref_bottom + stack_cell_num; + if ((frame_csp - 1)->block_type == BLOCK_TYPE_IF + && p <= (frame_csp - 1)->else_addr) { + p = (frame_csp - 1)->else_addr; + } + else { + p = (frame_csp - 1)->end_addr; + PUSH_TYPE((frame_csp - 1)->return_type); + } + break; + } + + case WASM_OP_CALL: + { + WASMType *func_type; + uint32 func_idx; + int32 idx; + + read_leb_uint32(p, p_end, func_idx); + + if (func_idx >= module->import_function_count + module->function_count) { + set_error_buf(error_buf, error_buf_size, "function index is overflow"); + goto fail; + } + + if (func_idx < module->import_function_count) + func_type = module->import_functions[func_idx].u.function.func_type; + else + func_type = + module->functions[func_idx - module->import_function_count]->func_type; + + for (idx = func_type->param_count - 1; idx >= 0; idx--) + POP_TYPE(func_type->types[idx]); + + if (func_type->result_count) + PUSH_TYPE(func_type->types[func_type->param_count]); + break; + } + + case WASM_OP_CALL_INDIRECT: + { + int32 idx; + WASMType *func_type; + uint32 type_idx; + + read_leb_uint32(p, p_end, type_idx); + read_leb_uint8(p, p_end, u8); /* 0x00 */ + POP_I32(); + + if (type_idx >= module->type_count) { + set_error_buf(error_buf, error_buf_size, "function index is overflow"); + goto fail; + } + + func_type = module->types[type_idx]; + + for (idx = func_type->param_count - 1; idx >= 0; idx--) + POP_TYPE(func_type->types[idx]); + + PUSH_TYPE(func_type->types[func_type->param_count]); + break; + } + + case WASM_OP_DROP: + { + if (stack_cell_num <= 0) { + set_error_buf(error_buf, error_buf_size, + "invalid drop: stack was empty"); + goto fail; + } + + if (*(frame_ref - 1) == REF_I32 + || *(frame_ref - 1) == REF_F32) { + frame_ref--; + stack_cell_num--; + *(p - 1) = WASM_OP_DROP_32; + } + else { + if (stack_cell_num <= 1) { + set_error_buf(error_buf, error_buf_size, + "invalid drop: stack was empty"); + goto fail; + } + frame_ref -= 2; + stack_cell_num -= 2; + *(p - 1) = WASM_OP_DROP_64; + } + break; + } + + case WASM_OP_SELECT: + { + uint8 ref_type; + + POP_I32(); + + if (stack_cell_num <= 0) { + set_error_buf(error_buf, error_buf_size, + "invalid drop: stack was empty"); + goto fail; + } + + switch (*(frame_ref - 1)) { + case REF_I32: + case REF_F32: + *(p - 1) = WASM_OP_SELECT_32; + break; + case REF_I64_2: + case REF_F64_2: + *(p - 1) = WASM_OP_SELECT_64; + break; + } + + ref_type = *(frame_ref - 1); + POP_TYPE(ref_type); + POP_TYPE(ref_type); + PUSH_TYPE(ref_type); + break; + } + + case WASM_OP_GET_LOCAL: + { + GET_LOCAL_INDEX_AND_TYPE(); + PUSH_TYPE(local_type); + break; + } + + case WASM_OP_SET_LOCAL: + { + GET_LOCAL_INDEX_AND_TYPE(); + POP_TYPE(local_type); + break; + } + + case WASM_OP_TEE_LOCAL: + { + GET_LOCAL_INDEX_AND_TYPE(); + POP_TYPE(local_type); + PUSH_TYPE(local_type); + break; + } + + case WASM_OP_GET_GLOBAL: + { + read_leb_uint32(p, p_end, global_idx); + if (global_idx >= global_count) { + set_error_buf(error_buf, error_buf_size, + "invalid index: global index out of range"); + goto fail; + } + + global_type = global_idx < module->import_global_count + ? module->import_globals[global_idx].u.global.type + :module->globals[global_idx - module->import_global_count].type; + + PUSH_TYPE(global_type); + break; + } + + case WASM_OP_SET_GLOBAL: + { + read_leb_uint32(p, p_end, global_idx); + if (global_idx >= global_count) { + set_error_buf(error_buf, error_buf_size, + "invalid index: global index out of range"); + goto fail; + } + + global_type = global_idx < module->import_global_count + ? module->import_globals[global_idx].u.global.type + : module->globals[global_idx - module->import_global_count].type; + + POP_TYPE(global_type); + break; + } + + case WASM_OP_I32_LOAD: + case WASM_OP_I32_LOAD8_S: + case WASM_OP_I32_LOAD8_U: + case WASM_OP_I32_LOAD16_S: + case WASM_OP_I32_LOAD16_U: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I64_LOAD: + case WASM_OP_I64_LOAD8_S: + case WASM_OP_I64_LOAD8_U: + case WASM_OP_I64_LOAD16_S: + case WASM_OP_I64_LOAD16_U: + case WASM_OP_I64_LOAD32_S: + case WASM_OP_I64_LOAD32_U: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I32(); + PUSH_I64(); + break; + + case WASM_OP_F32_LOAD: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I32(); + PUSH_F32(); + break; + + case WASM_OP_F64_LOAD: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I32(); + PUSH_F64(); + break; + + case WASM_OP_I32_STORE: + case WASM_OP_I32_STORE8: + case WASM_OP_I32_STORE16: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I32(); + POP_I32(); + break; + + case WASM_OP_I64_STORE: + case WASM_OP_I64_STORE8: + case WASM_OP_I64_STORE16: + case WASM_OP_I64_STORE32: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_I64(); + POP_I32(); + break; + + case WASM_OP_F32_STORE: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_F32(); + POP_I32(); + break; + + case WASM_OP_F64_STORE: + read_leb_uint32(p, p_end, u32); /* align */ + read_leb_uint32(p, p_end, u32); /* offset */ + POP_F64(); + POP_I32(); + break; + + case WASM_OP_MEMORY_SIZE: + read_leb_uint32(p, p_end, u32); /* 0x00 */ + PUSH_I32(); + break; + + case WASM_OP_MEMORY_GROW: + read_leb_uint32(p, p_end, u32); /* 0x00 */ + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I32_CONST: + read_leb_int32(p, p_end, i32_const); + /* Currently we only track simple I32_CONST opcode. */ + is_i32_const = true; + PUSH_I32(); + break; + + case WASM_OP_I64_CONST: + read_leb_int64(p, p_end, i64); + PUSH_I64(); + break; + + case WASM_OP_F32_CONST: + p += sizeof(float32); + PUSH_F32(); + break; + + case WASM_OP_F64_CONST: + p += sizeof(float64); + PUSH_F64(); + break; + + case WASM_OP_I32_EQZ: + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I32_EQ: + case WASM_OP_I32_NE: + case WASM_OP_I32_LT_S: + case WASM_OP_I32_LT_U: + case WASM_OP_I32_GT_S: + case WASM_OP_I32_GT_U: + case WASM_OP_I32_LE_S: + case WASM_OP_I32_LE_U: + case WASM_OP_I32_GE_S: + case WASM_OP_I32_GE_U: + POP_I32(); + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I64_EQZ: + POP_I64(); + PUSH_I32(); + break; + + case WASM_OP_I64_EQ: + case WASM_OP_I64_NE: + case WASM_OP_I64_LT_S: + case WASM_OP_I64_LT_U: + case WASM_OP_I64_GT_S: + case WASM_OP_I64_GT_U: + case WASM_OP_I64_LE_S: + case WASM_OP_I64_LE_U: + case WASM_OP_I64_GE_S: + case WASM_OP_I64_GE_U: + POP_I64(); + POP_I64(); + PUSH_I32(); + break; + + case WASM_OP_F32_EQ: + case WASM_OP_F32_NE: + case WASM_OP_F32_LT: + case WASM_OP_F32_GT: + case WASM_OP_F32_LE: + case WASM_OP_F32_GE: + POP_F32(); + POP_F32(); + PUSH_I32(); + break; + + case WASM_OP_F64_EQ: + case WASM_OP_F64_NE: + case WASM_OP_F64_LT: + case WASM_OP_F64_GT: + case WASM_OP_F64_LE: + case WASM_OP_F64_GE: + POP_F64(); + POP_F64(); + PUSH_I32(); + break; + + break; + + case WASM_OP_I32_CLZ: + case WASM_OP_I32_CTZ: + case WASM_OP_I32_POPCNT: + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I32_ADD: + case WASM_OP_I32_SUB: + case WASM_OP_I32_MUL: + case WASM_OP_I32_DIV_S: + case WASM_OP_I32_DIV_U: + case WASM_OP_I32_REM_S: + case WASM_OP_I32_REM_U: + case WASM_OP_I32_AND: + case WASM_OP_I32_OR: + case WASM_OP_I32_XOR: + case WASM_OP_I32_SHL: + case WASM_OP_I32_SHR_S: + case WASM_OP_I32_SHR_U: + case WASM_OP_I32_ROTL: + case WASM_OP_I32_ROTR: + POP_I32(); + POP_I32(); + PUSH_I32(); + break; + + case WASM_OP_I64_CLZ: + case WASM_OP_I64_CTZ: + case WASM_OP_I64_POPCNT: + POP_I64(); + PUSH_I64(); + break; + + case WASM_OP_I64_ADD: + case WASM_OP_I64_SUB: + case WASM_OP_I64_MUL: + case WASM_OP_I64_DIV_S: + case WASM_OP_I64_DIV_U: + case WASM_OP_I64_REM_S: + case WASM_OP_I64_REM_U: + case WASM_OP_I64_AND: + case WASM_OP_I64_OR: + case WASM_OP_I64_XOR: + case WASM_OP_I64_SHL: + case WASM_OP_I64_SHR_S: + case WASM_OP_I64_SHR_U: + case WASM_OP_I64_ROTL: + case WASM_OP_I64_ROTR: + POP_I64(); + POP_I64(); + PUSH_I64(); + break; + + case WASM_OP_F32_ABS: + case WASM_OP_F32_NEG: + case WASM_OP_F32_CEIL: + case WASM_OP_F32_FLOOR: + case WASM_OP_F32_TRUNC: + case WASM_OP_F32_NEAREST: + case WASM_OP_F32_SQRT: + POP_F32(); + PUSH_F32(); + break; + + case WASM_OP_F32_ADD: + case WASM_OP_F32_SUB: + case WASM_OP_F32_MUL: + case WASM_OP_F32_DIV: + case WASM_OP_F32_MIN: + case WASM_OP_F32_MAX: + case WASM_OP_F32_COPYSIGN: + POP_F32(); + POP_F32(); + PUSH_F32(); + break; + + case WASM_OP_F64_ABS: + case WASM_OP_F64_NEG: + case WASM_OP_F64_CEIL: + case WASM_OP_F64_FLOOR: + case WASM_OP_F64_TRUNC: + case WASM_OP_F64_NEAREST: + case WASM_OP_F64_SQRT: + POP_F64(); + PUSH_F64(); + break; + + case WASM_OP_F64_ADD: + case WASM_OP_F64_SUB: + case WASM_OP_F64_MUL: + case WASM_OP_F64_DIV: + case WASM_OP_F64_MIN: + case WASM_OP_F64_MAX: + case WASM_OP_F64_COPYSIGN: + POP_F64(); + POP_F64(); + PUSH_F64(); + break; + + case WASM_OP_I32_WRAP_I64: + POP_I64(); + PUSH_I32(); + break; + + case WASM_OP_I32_TRUNC_S_F32: + case WASM_OP_I32_TRUNC_U_F32: + POP_F32(); + PUSH_I32(); + break; + + case WASM_OP_I32_TRUNC_S_F64: + case WASM_OP_I32_TRUNC_U_F64: + POP_F64(); + PUSH_I32(); + break; + + case WASM_OP_I64_EXTEND_S_I32: + case WASM_OP_I64_EXTEND_U_I32: + POP_I32(); + PUSH_I64(); + break; + + case WASM_OP_I64_TRUNC_S_F32: + case WASM_OP_I64_TRUNC_U_F32: + POP_F32(); + PUSH_I64(); + break; + + case WASM_OP_I64_TRUNC_S_F64: + case WASM_OP_I64_TRUNC_U_F64: + POP_F64(); + PUSH_I64(); + break; + + case WASM_OP_F32_CONVERT_S_I32: + case WASM_OP_F32_CONVERT_U_I32: + POP_I32(); + PUSH_F32(); + break; + + case WASM_OP_F32_CONVERT_S_I64: + case WASM_OP_F32_CONVERT_U_I64: + POP_I64(); + PUSH_F32(); + break; + + case WASM_OP_F32_DEMOTE_F64: + POP_F64(); + PUSH_F32(); + break; + + case WASM_OP_F64_CONVERT_S_I32: + case WASM_OP_F64_CONVERT_U_I32: + POP_I32(); + PUSH_F64(); + break; + + case WASM_OP_F64_CONVERT_S_I64: + case WASM_OP_F64_CONVERT_U_I64: + POP_I64(); + PUSH_F64(); + break; + + case WASM_OP_F64_PROMOTE_F32: + POP_F32(); + PUSH_F64(); + break; + + case WASM_OP_I32_REINTERPRET_F32: + POP_F32(); + PUSH_I32(); + break; + + case WASM_OP_I64_REINTERPRET_F64: + POP_F64(); + PUSH_I64(); + break; + + case WASM_OP_F32_REINTERPRET_I32: + POP_I32(); + PUSH_F32(); + break; + + case WASM_OP_F64_REINTERPRET_I64: + POP_I64(); + PUSH_F64(); + break; + + default: + LOG_ERROR("WASM loader find block addr failed: invalid opcode %02x.\n", + opcode); + break; + } + + if (opcode != WASM_OP_I32_CONST) + is_i32_const = false; + } + + func->max_stack_cell_num = max_stack_cell_num; + func->max_block_num = max_csp_num; + return_value = true; + +fail: + if (frame_lp_ref_bottom) + wasm_free(frame_lp_ref_bottom); + if (frame_ref_bottom) + wasm_free(frame_ref_bottom); + if (frame_csp_bottom) + wasm_free(frame_csp_bottom); + + (void)u8; + (void)u32; + (void)i32; + (void)i64; + return return_value; +} diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-loader.h b/core/iwasm/runtime/vmcore_wasm/wasm-loader.h new file mode 100644 index 000000000..04b17b6ee --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-loader.h @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef _WASM_LOADER_H +#define _WASM_LOADER_H + +#include "wasm.h" +#include "wasm_hashmap.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Load a WASM module from a specified byte buffer. + * + * @param buf the byte buffer which contains the WASM binary data + * @param size the size of the buffer + * @param error_buf output of the exception info + * @param error_buf_size the size of the exception string + * + * @return return module loaded, NULL if failed + */ +WASMModule* +wasm_loader_load(const uint8 *buf, uint32 size, char *error_buf, uint32 error_buf_size); + +/** + * Load a WASM module from a specified WASM section list. + * + * @param section_list the section list which contains each section data + * @param error_buf output of the exception info + * @param error_buf_size the size of the exception string + * + * @return return WASM module loaded, NULL if failed + */ +WASMModule* +wasm_loader_load_from_sections(WASMSection *section_list, + char *error_buf, uint32_t error_buf_size); + +/** + * Unload a WASM module. + * + * @param module the module to be unloaded + */ +void +wasm_loader_unload(WASMModule *module); + +/** + * Find address of related else opcode and end opcode of opcode block/loop/if + * according to the start address of opcode. + * + * @param branch_set the hashtable to store the else/end adress info of + * block/loop/if opcode. The function will lookup the hashtable firstly, + * if not found, it will then search the code from start_addr, and if success, + * stores the result to the hashtable. + * @param start_addr the next address of opcode block/loop/if + * @param code_end_addr the end address of function code block + * @param block_type the type of block, 0/1/2 denotes block/loop/if + * @param p_else_addr returns the else addr if found + * @param p_end_addr returns the end addr if found + * @param error_buf returns the error log for this function + * @param error_buf_size returns the error log string length + * + * @return true if success, false otherwise + */ +bool +wasm_loader_find_block_addr(HashMap *map, + const uint8 *start_addr, + const uint8 *code_end_addr, + uint8 block_type, + uint8 **p_else_addr, + uint8 **p_end_addr, + char *error_buf, + uint32 error_buf_size); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_LOADER_H */ diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-native.h b/core/iwasm/runtime/vmcore_wasm/wasm-native.h new file mode 100644 index 000000000..74b0fb054 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-native.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_NATIVE_H +#define _WASM_NATIVE_H + +#include "wasm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Initialize the native module, e.g. sort the function defs + * and the global defs. + * + * @return true if success, false otherwise + */ +bool +wasm_native_init(); + +/** + * Lookup native function implementation of a given import function. + * + * @param module_name the module name of the import function + * @param func_name the function name of the import function + * + * @return return the native function pointer if success, NULL otherwise + */ +void* +wasm_native_func_lookup(const char *module_name, const char *func_name); + +/** + * Lookup global variable of a given import global + * + * @param module_name the module name of the import global + * @param global_name the global name of the import global + * @param global return the global data + * + * @param return true if success, false otherwise + */ +bool +wasm_native_global_lookup(const char *module_name, const char *global_name, + WASMGlobalImport *global); + +void* wasm_platform_native_func_lookup(const char *module_name, + const char *func_name); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_NATIVE_H */ diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h b/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h new file mode 100644 index 000000000..2917bf429 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-opcode.h @@ -0,0 +1,472 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_OPCODE_H +#define _WASM_OPCODE_H + +#include "wasm.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum WASMOpcode { + /* control instructions */ + WASM_OP_UNREACHABLE = 0x00, /* unreachable */ + WASM_OP_NOP = 0x01, /* nop */ + WASM_OP_BLOCK = 0x02, /* block */ + WASM_OP_LOOP = 0x03, /* loop */ + WASM_OP_IF = 0x04, /* if */ + WASM_OP_ELSE = 0x05, /* else */ + + WASM_OP_UNUSED_0x06 = 0x06, + WASM_OP_UNUSED_0x07 = 0x07, + WASM_OP_UNUSED_0x08 = 0x08, + WASM_OP_UNUSED_0x09 = 0x09, + WASM_OP_UNUSED_0x0a = 0x0a, + + WASM_OP_END = 0x0b, /* end */ + WASM_OP_BR = 0x0c, /* br */ + WASM_OP_BR_IF = 0x0d, /* br if */ + WASM_OP_BR_TABLE = 0x0e, /* br table */ + WASM_OP_RETURN = 0x0f, /* return */ + WASM_OP_CALL = 0x10, /* call */ + WASM_OP_CALL_INDIRECT = 0x11, /* call_indirect */ + + WASM_OP_UNUSED_0x12 = 0x12, + WASM_OP_UNUSED_0x13 = 0x13, + WASM_OP_UNUSED_0x14 = 0x14, + WASM_OP_UNUSED_0x15 = 0x15, + WASM_OP_UNUSED_0x16 = 0x16, + WASM_OP_UNUSED_0x17 = 0x17, + WASM_OP_UNUSED_0x18 = 0x18, + WASM_OP_UNUSED_0x19 = 0x19, + + /* parametric instructions */ + WASM_OP_DROP = 0x1a, /* drop */ + WASM_OP_SELECT = 0x1b, /* select */ + + WASM_OP_UNUSED_0x1c = 0x1c, + WASM_OP_UNUSED_0x1d = 0x1d, + WASM_OP_UNUSED_0x1e = 0x1e, + WASM_OP_UNUSED_0x1f = 0x1f, + + /* variable instructions */ + WASM_OP_GET_LOCAL = 0x20, /* get_local */ + WASM_OP_SET_LOCAL = 0x21, /* set_local */ + WASM_OP_TEE_LOCAL = 0x22, /* tee_local */ + WASM_OP_GET_GLOBAL = 0x23, /* get_global */ + WASM_OP_SET_GLOBAL = 0x24, /* set_global */ + + WASM_OP_UNUSED_0x25 = 0x25, + WASM_OP_UNUSED_0x26 = 0x26, + WASM_OP_UNUSED_0x27 = 0x27, + + /* memory instructions */ + WASM_OP_I32_LOAD = 0x28, /* i32.load */ + WASM_OP_I64_LOAD = 0x29, /* i64.load */ + WASM_OP_F32_LOAD = 0x2a, /* f32.load */ + WASM_OP_F64_LOAD = 0x2b, /* f64.load */ + WASM_OP_I32_LOAD8_S = 0x2c, /* i32.load8_s */ + WASM_OP_I32_LOAD8_U = 0x2d, /* i32.load8_u */ + WASM_OP_I32_LOAD16_S = 0x2e, /* i32.load16_s */ + WASM_OP_I32_LOAD16_U = 0x2f, /* i32.load16_u */ + WASM_OP_I64_LOAD8_S = 0x30, /* i64.load8_s */ + WASM_OP_I64_LOAD8_U = 0x31, /* i64.load8_u */ + WASM_OP_I64_LOAD16_S = 0x32, /* i64.load16_s */ + WASM_OP_I64_LOAD16_U = 0x33, /* i64.load16_u */ + WASM_OP_I64_LOAD32_S = 0x34, /* i32.load32_s */ + WASM_OP_I64_LOAD32_U = 0x35, /* i32.load32_u */ + WASM_OP_I32_STORE = 0x36, /* i32.store */ + WASM_OP_I64_STORE = 0x37, /* i64.store */ + WASM_OP_F32_STORE = 0x38, /* f32.store */ + WASM_OP_F64_STORE = 0x39, /* f64.store */ + WASM_OP_I32_STORE8 = 0x3a, /* i32.store8 */ + WASM_OP_I32_STORE16 = 0x3b, /* i32.store16 */ + WASM_OP_I64_STORE8 = 0x3c, /* i64.store8 */ + WASM_OP_I64_STORE16 = 0x3d, /* i64.sotre16 */ + WASM_OP_I64_STORE32 = 0x3e, /* i64.store32 */ + WASM_OP_MEMORY_SIZE = 0x3f, /* memory.size */ + WASM_OP_MEMORY_GROW = 0x40, /* memory.grow */ + + /* constant instructions */ + WASM_OP_I32_CONST = 0x41, /* i32.const */ + WASM_OP_I64_CONST = 0x42, /* i64.const */ + WASM_OP_F32_CONST = 0x43, /* f32.const */ + WASM_OP_F64_CONST = 0x44, /* f64.const */ + + /* comparison instructions */ + WASM_OP_I32_EQZ = 0x45, /* i32.eqz */ + WASM_OP_I32_EQ = 0x46, /* i32.eq */ + WASM_OP_I32_NE = 0x47, /* i32.ne */ + WASM_OP_I32_LT_S = 0x48, /* i32.lt_s */ + WASM_OP_I32_LT_U = 0x49, /* i32.lt_u */ + WASM_OP_I32_GT_S = 0x4a, /* i32.gt_s */ + WASM_OP_I32_GT_U = 0x4b, /* i32.gt_u */ + WASM_OP_I32_LE_S = 0x4c, /* i32.le_s */ + WASM_OP_I32_LE_U = 0x4d, /* i32.le_u */ + WASM_OP_I32_GE_S = 0x4e, /* i32.ge_s */ + WASM_OP_I32_GE_U = 0x4f, /* i32.ge_u */ + + WASM_OP_I64_EQZ = 0x50, /* i64.eqz */ + WASM_OP_I64_EQ = 0x51, /* i64.eq */ + WASM_OP_I64_NE = 0x52, /* i64.ne */ + WASM_OP_I64_LT_S = 0x53, /* i64.lt_s */ + WASM_OP_I64_LT_U = 0x54, /* i64.lt_u */ + WASM_OP_I64_GT_S = 0x55, /* i64.gt_s */ + WASM_OP_I64_GT_U = 0x56, /* i64.gt_u */ + WASM_OP_I64_LE_S = 0x57, /* i64.le_s */ + WASM_OP_I64_LE_U = 0x58, /* i64.le_u */ + WASM_OP_I64_GE_S = 0x59, /* i64.ge_s */ + WASM_OP_I64_GE_U = 0x5a, /* i64.ge_u */ + + WASM_OP_F32_EQ = 0x5b, /* f32.eq */ + WASM_OP_F32_NE = 0x5c, /* f32.ne */ + WASM_OP_F32_LT = 0x5d, /* f32.lt */ + WASM_OP_F32_GT = 0x5e, /* f32.gt */ + WASM_OP_F32_LE = 0x5f, /* f32.le */ + WASM_OP_F32_GE = 0x60, /* f32.ge */ + + WASM_OP_F64_EQ = 0x61, /* f64.eq */ + WASM_OP_F64_NE = 0x62, /* f64.ne */ + WASM_OP_F64_LT = 0x63, /* f64.lt */ + WASM_OP_F64_GT = 0x64, /* f64.gt */ + WASM_OP_F64_LE = 0x65, /* f64.le */ + WASM_OP_F64_GE = 0x66, /* f64.ge */ + + /* numeric operators */ + WASM_OP_I32_CLZ = 0x67, /* i32.clz */ + WASM_OP_I32_CTZ = 0x68, /* i32.ctz */ + WASM_OP_I32_POPCNT = 0x69, /* i32.popcnt */ + WASM_OP_I32_ADD = 0x6a, /* i32.add */ + WASM_OP_I32_SUB = 0x6b, /* i32.sub */ + WASM_OP_I32_MUL = 0x6c, /* i32.mul */ + WASM_OP_I32_DIV_S = 0x6d, /* i32.div_s */ + WASM_OP_I32_DIV_U = 0x6e, /* i32.div_u */ + WASM_OP_I32_REM_S = 0x6f, /* i32.rem_s */ + WASM_OP_I32_REM_U = 0x70, /* i32.rem_u */ + WASM_OP_I32_AND = 0x71, /* i32.and */ + WASM_OP_I32_OR = 0x72, /* i32.or */ + WASM_OP_I32_XOR = 0x73, /* i32.xor */ + WASM_OP_I32_SHL = 0x74, /* i32.shl */ + WASM_OP_I32_SHR_S = 0x75, /* i32.shr_s */ + WASM_OP_I32_SHR_U = 0x76, /* i32.shr_u */ + WASM_OP_I32_ROTL = 0x77, /* i32.rotl */ + WASM_OP_I32_ROTR = 0x78, /* i32.rotr */ + + WASM_OP_I64_CLZ = 0x79, /* i64.clz */ + WASM_OP_I64_CTZ = 0x7a, /* i64.ctz */ + WASM_OP_I64_POPCNT = 0x7b, /* i64.popcnt */ + WASM_OP_I64_ADD = 0x7c, /* i64.add */ + WASM_OP_I64_SUB = 0x7d, /* i64.sub */ + WASM_OP_I64_MUL = 0x7e, /* i64.mul */ + WASM_OP_I64_DIV_S = 0x7f, /* i64.div_s */ + WASM_OP_I64_DIV_U = 0x80, /* i64.div_u */ + WASM_OP_I64_REM_S = 0x81, /* i64.rem_s */ + WASM_OP_I64_REM_U = 0x82, /* i64.rem_u */ + WASM_OP_I64_AND = 0x83, /* i64.and */ + WASM_OP_I64_OR = 0x84, /* i64.or */ + WASM_OP_I64_XOR = 0x85, /* i64.xor */ + WASM_OP_I64_SHL = 0x86, /* i64.shl */ + WASM_OP_I64_SHR_S = 0x87, /* i64.shr_s */ + WASM_OP_I64_SHR_U = 0x88, /* i64.shr_u */ + WASM_OP_I64_ROTL = 0x89, /* i64.rotl */ + WASM_OP_I64_ROTR = 0x8a, /* i64.rotr */ + + WASM_OP_F32_ABS = 0x8b, /* f32.abs */ + WASM_OP_F32_NEG = 0x8c, /* f32.neg */ + WASM_OP_F32_CEIL = 0x8d, /* f32.ceil */ + WASM_OP_F32_FLOOR = 0x8e, /* f32.floor */ + WASM_OP_F32_TRUNC = 0x8f, /* f32.trunc */ + WASM_OP_F32_NEAREST = 0x90, /* f32.nearest */ + WASM_OP_F32_SQRT = 0x91, /* f32.sqrt */ + WASM_OP_F32_ADD = 0x92, /* f32.add */ + WASM_OP_F32_SUB = 0x93, /* f32.sub */ + WASM_OP_F32_MUL = 0x94, /* f32.mul */ + WASM_OP_F32_DIV = 0x95, /* f32.div */ + WASM_OP_F32_MIN = 0x96, /* f32.min */ + WASM_OP_F32_MAX = 0x97, /* f32.max */ + WASM_OP_F32_COPYSIGN = 0x98, /* f32.copysign */ + + WASM_OP_F64_ABS = 0x99, /* f64.abs */ + WASM_OP_F64_NEG = 0x9a, /* f64.neg */ + WASM_OP_F64_CEIL = 0x9b, /* f64.ceil */ + WASM_OP_F64_FLOOR = 0x9c, /* f64.floor */ + WASM_OP_F64_TRUNC = 0x9d, /* f64.trunc */ + WASM_OP_F64_NEAREST = 0x9e, /* f64.nearest */ + WASM_OP_F64_SQRT = 0x9f, /* f64.sqrt */ + WASM_OP_F64_ADD = 0xa0, /* f64.add */ + WASM_OP_F64_SUB = 0xa1, /* f64.sub */ + WASM_OP_F64_MUL = 0xa2, /* f64.mul */ + WASM_OP_F64_DIV = 0xa3, /* f64.div */ + WASM_OP_F64_MIN = 0xa4, /* f64.min */ + WASM_OP_F64_MAX = 0xa5, /* f64.max */ + WASM_OP_F64_COPYSIGN = 0xa6, /* f64.copysign */ + + /* conversions */ + WASM_OP_I32_WRAP_I64 = 0xa7, /* i32.wrap/i64 */ + WASM_OP_I32_TRUNC_S_F32 = 0xa8, /* i32.trunc_s/f32 */ + WASM_OP_I32_TRUNC_U_F32 = 0xa9, /* i32.trunc_u/f32 */ + WASM_OP_I32_TRUNC_S_F64 = 0xaa, /* i32.trunc_s/f64 */ + WASM_OP_I32_TRUNC_U_F64 = 0xab, /* i32.trunc_u/f64 */ + + WASM_OP_I64_EXTEND_S_I32 = 0xac, /* i64.extend_s/i32 */ + WASM_OP_I64_EXTEND_U_I32 = 0xad, /* i64.extend_u/i32 */ + WASM_OP_I64_TRUNC_S_F32 = 0xae, /* i64.trunc_s/f32 */ + WASM_OP_I64_TRUNC_U_F32 = 0xaf, /* i64.trunc_u/f32 */ + WASM_OP_I64_TRUNC_S_F64 = 0xb0, /* i64.trunc_s/f64 */ + WASM_OP_I64_TRUNC_U_F64 = 0xb1, /* i64.trunc_u/f64 */ + + WASM_OP_F32_CONVERT_S_I32 = 0xb2, /* f32.convert_s/i32 */ + WASM_OP_F32_CONVERT_U_I32 = 0xb3, /* f32.convert_u/i32 */ + WASM_OP_F32_CONVERT_S_I64 = 0xb4, /* f32.convert_s/i64 */ + WASM_OP_F32_CONVERT_U_I64 = 0xb5, /* f32.convert_u/i64 */ + WASM_OP_F32_DEMOTE_F64 = 0xb6, /* f32.demote/f64 */ + + WASM_OP_F64_CONVERT_S_I32 = 0xb7, /* f64.convert_s/i32 */ + WASM_OP_F64_CONVERT_U_I32 = 0xb8, /* f64.convert_u/i32 */ + WASM_OP_F64_CONVERT_S_I64 = 0xb9, /* f64.convert_s/i64 */ + WASM_OP_F64_CONVERT_U_I64 = 0xba, /* f64.convert_u/i64 */ + WASM_OP_F64_PROMOTE_F32 = 0xbb, /* f64.promote/f32 */ + + /* reinterpretations */ + WASM_OP_I32_REINTERPRET_F32 = 0xbc, /* i32.reinterpret/f32 */ + WASM_OP_I64_REINTERPRET_F64 = 0xbd, /* i64.reinterpret/f64 */ + WASM_OP_F32_REINTERPRET_I32 = 0xbe, /* f32.reinterpret/i32 */ + WASM_OP_F64_REINTERPRET_I64 = 0xbf, /* f64.reinterpret/i64 */ + + /* drop/select specified types*/ + WASM_OP_DROP_32 = 0xc0, + WASM_OP_DROP_64 = 0xc1, + WASM_OP_SELECT_32 = 0xc2, + WASM_OP_SELECT_64 = 0xc3, + + WASM_OP_IMPDEP1 = WASM_OP_SELECT_64 + 1, + WASM_OP_IMPDEP2 = WASM_OP_IMPDEP1 + 1 +} WASMOpcode; + +#ifdef __cplusplus +} +#endif + +/* + * Macro used to generate computed goto tables for the C interpreter. + */ +#define WASM_INSTRUCTION_NUM 256 + +#define DEFINE_GOTO_TABLE(_name) \ +static const void *_name[WASM_INSTRUCTION_NUM] = { \ + HANDLE_OPCODE (WASM_OP_UNREACHABLE), /* 0x00 */ \ + HANDLE_OPCODE (WASM_OP_NOP), /* 0x01 */ \ + HANDLE_OPCODE (WASM_OP_BLOCK), /* 0x02 */ \ + HANDLE_OPCODE (WASM_OP_LOOP), /* 0x03 */ \ + HANDLE_OPCODE (WASM_OP_IF), /* 0x04 */ \ + HANDLE_OPCODE (WASM_OP_ELSE), /* 0x05 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x06), /* 0x06 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x07), /* 0x07 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x08), /* 0x08 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x09), /* 0x09 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x0a), /* 0x0a */ \ + HANDLE_OPCODE (WASM_OP_END), /* 0x0b */ \ + HANDLE_OPCODE (WASM_OP_BR), /* 0x0c */ \ + HANDLE_OPCODE (WASM_OP_BR_IF), /* 0x0d */ \ + HANDLE_OPCODE (WASM_OP_BR_TABLE), /* 0x0e */ \ + HANDLE_OPCODE (WASM_OP_RETURN), /* 0x0f */ \ + HANDLE_OPCODE (WASM_OP_CALL), /* 0x10 */ \ + HANDLE_OPCODE (WASM_OP_CALL_INDIRECT), /* 0x11 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x12), /* 0x12 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x13), /* 0x13 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x14), /* 0x14 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x15), /* 0x15 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x16), /* 0x16 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x17), /* 0x17 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x18), /* 0x18 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x19), /* 0x19 */ \ + HANDLE_OPCODE (WASM_OP_DROP), /* 0x1a */ \ + HANDLE_OPCODE (WASM_OP_SELECT), /* 0x1b */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x1c), /* 0x1c */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x1d), /* 0x1d */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x1e), /* 0x1e */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x1f), /* 0x1f */ \ + HANDLE_OPCODE (WASM_OP_GET_LOCAL), /* 0x20 */ \ + HANDLE_OPCODE (WASM_OP_SET_LOCAL), /* 0x21 */ \ + HANDLE_OPCODE (WASM_OP_TEE_LOCAL), /* 0x22 */ \ + HANDLE_OPCODE (WASM_OP_GET_GLOBAL), /* 0x23 */ \ + HANDLE_OPCODE (WASM_OP_SET_GLOBAL), /* 0x24 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x25), /* 0x25 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x26), /* 0x26 */ \ + HANDLE_OPCODE (WASM_OP_UNUSED_0x27), /* 0x27 */ \ + HANDLE_OPCODE (WASM_OP_I32_LOAD), /* 0x28 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD), /* 0x29 */ \ + HANDLE_OPCODE (WASM_OP_F32_LOAD), /* 0x2a */ \ + HANDLE_OPCODE (WASM_OP_F64_LOAD), /* 0x2b */ \ + HANDLE_OPCODE (WASM_OP_I32_LOAD8_S), /* 0x2c */ \ + HANDLE_OPCODE (WASM_OP_I32_LOAD8_U), /* 0x2d */ \ + HANDLE_OPCODE (WASM_OP_I32_LOAD16_S), /* 0x2e */ \ + HANDLE_OPCODE (WASM_OP_I32_LOAD16_U), /* 0x2f */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD8_S), /* 0x30 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD8_U), /* 0x31 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD16_S), /* 0x32 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD16_U), /* 0x33 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD32_S), /* 0x34 */ \ + HANDLE_OPCODE (WASM_OP_I64_LOAD32_U), /* 0x35 */ \ + HANDLE_OPCODE (WASM_OP_I32_STORE), /* 0x36 */ \ + HANDLE_OPCODE (WASM_OP_I64_STORE), /* 0x37 */ \ + HANDLE_OPCODE (WASM_OP_F32_STORE), /* 0x38 */ \ + HANDLE_OPCODE (WASM_OP_F64_STORE), /* 0x39 */ \ + HANDLE_OPCODE (WASM_OP_I32_STORE8), /* 0x3a */ \ + HANDLE_OPCODE (WASM_OP_I32_STORE16), /* 0x3b */ \ + HANDLE_OPCODE (WASM_OP_I64_STORE8), /* 0x3c */ \ + HANDLE_OPCODE (WASM_OP_I64_STORE16), /* 0x3d */ \ + HANDLE_OPCODE (WASM_OP_I64_STORE32), /* 0x3e */ \ + HANDLE_OPCODE (WASM_OP_MEMORY_SIZE), /* 0x3f */ \ + HANDLE_OPCODE (WASM_OP_MEMORY_GROW), /* 0x40 */ \ + HANDLE_OPCODE (WASM_OP_I32_CONST), /* 0x41 */ \ + HANDLE_OPCODE (WASM_OP_I64_CONST), /* 0x42 */ \ + HANDLE_OPCODE (WASM_OP_F32_CONST), /* 0x43 */ \ + HANDLE_OPCODE (WASM_OP_F64_CONST), /* 0x44 */ \ + HANDLE_OPCODE (WASM_OP_I32_EQZ), /* 0x45 */ \ + HANDLE_OPCODE (WASM_OP_I32_EQ), /* 0x46 */ \ + HANDLE_OPCODE (WASM_OP_I32_NE), /* 0x47 */ \ + HANDLE_OPCODE (WASM_OP_I32_LT_S), /* 0x48 */ \ + HANDLE_OPCODE (WASM_OP_I32_LT_U), /* 0x49 */ \ + HANDLE_OPCODE (WASM_OP_I32_GT_S), /* 0x4a */ \ + HANDLE_OPCODE (WASM_OP_I32_GT_U), /* 0x4b */ \ + HANDLE_OPCODE (WASM_OP_I32_LE_S), /* 0x4c */ \ + HANDLE_OPCODE (WASM_OP_I32_LE_U), /* 0x4d */ \ + HANDLE_OPCODE (WASM_OP_I32_GE_S), /* 0x4e */ \ + HANDLE_OPCODE (WASM_OP_I32_GE_U), /* 0x4f */ \ + HANDLE_OPCODE (WASM_OP_I64_EQZ), /* 0x50 */ \ + HANDLE_OPCODE (WASM_OP_I64_EQ), /* 0x51 */ \ + HANDLE_OPCODE (WASM_OP_I64_NE), /* 0x52 */ \ + HANDLE_OPCODE (WASM_OP_I64_LT_S), /* 0x53 */ \ + HANDLE_OPCODE (WASM_OP_I64_LT_U), /* 0x54 */ \ + HANDLE_OPCODE (WASM_OP_I64_GT_S), /* 0x55 */ \ + HANDLE_OPCODE (WASM_OP_I64_GT_U), /* 0x56 */ \ + HANDLE_OPCODE (WASM_OP_I64_LE_S), /* 0x57 */ \ + HANDLE_OPCODE (WASM_OP_I64_LE_U), /* 0x58 */ \ + HANDLE_OPCODE (WASM_OP_I64_GE_S), /* 0x59 */ \ + HANDLE_OPCODE (WASM_OP_I64_GE_U), /* 0x5a */ \ + HANDLE_OPCODE (WASM_OP_F32_EQ), /* 0x5b */ \ + HANDLE_OPCODE (WASM_OP_F32_NE), /* 0x5c */ \ + HANDLE_OPCODE (WASM_OP_F32_LT), /* 0x5d */ \ + HANDLE_OPCODE (WASM_OP_F32_GT), /* 0x5e */ \ + HANDLE_OPCODE (WASM_OP_F32_LE), /* 0x5f */ \ + HANDLE_OPCODE (WASM_OP_F32_GE), /* 0x60 */ \ + HANDLE_OPCODE (WASM_OP_F64_EQ), /* 0x61 */ \ + HANDLE_OPCODE (WASM_OP_F64_NE), /* 0x62 */ \ + HANDLE_OPCODE (WASM_OP_F64_LT), /* 0x63 */ \ + HANDLE_OPCODE (WASM_OP_F64_GT), /* 0x64 */ \ + HANDLE_OPCODE (WASM_OP_F64_LE), /* 0x65 */ \ + HANDLE_OPCODE (WASM_OP_F64_GE), /* 0x66 */ \ + HANDLE_OPCODE (WASM_OP_I32_CLZ), /* 0x67 */ \ + HANDLE_OPCODE (WASM_OP_I32_CTZ), /* 0x68 */ \ + HANDLE_OPCODE (WASM_OP_I32_POPCNT), /* 0x69 */ \ + HANDLE_OPCODE (WASM_OP_I32_ADD), /* 0x6a */ \ + HANDLE_OPCODE (WASM_OP_I32_SUB), /* 0x6b */ \ + HANDLE_OPCODE (WASM_OP_I32_MUL), /* 0x6c */ \ + HANDLE_OPCODE (WASM_OP_I32_DIV_S), /* 0x6d */ \ + HANDLE_OPCODE (WASM_OP_I32_DIV_U), /* 0x6e */ \ + HANDLE_OPCODE (WASM_OP_I32_REM_S), /* 0x6f */ \ + HANDLE_OPCODE (WASM_OP_I32_REM_U), /* 0x70 */ \ + HANDLE_OPCODE (WASM_OP_I32_AND), /* 0x71 */ \ + HANDLE_OPCODE (WASM_OP_I32_OR), /* 0x72 */ \ + HANDLE_OPCODE (WASM_OP_I32_XOR), /* 0x73 */ \ + HANDLE_OPCODE (WASM_OP_I32_SHL), /* 0x74 */ \ + HANDLE_OPCODE (WASM_OP_I32_SHR_S), /* 0x75 */ \ + HANDLE_OPCODE (WASM_OP_I32_SHR_U), /* 0x76 */ \ + HANDLE_OPCODE (WASM_OP_I32_ROTL), /* 0x77 */ \ + HANDLE_OPCODE (WASM_OP_I32_ROTR), /* 0x78 */ \ + HANDLE_OPCODE (WASM_OP_I64_CLZ), /* 0x79 */ \ + HANDLE_OPCODE (WASM_OP_I64_CTZ), /* 0x7a */ \ + HANDLE_OPCODE (WASM_OP_I64_POPCNT), /* 0x7b */ \ + HANDLE_OPCODE (WASM_OP_I64_ADD), /* 0x7c */ \ + HANDLE_OPCODE (WASM_OP_I64_SUB), /* 0x7d */ \ + HANDLE_OPCODE (WASM_OP_I64_MUL), /* 0x7e */ \ + HANDLE_OPCODE (WASM_OP_I64_DIV_S), /* 0x7f */ \ + HANDLE_OPCODE (WASM_OP_I64_DIV_U), /* 0x80 */ \ + HANDLE_OPCODE (WASM_OP_I64_REM_S), /* 0x81 */ \ + HANDLE_OPCODE (WASM_OP_I64_REM_U), /* 0x82 */ \ + HANDLE_OPCODE (WASM_OP_I64_AND), /* 0x83 */ \ + HANDLE_OPCODE (WASM_OP_I64_OR), /* 0x84 */ \ + HANDLE_OPCODE (WASM_OP_I64_XOR), /* 0x85 */ \ + HANDLE_OPCODE (WASM_OP_I64_SHL), /* 0x86 */ \ + HANDLE_OPCODE (WASM_OP_I64_SHR_S), /* 0x87 */ \ + HANDLE_OPCODE (WASM_OP_I64_SHR_U), /* 0x88 */ \ + HANDLE_OPCODE (WASM_OP_I64_ROTL), /* 0x89 */ \ + HANDLE_OPCODE (WASM_OP_I64_ROTR), /* 0x8a */ \ + HANDLE_OPCODE (WASM_OP_F32_ABS), /* 0x8b */ \ + HANDLE_OPCODE (WASM_OP_F32_NEG), /* 0x8c */ \ + HANDLE_OPCODE (WASM_OP_F32_CEIL), /* 0x8d */ \ + HANDLE_OPCODE (WASM_OP_F32_FLOOR), /* 0x8e */ \ + HANDLE_OPCODE (WASM_OP_F32_TRUNC), /* 0x8f */ \ + HANDLE_OPCODE (WASM_OP_F32_NEAREST), /* 0x90 */ \ + HANDLE_OPCODE (WASM_OP_F32_SQRT), /* 0x91 */ \ + HANDLE_OPCODE (WASM_OP_F32_ADD), /* 0x92 */ \ + HANDLE_OPCODE (WASM_OP_F32_SUB), /* 0x93 */ \ + HANDLE_OPCODE (WASM_OP_F32_MUL), /* 0x94 */ \ + HANDLE_OPCODE (WASM_OP_F32_DIV), /* 0x95 */ \ + HANDLE_OPCODE (WASM_OP_F32_MIN), /* 0x96 */ \ + HANDLE_OPCODE (WASM_OP_F32_MAX), /* 0x97 */ \ + HANDLE_OPCODE (WASM_OP_F32_COPYSIGN), /* 0x98 */ \ + HANDLE_OPCODE (WASM_OP_F64_ABS), /* 0x99 */ \ + HANDLE_OPCODE (WASM_OP_F64_NEG), /* 0x9a */ \ + HANDLE_OPCODE (WASM_OP_F64_CEIL), /* 0x9b */ \ + HANDLE_OPCODE (WASM_OP_F64_FLOOR), /* 0x9c */ \ + HANDLE_OPCODE (WASM_OP_F64_TRUNC), /* 0x9d */ \ + HANDLE_OPCODE (WASM_OP_F64_NEAREST), /* 0x9e */ \ + HANDLE_OPCODE (WASM_OP_F64_SQRT), /* 0x9f */ \ + HANDLE_OPCODE (WASM_OP_F64_ADD), /* 0xa0 */ \ + HANDLE_OPCODE (WASM_OP_F64_SUB), /* 0xa1 */ \ + HANDLE_OPCODE (WASM_OP_F64_MUL), /* 0xa2 */ \ + HANDLE_OPCODE (WASM_OP_F64_DIV), /* 0xa3 */ \ + HANDLE_OPCODE (WASM_OP_F64_MIN), /* 0xa4 */ \ + HANDLE_OPCODE (WASM_OP_F64_MAX), /* 0xa5 */ \ + HANDLE_OPCODE (WASM_OP_F64_COPYSIGN), /* 0xa6 */ \ + HANDLE_OPCODE (WASM_OP_I32_WRAP_I64), /* 0xa7 */ \ + HANDLE_OPCODE (WASM_OP_I32_TRUNC_S_F32), /* 0xa8 */ \ + HANDLE_OPCODE (WASM_OP_I32_TRUNC_U_F32), /* 0xa9 */ \ + HANDLE_OPCODE (WASM_OP_I32_TRUNC_S_F64), /* 0xaa */ \ + HANDLE_OPCODE (WASM_OP_I32_TRUNC_U_F64), /* 0xab */ \ + HANDLE_OPCODE (WASM_OP_I64_EXTEND_S_I32), /* 0xac */ \ + HANDLE_OPCODE (WASM_OP_I64_EXTEND_U_I32), /* 0xad */ \ + HANDLE_OPCODE (WASM_OP_I64_TRUNC_S_F32), /* 0xae */ \ + HANDLE_OPCODE (WASM_OP_I64_TRUNC_U_F32), /* 0xaf */ \ + HANDLE_OPCODE (WASM_OP_I64_TRUNC_S_F64), /* 0xb0 */ \ + HANDLE_OPCODE (WASM_OP_I64_TRUNC_U_F64), /* 0xb1 */ \ + HANDLE_OPCODE (WASM_OP_F32_CONVERT_S_I32), /* 0xb2 */ \ + HANDLE_OPCODE (WASM_OP_F32_CONVERT_U_I32), /* 0xb3 */ \ + HANDLE_OPCODE (WASM_OP_F32_CONVERT_S_I64), /* 0xb4 */ \ + HANDLE_OPCODE (WASM_OP_F32_CONVERT_U_I64), /* 0xb5 */ \ + HANDLE_OPCODE (WASM_OP_F32_DEMOTE_F64), /* 0xb6 */ \ + HANDLE_OPCODE (WASM_OP_F64_CONVERT_S_I32), /* 0xb7 */ \ + HANDLE_OPCODE (WASM_OP_F64_CONVERT_U_I32), /* 0xb8 */ \ + HANDLE_OPCODE (WASM_OP_F64_CONVERT_S_I64), /* 0xb9 */ \ + HANDLE_OPCODE (WASM_OP_F64_CONVERT_U_I64), /* 0xba */ \ + HANDLE_OPCODE (WASM_OP_F64_PROMOTE_F32), /* 0xbb */ \ + HANDLE_OPCODE (WASM_OP_I32_REINTERPRET_F32), /* 0xbc */ \ + HANDLE_OPCODE (WASM_OP_I64_REINTERPRET_F64), /* 0xbd */ \ + HANDLE_OPCODE (WASM_OP_F32_REINTERPRET_I32), /* 0xbe */ \ + HANDLE_OPCODE (WASM_OP_F64_REINTERPRET_I64), /* 0xbf */ \ + HANDLE_OPCODE (WASM_OP_DROP_32), /* 0xc0 */ \ + HANDLE_OPCODE (WASM_OP_DROP_64), /* 0xc1 */ \ + HANDLE_OPCODE (WASM_OP_SELECT_32), /* 0xc2 */ \ + HANDLE_OPCODE (WASM_OP_SELECT_64), /* 0xc3 */ \ + HANDLE_OPCODE (WASM_OP_IMPDEP1), /* 0xc4 */ \ + HANDLE_OPCODE (WASM_OP_IMPDEP2), /* 0xc5 */ \ +} + +#endif /* end of _WASM_OPCODE_H */ diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c b/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c new file mode 100644 index 000000000..5df6d07f2 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-runtime.c @@ -0,0 +1,1220 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "wasm-runtime.h" +#include "wasm-thread.h" +#include "wasm-loader.h" +#include "wasm-native.h" +#include "wasm-interp.h" +#include "wasm_log.h" +#include "wasm_platform_log.h" +#include "wasm_memory.h" +#include "mem_alloc.h" + + +static void +set_error_buf(char *error_buf, uint32 error_buf_size, const char *string) +{ + if (error_buf != NULL) + snprintf(error_buf, error_buf_size, "%s", string); +} + +bool +wasm_runtime_init() +{ + if (wasm_platform_init() != 0) + return false; + + if (wasm_log_init() != 0) + return false; + + if (ws_thread_sys_init() != 0) + return false; + + wasm_runtime_set_tlr(NULL); + + wasm_native_init(); + return true; +} + +void +wasm_runtime_destroy() +{ + wasm_runtime_set_tlr(NULL); + ws_thread_sys_destroy(); +} + +static void +init_wasm_stack(WASMStack *wasm_stack, uint8 *stack, uint32 stack_size) +{ + wasm_stack->top = wasm_stack->bottom = stack; + wasm_stack->top_boundary = stack + stack_size; +} + +bool +wasm_runtime_call_wasm(WASMModuleInstance *module_inst, + WASMExecEnv *exec_env, + WASMFunctionInstance *function, + unsigned argc, uint32 argv[]) +{ + if (!exec_env) { + if (!module_inst->wasm_stack) { + if (!(module_inst->wasm_stack = + wasm_malloc(module_inst->wasm_stack_size))) { + wasm_runtime_set_exception(module_inst, "allocate memory failed."); + return false; + } + } + + init_wasm_stack(&module_inst->main_tlr.wasm_stack, + module_inst->wasm_stack, module_inst->wasm_stack_size); + } + else { + uintptr_t stack = (uintptr_t)exec_env->stack; + uint32 stack_size; + + /* Set to 8 bytes align */ + stack = (stack + 7) & ~7; + stack_size = exec_env->stack_size - (stack - (uintptr_t)exec_env->stack); + + if (!exec_env->stack || exec_env->stack_size <= 0 + || exec_env->stack_size < stack - (uintptr_t)exec_env->stack) { + wasm_runtime_set_exception(module_inst, "Invalid execution stack info."); + return false; + } + + init_wasm_stack(&module_inst->main_tlr.wasm_stack, (uint8*)stack, stack_size); + } + + wasm_interp_call_wasm(function, argc, argv); + return !wasm_runtime_get_exception(module_inst) ? true : false; +} + +void +wasm_runtime_set_exception(WASMModuleInstance *module_inst, + const char *exception) +{ + if (exception) + snprintf(module_inst->cur_exception, + sizeof(module_inst->cur_exception), + "Exception: %s", exception); + else + module_inst->cur_exception[0] = '\0'; +} + +const char* +wasm_runtime_get_exception(WASMModuleInstance *module_inst) +{ + if (module_inst->cur_exception[0] == '\0') + return NULL; + else + return module_inst->cur_exception; +} + +void +wasm_runtime_clear_exception(WASMModuleInstance *module_inst) +{ + wasm_runtime_set_exception(module_inst, NULL); +} + +WASMModule* +wasm_runtime_load(const uint8 *buf, uint32 size, + char *error_buf, uint32 error_buf_size) +{ + return wasm_loader_load(buf, size, error_buf, error_buf_size); +} + +WASMModule* +wasm_runtime_load_from_sections(WASMSection *section_list, + char *error_buf, uint32_t error_buf_size) +{ + return wasm_loader_load_from_sections(section_list, + error_buf, error_buf_size); +} + +void +wasm_runtime_unload(WASMModule *module) +{ + wasm_loader_unload(module); +} + +/** + * Destroy memory instances. + */ +static void +memories_deinstantiate(WASMMemoryInstance **memories, uint32 count) +{ + uint32 i; + if (memories) { + for (i = 0; i < count; i++) + if (memories[i]) { + if (memories[i]->heap_handle) + mem_allocator_destroy(memories[i]->heap_handle); + wasm_free(memories[i]); + } + wasm_free(memories); + } +} + +static WASMMemoryInstance* +memory_instantiate(uint32 init_page_count, uint32 max_page_count, + uint32 addr_data_size, uint32 global_data_size, + uint32 heap_size, + char *error_buf, uint32 error_buf_size) +{ + WASMMemoryInstance *memory; + uint32 total_size = offsetof(WASMMemoryInstance, base_addr) + + NumBytesPerPage * init_page_count + + addr_data_size + global_data_size + + heap_size; + + if (!(memory = wasm_malloc(total_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate memory failed: allocate memory failed."); + return NULL; + } + + memset(memory, 0, total_size); + memory->cur_page_count = init_page_count; + memory->max_page_count = max_page_count; + memory->addr_data = memory->base_addr; + memory->addr_data_size = addr_data_size; + + memory->memory_data = memory->addr_data + addr_data_size; + + memory->heap_data = memory->memory_data + + NumBytesPerPage * memory->cur_page_count;; + memory->heap_data_size = heap_size; + + memory->global_data = memory->heap_data + memory->heap_data_size; + memory->global_data_size = global_data_size; + + memory->end_addr = memory->global_data + global_data_size; + + /* Initialize heap */ + if (!(memory->heap_handle = mem_allocator_create + (memory->heap_data, memory->heap_data_size))) { + wasm_free(memory); + return NULL; + } + + return memory; +} + +/** + * Instantiate memories in a module. + */ +static WASMMemoryInstance** +memories_instantiate(const WASMModule *module, uint32 addr_data_size, + uint32 global_data_size, uint32 heap_size, + char *error_buf, uint32 error_buf_size) +{ + WASMImport *import; + uint32 mem_index = 0, i, memory_count = + module->import_memory_count + module->memory_count; + uint32 total_size; + WASMMemoryInstance **memories, *memory; + + if (memory_count == 0 && global_data_size > 0) + memory_count = 1; + + total_size = sizeof(WASMMemoryInstance*) * memory_count; + memories = wasm_malloc(total_size); + + if (!memories) { + set_error_buf(error_buf, error_buf_size, + "Instantiate memory failed: " + "allocate memory failed."); + return NULL; + } + + memset(memories, 0, total_size); + + /* instantiate memories from import section */ + import = module->import_memories; + for (i = 0; i < module->import_memory_count; i++, import++) { + if (!(memory = memories[mem_index++] = + memory_instantiate(import->u.memory.init_page_count, + import->u.memory. max_page_count, + addr_data_size, global_data_size, + heap_size, error_buf, error_buf_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate memory failed: " + "allocate memory failed."); + memories_deinstantiate(memories, memory_count); + return NULL; + } + } + + /* instantiate memories from memory section */ + for (i = 0; i < module->memory_count; i++) { + if (!(memory = memories[mem_index++] = + memory_instantiate(module->memories[i].init_page_count, + module->memories[i].max_page_count, + addr_data_size, global_data_size, + heap_size, error_buf, error_buf_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate memory failed: " + "allocate memory failed."); + memories_deinstantiate(memories, memory_count); + return NULL; + } + } + + if (mem_index == 0) { + /* no import memory and define memory, but has global variables */ + if (!(memory = memories[mem_index++] = + memory_instantiate(0, 0, addr_data_size, global_data_size, + heap_size, error_buf, error_buf_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate memory failed: " + "allocate memory failed.\n"); + memories_deinstantiate(memories, memory_count); + return NULL; + } + } + + wasm_assert(mem_index == memory_count); + return memories; +} + +/** + * Destroy table instances. + */ +static void +tables_deinstantiate(WASMTableInstance **tables, uint32 count) +{ + uint32 i; + if (tables) { + for (i = 0; i < count; i++) + if (tables[i]) + wasm_free(tables[i]); + wasm_free(tables); + } +} + +/** + * Instantiate tables in a module. + */ +static WASMTableInstance** +tables_instantiate(const WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + WASMImport *import; + uint32 table_index = 0, i, table_count = + module->import_table_count + module->table_count; + uint32 total_size = sizeof(WASMTableInstance*) * table_count; + WASMTableInstance **tables = wasm_malloc(total_size), *table; + + if (!tables) { + set_error_buf(error_buf, error_buf_size, + "Instantiate table failed: " + "allocate memory failed."); + return NULL; + } + + memset(tables, 0, total_size); + + /* instantiate tables from import section */ + import = module->import_tables; + for (i = 0; i < module->import_table_count; i++, import++) { + total_size = offsetof(WASMTableInstance, base_addr) + + sizeof(uint32) * import->u.table.init_size; + if (!(table = tables[table_index++] = wasm_malloc(total_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate table failed: " + "allocate memory failed."); + tables_deinstantiate(tables, table_count); + return NULL; + } + + memset(table, 0, total_size); + table->cur_size = import->u.table.init_size; + table->max_size = import->u.table.max_size; + } + + /* instantiate tables from table section */ + for (i = 0; i < module->table_count; i++) { + total_size = offsetof(WASMTableInstance, base_addr) + + sizeof(uint32) * module->tables[i].init_size; + if (!(table = tables[table_index++] = wasm_malloc(total_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate table failed: " + "allocate memory failed."); + tables_deinstantiate(tables, table_count); + return NULL; + } + + memset(table, 0, total_size); + table->cur_size = module->tables[i].init_size; + table->max_size = module->tables[i].max_size; + } + + wasm_assert(table_index == table_count); + return tables; +} + +/** + * Destroy function instances. + */ +static void +functions_deinstantiate(WASMFunctionInstance *functions, uint32 count) +{ + if (functions) { + uint32 i; + + for (i = 0; i < count; i++) + if (functions[i].local_offsets) + wasm_free(functions[i].local_offsets); + wasm_free(functions); + } +} + +static bool +function_init_local_offsets(WASMFunctionInstance *func) +{ + uint16 local_offset = 0; + WASMType *param_type = func->u.func->func_type; + uint32 param_count = param_type->param_count; + uint8 *param_types = param_type->types; + uint32 local_count = func->u.func->local_count; + uint8 *local_types = func->u.func->local_types; + uint32 i, total_size = (param_count + local_count) * sizeof(uint16); + + if (!(func->local_offsets = wasm_malloc(total_size))) + return false; + + for (i = 0; i < param_count; i++) { + func->local_offsets[i] = local_offset; + local_offset += wasm_value_type_cell_num(param_types[i]); + } + + for (i = 0; i < local_count; i++) { + func->local_offsets[param_count + i] = local_offset; + local_offset += wasm_value_type_cell_num(local_types[i]); + } + + wasm_assert(local_offset == func->param_cell_num + func->local_cell_num); + return true; +} + +/** + * Instantiate functions in a module. + */ +static WASMFunctionInstance* +functions_instantiate(const WASMModule *module, + char *error_buf, uint32 error_buf_size) +{ + WASMImport *import; + uint32 i, function_count = + module->import_function_count + module->function_count; + uint32 total_size = sizeof(WASMFunctionInstance) * function_count; + WASMFunctionInstance *functions = wasm_malloc(total_size), *function; + + if (!functions) { + set_error_buf(error_buf, error_buf_size, + "Instantiate function failed: " + "allocate memory failed."); + return NULL; + } + + memset(functions, 0, total_size); + + /* instantiate functions from import section */ + function = functions; + import = module->import_functions; + for (i = 0; i < module->import_function_count; i++, import++) { + function->is_import_func = true; + function->u.func_import = &import->u.function; + + function->param_cell_num = + wasm_type_param_cell_num(import->u.function.func_type); + function->ret_cell_num = + wasm_type_return_cell_num(import->u.function.func_type); + function->local_cell_num = 0; + + function++; + } + + /* instantiate functions from function section */ + for (i = 0; i < module->function_count; i++) { + function->is_import_func = false; + function->u.func = module->functions[i]; + + function->param_cell_num = + wasm_type_param_cell_num(function->u.func->func_type); + function->ret_cell_num = + wasm_type_return_cell_num(function->u.func->func_type); + function->local_cell_num = + wasm_get_cell_num(function->u.func->local_types, + function->u.func->local_count); + + if (!function_init_local_offsets(function)) { + functions_deinstantiate(functions, function_count); + return NULL; + } + + function++; + } + + wasm_assert((uint32)(function - functions) == function_count); + return functions; +} + +/** + * Destroy global instances. + */ +static void +globals_deinstantiate(WASMGlobalInstance *globals) +{ + if (globals) + wasm_free(globals); +} + +/** + * Instantiate globals in a module. + */ +static WASMGlobalInstance* +globals_instantiate(const WASMModule *module, + uint32 *p_addr_data_size, + uint32 *p_global_data_size, + char *error_buf, uint32 error_buf_size) +{ + WASMImport *import; + uint32 addr_data_offset = 0, global_data_offset = 0; + uint32 i, global_count = + module->import_global_count + module->global_count; + uint32 total_size = sizeof(WASMGlobalInstance) * global_count; + WASMGlobalInstance *globals = wasm_malloc(total_size), *global; + + if (!globals) { + set_error_buf(error_buf, error_buf_size, + "Instantiate global failed: " + "allocate memory failed."); + return NULL; + } + + memset(globals, 0, total_size); + + /* instantiate globals from import section */ + global = globals; + import = module->import_globals; + for (i = 0; i < module->import_global_count; i++, import++) { + WASMGlobalImport *global_import = &import->u.global; + global->type = global_import->type; + global->is_mutable = global_import->is_mutable; + global->is_addr = global_import->is_addr; + global->initial_value = global_import->global_data_linked; + global->data_offset = global_data_offset; + global_data_offset += wasm_value_type_size(global->type); + + if (global->is_addr) + addr_data_offset += sizeof(uint32); + + global++; + } + + /* instantiate globals from global section */ + for (i = 0; i < module->global_count; i++) { + global->type = module->globals[i].type; + global->is_mutable = module->globals[i].is_mutable; + global->is_addr = module->globals[i].is_addr; + + global->data_offset = global_data_offset; + global_data_offset += wasm_value_type_size(global->type); + + if (global->is_addr) + addr_data_offset += sizeof(uint32); + + global++; + } + + wasm_assert((uint32)(global - globals) == global_count); + *p_addr_data_size = addr_data_offset; + *p_global_data_size = global_data_offset; + return globals; +} + +static void +globals_instantiate_fix(WASMGlobalInstance *globals, + const WASMModule *module, + WASMModuleInstance *module_inst) +{ + WASMGlobalInstance *global = globals; + WASMImport *import = module->import_globals; + uint32 i; + + /* Fix globals from import section */ + for (i = 0; i < module->import_global_count; i++, import++, global++) { + if (!strcmp(import->u.names.module_name, "env")) { + if (!strcmp(import->u.names.field_name, "memoryBase") + || !strcmp(import->u.names.field_name, "__memory_base")) { + global->initial_value.addr = 0; + } + else if (!strcmp(import->u.names.field_name, "tableBase") + || !strcmp(import->u.names.field_name, "__table_base")) { + global->initial_value.addr = 0; + } + else if (!strcmp(import->u.names.field_name, "DYNAMICTOP_PTR")) { + global->initial_value.i32 = + NumBytesPerPage * module_inst->default_memory->cur_page_count; + module_inst->DYNAMICTOP_PTR_offset = global->data_offset; + } + else if (!strcmp(import->u.names.field_name, "STACKTOP")) { + global->initial_value.i32 = 0; + } + else if (!strcmp(import->u.names.field_name, "STACK_MAX")) { + /* Unused in emcc wasm bin actually. */ + global->initial_value.i32 = 0; + } + } + } + + for (i = 0; i < module->global_count; i++) { + InitializerExpression *init_expr = &module->globals[i].init_expr; + + if (init_expr->init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL) { + wasm_assert(init_expr->u.global_index < module->import_global_count); + global->initial_value = globals[init_expr->u.global_index].initial_value; + } + else { + memcpy(&global->initial_value, &init_expr->u, sizeof(int64)); + } + global++; + } +} + +/** + * Return export function count in module export section. + */ +static uint32 +get_export_function_count(const WASMModule *module) +{ + WASMExport *export = module->exports; + uint32 count = 0, i; + + for (i = 0; i < module->export_count; i++, export++) + if (export->kind == EXPORT_KIND_FUNC) + count++; + + return count; +} + +/** + * Destroy export function instances. + */ +static void +export_functions_deinstantiate(WASMExportFuncInstance *functions) +{ + if (functions) + wasm_free(functions); +} + +/** + * Instantiate export functions in a module. + */ +static WASMExportFuncInstance* +export_functions_instantiate(const WASMModule *module, + WASMModuleInstance *module_inst, + uint32 export_func_count, + char *error_buf, uint32 error_buf_size) +{ + WASMExportFuncInstance *export_funcs, *export_func; + WASMExport *export = module->exports; + uint32 i, total_size = sizeof(WASMExportFuncInstance) * export_func_count; + + if (!(export_func = export_funcs = wasm_malloc(total_size))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate export function failed: " + "allocate memory failed."); + return NULL; + } + + memset(export_funcs, 0, total_size); + + for (i = 0; i < module->export_count; i++, export++) + if (export->kind == EXPORT_KIND_FUNC) { + wasm_assert(export->index >= module->import_function_count + && export->index < module->import_function_count + + module->function_count); + export_func->name = export->name; + export_func->function = &module_inst->functions[export->index]; + export_func++; + } + + wasm_assert((uint32)(export_func - export_funcs) == export_func_count); + return export_funcs; +} + +void +wasm_runtime_deinstantiate(WASMModuleInstance *module_inst); + +static bool +execute_post_inst_function(WASMModuleInstance *module_inst) +{ + WASMFunctionInstance *post_inst_func = NULL; + WASMType *post_inst_func_type; + uint32 i; + + for (i = 0; i < module_inst->export_func_count; i++) + if (!strcmp(module_inst->export_functions[i].name, "__post_instantiate")) { + post_inst_func = module_inst->export_functions[i].function; + break; + } + + if (!post_inst_func) + /* Not found */ + return true; + + post_inst_func_type = post_inst_func->u.func->func_type; + if (post_inst_func_type->param_count != 0 + || post_inst_func_type->result_count != 0) + /* Not a valid function type, ignore it */ + return true; + + return wasm_runtime_call_wasm(module_inst, NULL, post_inst_func, 0, NULL); +} + +static bool +execute_start_function(WASMModuleInstance *module_inst) +{ + WASMFunctionInstance *func = module_inst->start_function; + + if (!func) + return true; + + wasm_assert(!func->is_import_func && func->param_cell_num == 0 + && func->ret_cell_num == 0); + + return wasm_runtime_call_wasm(module_inst, NULL, func, 0, NULL); +} + +/** + * Instantiate module + */ +WASMModuleInstance* +wasm_runtime_instantiate(const WASMModule *module, + uint32 stack_size, uint32 heap_size, + char *error_buf, uint32 error_buf_size) +{ + WASMModuleInstance *module_inst; + WASMTableSeg *table_seg; + WASMDataSeg *data_seg; + WASMGlobalInstance *globals = NULL, *global; + uint32 global_count, addr_data_size = 0, global_data_size = 0, i; + uint32 base_offset, length, memory_size; + uint8 *global_data, *global_data_end, *addr_data, *addr_data_end; + uint8 *memory_data; + uint32 *table_data; + + if (!module) + return NULL; + + /* Check heap size */ + heap_size = align_uint(heap_size, 8); + if (heap_size == 0) + heap_size = DEFAULT_WASM_HEAP_SIZE; + if (heap_size < MIN_WASM_HEAP_SIZE) + heap_size = MIN_WASM_HEAP_SIZE; + + /* Instantiate global firstly to get the mutable data size */ + global_count = module->import_global_count + module->global_count; + if (global_count && + !(globals = globals_instantiate(module, &addr_data_size, + &global_data_size, + error_buf, error_buf_size))) + return NULL; + + /* Allocate the memory */ + if (!(module_inst = wasm_malloc(sizeof(WASMModuleInstance)))) { + set_error_buf(error_buf, error_buf_size, + "Instantiate module failed: allocate memory failed."); + globals_deinstantiate(globals); + return NULL; + } + + memset(module_inst, 0, sizeof(WASMModuleInstance)); + module_inst->global_count = global_count; + module_inst->globals = globals; + + module_inst->memory_count = + module->import_memory_count + module->memory_count; + module_inst->table_count = + module->import_table_count + module->table_count; + module_inst->function_count = + module->import_function_count + module->function_count; + module_inst->export_func_count = get_export_function_count(module); + + /* Instantiate memories/tables/functions */ + if (((module_inst->memory_count > 0 || global_count > 0) + && !(module_inst->memories = + memories_instantiate(module, addr_data_size, global_data_size, + heap_size, error_buf, error_buf_size))) + || (module_inst->table_count > 0 + && !(module_inst->tables = tables_instantiate(module, + error_buf, + error_buf_size))) + || (module_inst->function_count > 0 + && !(module_inst->functions = functions_instantiate(module, + error_buf, + error_buf_size))) + || (module_inst->export_func_count > 0 + && !(module_inst->export_functions = export_functions_instantiate( + module, module_inst, module_inst->export_func_count, + error_buf, error_buf_size)))) { + wasm_runtime_deinstantiate(module_inst); + return NULL; + } + + if (module_inst->memory_count || global_count > 0) { + WASMMemoryInstance *memory; + + memory = module_inst->default_memory = module_inst->memories[0]; + memory_data = module_inst->default_memory->memory_data; + + /* fix import memoryBase */ + globals_instantiate_fix(globals, module, module_inst); + + /* Initialize the global data */ + addr_data = memory->addr_data; + addr_data_end = addr_data + addr_data_size; + global_data = memory->global_data; + global_data_end = global_data + global_data_size; + global = globals; + for (i = 0; i < global_count; i++, global++) { + switch (global->type) { + case VALUE_TYPE_I32: + case VALUE_TYPE_F32: + if (!global->is_addr) + *(int32*)global_data = global->initial_value.i32; + else { + *(int32*)addr_data = global->initial_value.i32; + /* Store the offset to memory data for global of addr */ + *(int32*)global_data = addr_data - memory_data; + addr_data += sizeof(int32); + } + global_data += sizeof(int32); + break; + case VALUE_TYPE_I64: + case VALUE_TYPE_F64: + wasm_assert(!global->is_addr); + memcpy(global_data, &global->initial_value.i64, sizeof(int64)); + global_data += sizeof(int64); + break; + default: + wasm_assert(0); + } + } + wasm_assert(addr_data == addr_data_end); + wasm_assert(global_data == global_data_end); + + global = globals + module->import_global_count; + for (i = 0; i < module->global_count; i++, global++) { + InitializerExpression *init_expr = &module->globals[i].init_expr; + + if (init_expr->init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL + && globals[init_expr->u.global_index].is_addr) { + uint8 *global_data_dst = memory->global_data + global->data_offset; + uint8 *global_data_src = + memory->global_data + globals[init_expr->u.global_index].data_offset; + *(uintptr_t*)global_data_dst = *(uintptr_t*)global_data_src; + } + } + + /* Initialize the memory data with data segment section */ + if (module_inst->default_memory->cur_page_count > 0) { + for (i = 0; i < module->data_seg_count; i++) { + data_seg = module->data_segments[i]; + wasm_assert(data_seg->memory_index == 0); + wasm_assert(data_seg->base_offset.init_expr_type == + INIT_EXPR_TYPE_I32_CONST + || data_seg->base_offset.init_expr_type == + INIT_EXPR_TYPE_GET_GLOBAL); + + if (data_seg->base_offset.init_expr_type == INIT_EXPR_TYPE_GET_GLOBAL) { + wasm_assert(data_seg->base_offset.u.global_index < global_count + && globals[data_seg->base_offset.u.global_index].type == + VALUE_TYPE_I32); + data_seg->base_offset.u.i32 = + globals[data_seg->base_offset.u.global_index].initial_value.i32; + } + + base_offset = (uint32)data_seg->base_offset.u.i32; + length = data_seg->data_length; + memory_size = NumBytesPerPage * module_inst->default_memory->cur_page_count; + + if (base_offset >= memory_size + || base_offset + length > memory_size) { + set_error_buf(error_buf, error_buf_size, + "Instantiate module failed: data segment out of range."); + wasm_runtime_deinstantiate(module_inst); + return NULL; + } + + memcpy(memory_data + base_offset, data_seg->data, length); + } + } + } + + if (module_inst->table_count) { + module_inst->default_table = module_inst->tables[0]; + + /* Initialize the table data with table segment section */ + table_data = (uint32*)module_inst->default_table->base_addr; + table_seg = module->table_segments; + for (i = 0; i < module->table_seg_count; i++, table_seg++) { + wasm_assert(table_seg->table_index == 0); + wasm_assert(table_seg->base_offset.init_expr_type == + INIT_EXPR_TYPE_I32_CONST + || table_seg->base_offset.init_expr_type == + INIT_EXPR_TYPE_GET_GLOBAL); + + if (table_seg->base_offset.init_expr_type == + INIT_EXPR_TYPE_GET_GLOBAL) { + wasm_assert(table_seg->base_offset.u.global_index < global_count + && globals[table_seg->base_offset.u.global_index].type == + VALUE_TYPE_I32); + table_seg->base_offset.u.i32 = + globals[table_seg->base_offset.u.global_index].initial_value.i32; + } + if ((uint32)table_seg->base_offset.u.i32 < + module_inst->default_table->cur_size) { + length = table_seg->function_count; + if (table_seg->base_offset.u.i32 + length > + module_inst->default_table->cur_size) + length = module_inst->default_table->cur_size + - table_seg->base_offset.u.i32; + memcpy(table_data + table_seg->base_offset.u.i32, + table_seg->func_indexes, length * sizeof(uint32)); + } + } + } + + if (module->start_function != (uint32)-1) { + wasm_assert(module->start_function >= module->import_function_count); + module_inst->start_function = + &module_inst->functions[module->start_function]; + } + + module_inst->branch_set = module->branch_set; + module_inst->module = module; + + /* module instance type */ + module_inst->module_type = Wasm_Module_Bytecode; + + /* Initialize the thread related data */ + if (stack_size == 0) + stack_size = DEFAULT_WASM_STACK_SIZE; + module_inst->wasm_stack_size = stack_size; + module_inst->main_tlr.module_inst = module_inst; + + /* Bind thread data with current native thread: + set thread local root to current thread. */ + wasm_runtime_set_tlr(&module_inst->main_tlr); + module_inst->main_tlr.handle = ws_self_thread(); + + /* Execute __post_instantiate function */ + if (!execute_post_inst_function(module_inst)) { + const char *exception = wasm_runtime_get_exception(module_inst); + wasm_printf("%s\n", exception); + wasm_runtime_deinstantiate(module_inst); + return NULL; + } + + /* Execute start function */ + if (!execute_start_function(module_inst)) { + const char *exception = wasm_runtime_get_exception(module_inst); + wasm_printf("%s\n", exception); + wasm_runtime_deinstantiate(module_inst); + return NULL; + } + + (void)addr_data_end; + (void)global_data_end; + return module_inst; +} + +void +wasm_runtime_deinstantiate(WASMModuleInstance *module_inst) +{ + if (!module_inst) + return; + + if (module_inst->memory_count > 0) + memories_deinstantiate(module_inst->memories, module_inst->memory_count); + else if (module_inst->memories != NULL && module_inst->global_count > 0) + /* No imported memory and defined memory, the memory is created when + global count > 0. */ + memories_deinstantiate(module_inst->memories, 1); + + tables_deinstantiate(module_inst->tables, module_inst->table_count); + functions_deinstantiate(module_inst->functions, module_inst->function_count); + globals_deinstantiate(module_inst->globals); + export_functions_deinstantiate(module_inst->export_functions); + + if (module_inst->wasm_stack) + wasm_free(module_inst->wasm_stack); + + wasm_free(module_inst); +} + +bool +wasm_runtime_enlarge_memory(WASMModuleInstance *module, int inc_page_count) +{ +#if 1 + wasm_runtime_set_exception(module, "unsupported operation: enlarge memory."); + return false; +#else + WASMMemoryInstance *memory = module->default_memory; + WASMMemoryInstance *new_memory; + uint32 total_page_count = inc_page_count + memory->cur_page_count; + uint32 total_size = offsetof(WASMMemoryInstance, base_addr) + + memory->addr_data_size + + NumBytesPerPage * total_page_count + + memory->global_data_size + + memory->thunk_argv_data_size + + sizeof(uint32) * memory->thunk_argc; + + if (!(new_memory = wasm_malloc(total_size))) { + wasm_runtime_set_exception(module, "alloc memory for enlarge memory failed."); + return false; + } + + new_memory->cur_page_count = total_page_count; + new_memory->max_page_count = memory->max_page_count > total_page_count + ? memory->max_page_count : total_page_count; + new_memory->addr_data = new_memory->base_addr; + new_memory->addr_data_size = memory->addr_data_size; + + new_memory->thunk_argv_data = new_memory->addr_data + memory->addr_data_size; + new_memory->thunk_argv_data_size = memory->thunk_argv_data_size; + new_memory->thunk_argc = memory->thunk_argc; + new_memory->thunk_argv_offsets = new_memory->thunk_argv_data + + memory->thunk_argv_data_size; + + new_memory->memory_data = new_memory->thunk_argv_offsets + + sizeof(uint32) * memory->thunk_argc; + new_memory->global_data = new_memory->memory_data + + NumBytesPerPage * new_memory->cur_page_count; + new_memory->global_data_size = memory->global_data_size; + + new_memory->end_addr = new_memory->global_data + memory->global_data_size; + + /* Copy addr data, thunk argv data, thunk argv offsets and memory data */ + memcpy(new_memory->addr_data, memory->addr_data, + memory->global_data - memory->addr_data); + /* Copy global data */ + memcpy(new_memory->global_data, memory->global_data, + memory->end_addr - memory->global_data); + /* Init free space of new memory */ + memset(new_memory->memory_data + NumBytesPerPage * memory->cur_page_count, + 0, NumBytesPerPage * (total_page_count - memory->cur_page_count)); + + wasm_free(memory); + module->memories[0] = module->default_memory = new_memory; + return true; +#endif +} + +PackageType +get_package_type(const uint8 *buf, uint32 size) +{ + if (buf && size > 4) { + if (buf[0] == '\0' && buf[1] == 'a' && buf[2] == 's' && buf[3] == 'm') + return Wasm_Module_Bytecode; + if (buf[0] == '\0' && buf[1] == 'a' && buf[2] == 'o' && buf[3] == 't') + return Wasm_Module_AoT; + } + return Package_Type_Unknown; +} + +WASMExecEnv* +wasm_runtime_create_exec_env(uint32 stack_size) +{ + WASMExecEnv *exec_env = wasm_malloc(sizeof(WASMExecEnv)); + if (exec_env) { + if (!(exec_env->stack = wasm_malloc(stack_size))) { + wasm_free(exec_env); + return NULL; + } + exec_env->stack_size = stack_size; + } + return exec_env; +} + +void +wasm_runtime_destory_exec_env(WASMExecEnv *env) +{ + if (env) { + wasm_free(env->stack); + wasm_free(env); + } +} + +bool +wasm_runtime_attach_current_thread(WASMModuleInstance *module_inst, + void *thread_data) +{ + wasm_runtime_set_tlr(&module_inst->main_tlr); + module_inst->main_tlr.handle = ws_self_thread(); + module_inst->thread_data = thread_data; + return true; +} + +void +wasm_runtime_detach_current_thread(WASMModuleInstance *module_inst) +{ + module_inst->thread_data = NULL; +} + +void* +wasm_runtime_get_current_thread_data() +{ + WASMThread *tlr = wasm_runtime_get_self(); + return (tlr && tlr->module_inst) ? tlr->module_inst->thread_data : NULL; +} + +WASMModuleInstance * +wasm_runtime_get_current_module_inst() +{ + WASMThread *tlr = wasm_runtime_get_self(); + return tlr ? tlr->module_inst : NULL; +} + +int32 +wasm_runtime_module_malloc(WASMModuleInstance *module_inst, uint32 size) +{ + uint8 *memory_base = module_inst->default_memory->memory_data; + void *heap = module_inst->default_memory->heap_handle; + uint8 *addr = mem_allocator_malloc(heap, size); + if (!addr) + wasm_runtime_set_exception(module_inst, "out of memory"); + return addr ? addr - memory_base : 0; +} + +void +wasm_runtime_module_free(WASMModuleInstance *module_inst, int32 ptr) +{ + uint8 *memory_base = module_inst->default_memory->memory_data; + uint8 *heap_base = module_inst->default_memory->heap_data; + uint32 heap_size = module_inst->default_memory->heap_data_size; + void *heap = module_inst->default_memory->heap_handle; + uint8 *addr = ptr ? memory_base + ptr : NULL; + if (addr && (heap_base < addr && addr < heap_base + heap_size)) + mem_allocator_free(heap, addr); +} + + int32 +wasm_runtime_module_dup_data(WASMModuleInstance *module_inst, + const char *src, uint32 size) +{ + int32 buffer_offset = wasm_runtime_module_malloc(module_inst, size); + if (buffer_offset != 0) { + char *buffer; + buffer = wasm_runtime_addr_app_to_native(module_inst, buffer_offset); + memcpy(buffer, src, size); + } + return buffer_offset; +} + +bool +wasm_runtime_validate_app_addr(WASMModuleInstance *module_inst, + int32 app_offset, uint32 size) +{ + /* integer overflow check */ + if(app_offset < 0 || + app_offset + size < size) { + wasm_runtime_set_exception(module_inst, "out of bounds memory access"); + return false; + } + + uint8 *memory_base = module_inst->default_memory->memory_data; + uint8 *addr = memory_base + app_offset; + uint8 *base_addr = module_inst->default_memory->base_addr; + uint8 *end_addr = module_inst->default_memory->end_addr; + bool ret = (base_addr <= addr + && addr + size <= end_addr); + if (!ret) + wasm_runtime_set_exception(module_inst, "out of bounds memory access"); + return ret; +} + +bool +wasm_runtime_validate_native_addr(WASMModuleInstance *module_inst, + void *native_ptr, uint32 size) +{ + uint8 *addr = native_ptr; + uint8 *base_addr = module_inst->default_memory->base_addr; + uint8 *end_addr = module_inst->default_memory->end_addr; + bool ret = (base_addr <= addr && addr + size <= end_addr); + if (!ret || (addr + size < addr)/* integer overflow */) + wasm_runtime_set_exception(module_inst, "out of bounds memory access"); + return ret; +} + +void * +wasm_runtime_addr_app_to_native(WASMModuleInstance *module_inst, + int32 app_offset) +{ + return module_inst->default_memory->memory_data + app_offset; +} + +int32 +wasm_runtime_addr_native_to_app(WASMModuleInstance *module_inst, + void *native_ptr) +{ + return (uint8*)native_ptr - module_inst->default_memory->memory_data; +} + +uint32 +wasm_runtime_get_temp_ret(WASMModuleInstance *module_inst) +{ + return module_inst->temp_ret; +} + +void +wasm_runtime_set_temp_ret(WASMModuleInstance *module_inst, + uint32 temp_ret) +{ + module_inst->temp_ret = temp_ret; +} + +uint32 +wasm_runtime_get_llvm_stack(WASMModuleInstance *module_inst) +{ + return module_inst->llvm_stack; +} + +void +wasm_runtime_set_llvm_stack(WASMModuleInstance *module_inst, + uint32 llvm_stack) +{ + module_inst->llvm_stack = llvm_stack; +} + +WASMModuleInstance* +wasm_runtime_load_aot(uint8 *aot_file, uint32 aot_file_size, + uint32 heap_size, + char *error_buf, uint32 error_buf_size) +{ + (void)aot_file; + (void)aot_file_size; + (void)heap_size; + (void)error_buf; + (void)error_buf_size; + return NULL; +} + diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h b/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h new file mode 100644 index 000000000..c47558470 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-runtime.h @@ -0,0 +1,328 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_RUNTIME_H +#define _WASM_RUNTIME_H + +#include "wasm.h" +#include "wasm-thread.h" +#include "wasm_hashmap.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +#define DEFAULT_WASM_STACK_SIZE (8 * 1024) +#define DEFAULT_WASM_HEAP_SIZE (8 * 1024) +#define MIN_WASM_HEAP_SIZE (1 * 1024) + +typedef struct WASMMemoryInstance { + /* Current page count */ + uint32 cur_page_count; + /* Maximum page count */ + uint32 max_page_count; + /* Data of import globals with address info, like _stdin/_stdout/_stderr, + stdin/stdout/stderr is stored here, but the actual addr info, or offset + to memory_data is stored in global_data section */ + uint8 *addr_data; + /* Size of addr_data */ + uint32 addr_data_size; + + /* Thunk data of argument strings */ + uint8 *thunk_argv_data; + uint32 thunk_argv_data_size; + /* Thunk argument count */ + uint32 thunk_argc; + /* Thunk argument offsets */ + uint8 *thunk_argv_offsets; + + /* Heap data */ + uint8 *heap_data; + /* Heap size */ + uint32 heap_data_size; + /* The heap created */ + void *heap_handle; + + /* Memory data */ + uint8 *memory_data; + /* Global data of global instances */ + uint8 *global_data; + uint32 global_data_size; + + /* End address of memory */ + uint8 *end_addr; + + /* Base address, the layout is: + addr_data + thunk_argv data + thunk arg offsets + + heap data + memory data + global data + memory data init size is: NumBytesPerPage * cur_page_count + addr data size and global data size is calculated in module instantiating + Note: when memory is re-allocated, the addr data, thunk argv data, thunk + argv offsets and memory data must be copied to new memory also. + */ + uint8 base_addr[1]; +} WASMMemoryInstance; + +typedef struct WASMTableInstance { + /* The element type, TABLE_ELEM_TYPE_ANY_FUNC currently */ + uint8 elem_type; + /* Current size */ + uint32 cur_size; + /* Maximum size */ + uint32 max_size; + /* Base address */ + uint8 base_addr[1]; +} WASMTableInstance; + +typedef struct WASMGlobalInstance { + /* value type, VALUE_TYPE_I32/I64/F32/F64 */ + uint8 type; + /* mutable or constant */ + bool is_mutable; + bool is_addr; + /* data offset to base_addr of WASMMemoryInstance */ + uint32 data_offset; + /* initial value */ + WASMValue initial_value; +} WASMGlobalInstance; + +typedef struct WASMFunctionInstance { + /* whether it is import function or WASM function */ + bool is_import_func; + /* cell num of parameters */ + uint16 param_cell_num; + /* cell num of return type */ + uint16 ret_cell_num; + /* cell num of local variables, 0 for import function */ + uint16 local_cell_num; + uint16 *local_offsets; + union { + WASMFunctionImport *func_import; + WASMFunction *func; + } u; +} WASMFunctionInstance; + +typedef struct WASMExportFuncInstance { + char *name; + WASMFunctionInstance *function; +} WASMExportFuncInstance; + +/* Package Type */ +typedef enum { + Wasm_Module_Bytecode = 0, + Wasm_Module_AoT, + Package_Type_Unknown = 0xFFFF +} PackageType; + +typedef struct WASMModuleInstance { + /* Module instance type, for module instance loaded from + WASM bytecode binary, this field is Wasm_Module_Bytecode; + for module instance loaded from AOT package, this field is + Wasm_Module_AoT, and this structure should be treated as + WASMAOTContext structure. */ + uint32 module_type; + + uint32 memory_count; + uint32 table_count; + uint32 global_count; + uint32 function_count; + uint32 export_func_count; + + WASMMemoryInstance **memories; + WASMTableInstance **tables; + WASMGlobalInstance *globals; + WASMFunctionInstance *functions; + WASMExportFuncInstance *export_functions; + + WASMMemoryInstance *default_memory; + WASMTableInstance *default_table; + + WASMFunctionInstance *start_function; + + HashMap *branch_set; + const WASMModule *module; + + uint32 DYNAMICTOP_PTR_offset; + uint32 temp_ret; + uint32 llvm_stack; + + /* Default WASM stack size of threads of this Module instance. */ + uint32 wasm_stack_size; + + /* Default WASM stack */ + uint8 *wasm_stack; + + /* The exception buffer of wasm interpreter for current thread. */ + char cur_exception[128]; + + /* The thread data of the attaching thread */ + void *thread_data; + + /* Main Thread */ + WASMThread main_tlr; +} WASMModuleInstance; + +/* Execution environment, e.g. stack info */ +typedef struct WASMExecEnv { + uint8_t *stack; + uint32_t stack_size; +} WASMExecEnv; + +struct WASMInterpFrame; +typedef struct WASMInterpFrame WASMRuntimeFrame; + +/** + * Return the current thread. + * + * @return the current thread + */ +static inline WASMThread* +wasm_runtime_get_self() +{ + return (WASMThread*)ws_tls_get(); +} + +/** + * Set self as the current thread. + * + * @param self the thread to be set as current thread + */ +static inline void +wasm_runtime_set_tlr(WASMThread *self) +{ + ws_tls_put(self); +} + +/** + * Return the code block of a function. + * + * @param func the WASM function instance + * + * @return the code block of the function + */ +static inline uint8* +wasm_runtime_get_func_code(WASMFunctionInstance *func) +{ + return func->is_import_func ? NULL : func->u.func->code; +} + +/** + * Return the code block end of a function. + * + * @param func the WASM function instance + * + * @return the code block end of the function + */ +static inline uint8* +wasm_runtime_get_func_code_end(WASMFunctionInstance *func) +{ + return func->is_import_func + ? NULL : func->u.func->code + func->u.func->code_size; +} + +/** + * Call the given WASM function of a WASM module instance with arguments (bytecode and AoT). + * + * @param module_inst the WASM module instance which the function belongs to + * @param exec_env the execution environment to call the function. If the module instance + * is created by AoT mode, it is ignored and just set it to NULL. If the module instance + * is created by bytecode mode and it is NULL, a temporary env object will be created + * @param function the function to be called + * @param argc the number of arguments + * @param argv the arguments. If the function method has return value, + * the first (or first two in case 64-bit return value) element of + * argv stores the return value of the called WASM function after this + * function returns. + * + * @return true if success, false otherwise and exception will be thrown, + * the caller can call wasm_runtime_get_exception to get exception info. + */ +bool +wasm_runtime_call_wasm(WASMModuleInstance *module, + WASMExecEnv *exec_env, + WASMFunctionInstance *function, + unsigned argc, uint32 argv[]); + +/** + * Set current exception string to global exception string. + * + * @param module the wasm module instance + * + * @param exception current exception string + */ +void +wasm_runtime_set_exception(WASMModuleInstance *module, + const char *exception); + +/** + * Get current exception string. + * + * @param module the wasm module instance + * + * @return return exception string if exception is thrown, NULL otherwise + */ +const char* +wasm_runtime_get_exception(WASMModuleInstance *module); + +/** + * Enlarge wasm memory data space. + * + * @param module the wasm module instance + * @param inc_page_count denote the page number to increase + * @return return true if enlarge successfully, false otherwise + */ +bool +wasm_runtime_enlarge_memory(WASMModuleInstance *module, int inc_page_count); + +/* See wasm-export.h for description */ +WASMModuleInstance * +wasm_runtime_get_current_module_inst(); + +/* See wasm-export.h for description */ +int32_t +wasm_runtime_module_malloc(WASMModuleInstance *module_inst, uint32_t size); + +/* See wasm-export.h for description */ +void +wasm_runtime_module_free(WASMModuleInstance *module_inst, int32_t ptr); + +/* See wasm-export.h for description */ +bool +wasm_runtime_validate_app_addr(WASMModuleInstance *module_inst, + int32_t app_offset, uint32_t size); + +/* See wasm-export.h for description */ +bool +wasm_runtime_validate_native_addr(WASMModuleInstance *module_inst, + void *native_ptr, uint32_t size); + +/* See wasm-export.h for description */ +void * +wasm_runtime_addr_app_to_native(WASMModuleInstance *module_inst, + int32_t app_offset); + +/* See wasm-export.h for description */ +int32_t +wasm_runtime_addr_native_to_app(WASMModuleInstance *module_inst, + void *native_ptr); + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_RUNTIME_H */ + diff --git a/core/iwasm/runtime/vmcore_wasm/wasm-thread.h b/core/iwasm/runtime/vmcore_wasm/wasm-thread.h new file mode 100644 index 000000000..6a03489d2 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm-thread.h @@ -0,0 +1,146 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_RUNTIME_THREAD_H +#define _WASM_RUNTIME_THREAD_H + +#include "wasm_assert.h" +#include "wasm_thread.h" + +#ifdef __cplusplus +extern "C" { +#endif + +struct WASMModuleInstance; +struct WASMInterpFrame; + +typedef struct WASMStack { + /* The bottom of the stack, must be 8-bytes align. */ + uint8 *bottom; + /* Top cell index which is free. */ + uint8 *top; + /* The top boundary of the stack. */ + uint8 *top_boundary; +} WASMStack; + +typedef struct WASMThread { + /* Previous thread's tlr of an instance. */ + struct WASMThread *prev; + + /* Next thread's tlr of an instance. */ + struct WASMThread *next; + + /* The WASM module instance of current thread */ + struct WASMModuleInstance *module_inst; + + /* Current frame of current thread. */ + struct WASMInterpFrame *cur_frame; + + /* The boundary of native stack. When interpreter detects that native + frame may overrun this boundary, it will throw a stack overflow + exception. */ + void *native_stack_boundary; + + /* The WASM stack of current thread. */ + WASMStack wasm_stack; + + /* The native thread handle of current thread. */ + korp_tid handle; + + /* Current suspend count of this thread. */ + uint32 suspend_count; +} WASMThread; + +/** + * Allocate a WASM frame from the WASM stack. + * + * @param tlr the current thread + * @param size size of the WASM frame, it must be a multiple of 4 + * + * @return the WASM frame if there is enough space in the stack area + * with a protection area, NULL otherwise + */ +static inline void* +wasm_thread_alloc_wasm_frame(WASMThread *tlr, unsigned size) +{ + uint8 *addr = tlr->wasm_stack.top; + + wasm_assert(!(size & 3)); + + /* The outs area size cannot be larger than the frame size, so + multiplying by 2 is enough. */ + if (addr + size * 2 > tlr->wasm_stack.top_boundary) { + /* WASM stack overflow. */ + /* When throwing SOE, the preserved space must be enough. */ + /*wasm_assert(!tlr->throwing_soe);*/ + return NULL; + } + + tlr->wasm_stack.top += size; + + return addr; +} + +static inline void +wasm_thread_free_wasm_frame(WASMThread *tlr, void *prev_top) +{ + wasm_assert((uint8 *)prev_top >= tlr->wasm_stack.bottom); + tlr->wasm_stack.top = (uint8 *)prev_top; +} + +/** + * Get the current WASM stack top pointer. + * + * @param tlr the current thread + * + * @return the current WASM stack top pointer + */ +static inline void* +wasm_thread_wasm_stack_top(WASMThread *tlr) +{ + return tlr->wasm_stack.top; +} + +/** + * Set the current frame pointer. + * + * @param tlr the current thread + * @param frame the WASM frame to be set for the current thread + */ +static inline void +wasm_thread_set_cur_frame(WASMThread *tlr, struct WASMInterpFrame *frame) +{ + tlr->cur_frame = frame; +} + +/** + * Get the current frame pointer. + * + * @param tlr the current thread + * + * @return the current frame pointer + */ +static inline struct WASMInterpFrame* +wasm_thread_get_cur_frame(WASMThread *tlr) +{ + return tlr->cur_frame; +} + +#ifdef __cplusplus +} +#endif + +#endif /* end of _WASM_RUNTIME_THREAD_H */ diff --git a/core/iwasm/runtime/vmcore_wasm/wasm.h b/core/iwasm/runtime/vmcore_wasm/wasm.h new file mode 100644 index 000000000..6917183b1 --- /dev/null +++ b/core/iwasm/runtime/vmcore_wasm/wasm.h @@ -0,0 +1,392 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _WASM_H_ +#define _WASM_H_ + +#include "wasm_platform.h" +#include "wasm_hashmap.h" +#include "wasm_assert.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** Value Type */ +#define VALUE_TYPE_I32 0x7F +#define VALUE_TYPE_I64 0X7E +#define VALUE_TYPE_F32 0x7D +#define VALUE_TYPE_F64 0x7C +#define VALUE_TYPE_VOID 0x00 + +/* Table Element Type */ +#define TABLE_ELEM_TYPE_ANY_FUNC 0x70 + +#define MaxMemoryPages 65536 +#define MaxTableElems UINT32_MAX +#define NumBytesPerPage 65536 +#define NumBytesPerPageLog2 16 +#define MaxReturnValues 16 + +#define INIT_EXPR_TYPE_I32_CONST 0x41 +#define INIT_EXPR_TYPE_I64_CONST 0x42 +#define INIT_EXPR_TYPE_F32_CONST 0x43 +#define INIT_EXPR_TYPE_F64_CONST 0x44 +#define INIT_EXPR_TYPE_GET_GLOBAL 0x23 +#define INIT_EXPR_TYPE_ERROR 0xff + +#define WASM_MAGIC_NUMBER 0x6d736100 +#define WASM_CURRENT_VERSION 1 + +#define SECTION_TYPE_USER 0 +#define SECTION_TYPE_TYPE 1 +#define SECTION_TYPE_IMPORT 2 +#define SECTION_TYPE_FUNC 3 +#define SECTION_TYPE_TABLE 4 +#define SECTION_TYPE_MEMORY 5 +#define SECTION_TYPE_GLOBAL 6 +#define SECTION_TYPE_EXPORT 7 +#define SECTION_TYPE_START 8 +#define SECTION_TYPE_ELEM 9 +#define SECTION_TYPE_CODE 10 +#define SECTION_TYPE_DATA 11 + +#define IMPORT_KIND_FUNC 0 +#define IMPORT_KIND_TABLE 1 +#define IMPORT_KIND_MEMORY 2 +#define IMPORT_KIND_GLOBAL 3 + +#define EXPORT_KIND_FUNC 0 +#define EXPORT_KIND_TABLE 1 +#define EXPORT_KIND_MEMORY 2 +#define EXPORT_KIND_GLOBAL 3 + +#define BLOCK_TYPE_BLOCK 0 +#define BLOCK_TYPE_LOOP 1 +#define BLOCK_TYPE_IF 2 +#define BLOCK_TYPE_FUNCTION 3 + +#define CALL_TYPE_WRAPPER 0 +#define CALL_TYPE_C_INTRINSIC 1 + +typedef union WASMValue { + int32 i32; + uint32 u32; + int64 i64; + uint64 u64; + float32 f32; + float64 f64; + uintptr_t addr; +} WASMValue; + +typedef struct InitializerExpression { + /* type of INIT_EXPR_TYPE_XXX */ + uint8 init_expr_type; + union { + int32 i32; + int64 i64; + float32 f32; + float64 f64; + uint32 global_index; + } u; +} InitializerExpression; + +typedef struct WASMType { + uint32 param_count; + /* only one result is supported currently */ + uint32 result_count; + /* types of params and results */ + uint8 types[1]; +} WASMType; + +typedef struct WASMTable { + uint8 elem_type; + uint32 flags; + uint32 init_size; + /* specified if (flags & 1), else it is 0x10000 */ + uint32 max_size; +} WASMTable; + +typedef struct WASMMemory { + uint32 flags; + /* 64 kbytes one page by default */ + uint32 init_page_count; + uint32 max_page_count; +} WASMMemory; + +typedef struct WASMTableImport { + char *module_name; + char *field_name; + uint8 elem_type; + uint32 flags; + uint32 init_size; + /* specified if (flags & 1), else it is 0x10000 */ + uint32 max_size; +} WASMTableImport; + +typedef struct WASMMemoryImport { + char *module_name; + char *field_name; + uint32 flags; + /* 64 kbytes one page by default */ + uint32 init_page_count; + uint32 max_page_count; +} WASMMemoryImport; + +typedef struct WASMFunctionImport { + char *module_name; + char *field_name; + /* function type */ + WASMType *func_type; + /* c intrinsic function or wrapper function */ + uint32 call_type; + /* function pointer after linked */ + void *func_ptr_linked; +} WASMFunctionImport; + +typedef struct WASMGlobalImport { + char *module_name; + char *field_name; + uint8 type; + bool is_mutable; + bool is_addr; + /* global data after linked */ + WASMValue global_data_linked; +} WASMGlobalImport; + +typedef struct WASMImport { + uint8 kind; + union { + WASMFunctionImport function; + WASMTableImport table; + WASMMemoryImport memory; + WASMGlobalImport global; + struct { + char *module_name; + char *field_name; + } names; + } u; +} WASMImport; + +typedef struct WASMFunction { + /* the type of function */ + WASMType *func_type; + uint32 local_count; + uint8 *local_types; + uint32 max_stack_cell_num; + uint32 max_block_num; + uint32 code_size; + uint8 *code; +} WASMFunction; + +typedef struct WASMGlobal { + uint8 type; + bool is_mutable; + bool is_addr; + InitializerExpression init_expr; +} WASMGlobal; + +typedef struct WASMExport { + char *name; + uint8 kind; + uint32 index; +} WASMExport; + +typedef struct WASMTableSeg { + uint32 table_index; + InitializerExpression base_offset; + uint32 function_count; + uint32 *func_indexes; +} WASMTableSeg; + +typedef struct WASMDataSeg { + uint32 memory_index; + InitializerExpression base_offset; + uint32 data_length; + uint8 *data; +} WASMDataSeg; + +typedef struct WASMModule { + uint32 type_count; + uint32 import_count; + uint32 function_count; + uint32 table_count; + uint32 memory_count; + uint32 global_count; + uint32 export_count; + uint32 table_seg_count; + uint32 data_seg_count; + + uint32 import_function_count; + uint32 import_table_count; + uint32 import_memory_count; + uint32 import_global_count; + + WASMImport *import_functions; + WASMImport *import_tables; + WASMImport *import_memories; + WASMImport *import_globals; + + WASMType **types; + WASMImport *imports; + WASMFunction **functions; + WASMTable *tables; + WASMMemory *memories; + WASMGlobal *globals; + WASMExport *exports; + WASMTableSeg *table_segments; + WASMDataSeg **data_segments; + uint32 start_function; + + HashMap *const_str_set; + HashMap *branch_set; +} WASMModule; + +typedef struct WASMBranchBlock { + uint8 block_type; + uint8 return_type; + uint8 *start_addr; + uint8 *else_addr; + uint8 *end_addr; + uint32 *frame_sp; + uint8 *frame_ref; +} WASMBranchBlock; + +typedef struct WASMSection { + struct WASMSection *next; + /* section type */ + int section_type; + /* section body, not include type and size */ + const uint8_t *section_body; + /* section body size */ + uint32_t section_body_size; +} WASMSection; + +/* Execution environment, e.g. stack info */ +/** + * Align an unsigned value on a alignment boundary. + * + * @param v the value to be aligned + * @param b the alignment boundary (2, 4, 8, ...) + * + * @return the aligned value + */ +inline static unsigned +align_uint (unsigned v, unsigned b) +{ + unsigned m = b - 1; + return (v + m) & ~m; +} + +/** + * Return the hash value of c string. + */ +inline static uint32 +wasm_string_hash(const char *str) +{ + unsigned h = strlen(str); + const uint8 *p = (uint8*)str; + const uint8 *end = p + h; + + while (p != end) + h = ((h << 5) - h) + *p++; + return h; +} + +/** + * Whether two c strings are equal. + */ +inline static bool +wasm_string_equal(const char *s1, const char *s2) +{ + return strcmp(s1, s2) == 0 ? true : false; +} + +/** + * Return the byte size of value type. + * + */ +inline static uint32 +wasm_value_type_size(uint8 value_type) +{ + switch (value_type) { + case VALUE_TYPE_I32: + case VALUE_TYPE_F32: + return sizeof(int32); + case VALUE_TYPE_I64: + case VALUE_TYPE_F64: + return sizeof(int64); + default: + wasm_assert(0); + } + return 0; +} + +inline static uint16 +wasm_value_type_cell_num(uint8 value_type) +{ + switch (value_type) { + case VALUE_TYPE_I32: + case VALUE_TYPE_F32: + return 1; + case VALUE_TYPE_I64: + case VALUE_TYPE_F64: + return 2; + default: + wasm_assert(0); + } + return 0; +} + +inline static uint16 +wasm_get_cell_num(const uint8 *types, uint32 type_count) +{ + uint16 cell_num = 0; + uint32 i; + for (i = 0; i < type_count; i++) + cell_num += wasm_value_type_cell_num(types[i]); + return cell_num; +} + +inline static uint16 +wasm_type_param_cell_num(const WASMType *type) +{ + return wasm_get_cell_num(type->types, type->param_count); +} + +inline static uint16 +wasm_type_return_cell_num(const WASMType *type) +{ + return wasm_get_cell_num(type->types + type->param_count, + type->result_count); +} + +inline static bool +wasm_type_equal(const WASMType *type1, const WASMType *type2) +{ + return (type1->param_count == type2->param_count + && type1->result_count == type2->result_count + && memcmp(type1->types, type2->types, + type1->param_count + type1->result_count) == 0) + ? true : false; +} + +#ifdef __cplusplus +} /* end of extern "C" */ +#endif + +#endif /* end of _WASM_H_ */ + diff --git a/core/shared-lib/include/bh_common.h b/core/shared-lib/include/bh_common.h new file mode 100755 index 000000000..9a3366ce1 --- /dev/null +++ b/core/shared-lib/include/bh_common.h @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_COMMON_H +#define _BH_COMMON_H + +#include "bh_assert.h" +#include "bh_definition.h" +#include "bh_platform.h" +#include "bh_log.h" +#include "bh_list.h" + +#define bh_memcpy_s(dest, dlen, src, slen) do { \ + int _ret = slen == 0 ? 0 : b_memcpy_s (dest, dlen, src, slen); \ + (void)_ret; \ + bh_assert (_ret == 0); \ + } while (0) + +#define bh_strcat_s(dest, dlen, src) do { \ + int _ret = b_strcat_s (dest, dlen, src); \ + (void)_ret; \ + bh_assert (_ret == 0); \ + } while (0) + +#define bh_strcpy_s(dest, dlen, src) do { \ + int _ret = b_strcpy_s (dest, dlen, src); \ + (void)_ret; \ + bh_assert (_ret == 0); \ + } while (0) + +#endif diff --git a/core/shared-lib/include/bh_list.h b/core/shared-lib/include/bh_list.h new file mode 100644 index 000000000..01644dc04 --- /dev/null +++ b/core/shared-lib/include/bh_list.h @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_LIST_H +#define _BH_LIST_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "korp_types.h" /*For bool type*/ +#include "bh_platform.h" + +/* List user should embedded bh_list_link into list elem data structure + * definition. And bh_list_link data field should be the first field. + * For example, if we would like to use bh_list for our own data type A, + * A must be defined as a structure like below: + * struct A { + * bh_list_link l; + * ... + * }; + * + * bh_list_link is defined as a structure (not typedef void*). + * It will make extend list into bi-direction easy. + */ +typedef struct _bh_list_link { + struct _bh_list_link *next; +} bh_list_link; + +typedef struct _bh_list { + bh_list_link head; + uint32 len; +} bh_list; + +/* Beihai list operation return value */ +typedef enum _bh_list_status { + BH_LIST_SUCCESS = 0, BH_LIST_ERROR = -1 +} bh_list_status; + +/** + * Initialize a list. + * + * @param list pointer to list. + * @return BH_LIST_ERROR if OK; + * BH_LIST_ERROR if list pointer is NULL. + */ +bh_list_status bh_list_init(bh_list *list); + +/** + * Insert an elem pointer into list. The list node memory is maintained by list while + * elem memory is the responsibility of list user. + * + * @param list pointer to list. + * @param elem pointer to elem that will be inserted into list. + * @return BH_LIST_ERROR if OK; + * BH_LIST_ERROR if input is invalid or no memory available. + */ +extern bh_list_status _bh_list_insert(bh_list *list, void *elem); + +#ifdef _INSTRUMENT_TEST_ENABLED +extern bh_list_status bh_list_insert_instr(bh_list *list, void *elem, const char*func_name); +#define bh_list_insert(list, elem) bh_list_insert_instr(list, elem, __FUNCTION__) +#else +#define bh_list_insert _bh_list_insert +#endif + +/** + * Remove an elem pointer from list. The list node memory is maintained by list while + * elem memory is the responsibility of list user. + * + * @param list pointer to list. + * @param elem pointer to elem that will be inserted into list. + * @return BH_LIST_ERROR if OK; + * BH_LIST_ERROR if element does not exist in given list. + */ +bh_list_status bh_list_remove(bh_list *list, void *elem); + +/** + * Get the list length. + * + * @param list pointer to list. + * @return the length of the list. + */ +uint32 bh_list_length(bh_list *list); + +/** + * Get the first elem in the list. + * + * @param list pointer to list. + * @return pointer to the first node. + */ +void* bh_list_first_elem(bh_list *list); + +/** + * Get the next elem of given list input elem. + * + * @param node pointer to list node. + * @return pointer to next list node. + */ +void* bh_list_elem_next(void *node); + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _BH_LIST_H */ + diff --git a/core/shared-lib/include/bh_log.h b/core/shared-lib/include/bh_log.h new file mode 100644 index 000000000..c2e45fe06 --- /dev/null +++ b/core/shared-lib/include/bh_log.h @@ -0,0 +1,155 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file bh_log.h + * @date Tue Nov 8 18:19:10 2011 + * + * @brief This log system supports wrapping multiple outputs into one + * log message. This is useful for outputting variable-length logs + * without additional memory overhead (the buffer for concatenating + * the message), e.g. exception stack trace, which cannot be printed + * by a single log calling without the help of an additional buffer. + * Avoiding additional memory buffer is useful for resource-constraint + * systems. It can minimize the impact of log system on applications + * and logs can be printed even when no enough memory is available. + * Functions with prefix "_" are private functions. Only macros that + * are not start with "_" are exposed and can be used. + */ + +#ifndef _BH_LOG_H +#define _BH_LOG_H + +#include + +#include "korp_types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The following functions are the primitive operations of this log + * system. A normal usage of the log system is to call bh_log_printf + * or bh_log_vprintf one or multiple times and then call bh_log_commit + * to wrap (mark) the previous outputs into one log message. The + * bh_log and macros LOG_ERROR etc. can be used to output log messages + * that can be wrapped into one log calling. + */ +int _bh_log_init(void); +void _bh_log_set_verbose_level(int level); +void _bh_log_printf(const char *fmt, ...); +void _bh_log_vprintf(const char *fmt, va_list ap); +void _bh_log_commit(void); + +#if BEIHAI_ENABLE_LOG != 0 +# define bh_log_init() _bh_log_init () +# define bh_log_set_verbose_level(l) _bh_log_set_verbose_level (l) +# define bh_log_printf(...) _bh_log_printf (__VA_ARGS__) +# define bh_log_vprintf(...) _bh_log_vprintf (__VA_ARGS__) +# define bh_log_commit() _bh_log_commit () +#else /* BEIHAI_ENABLE_LOG != 0 */ +# define bh_log_init() 0 +# define bh_log_set_verbose_level(l) (void)0 +# define bh_log_printf(...) (void)0 +# define bh_log_vprintf(...) (void)0 +# define bh_log_commit() (void)0 +#endif /* BEIHAI_ENABLE_LOG != 0 */ + +void _bh_log(const char *tag, const char *file, int line, const char *fmt, ...); + +/* Always print fatal message */ +# define LOG_FATAL(...) _bh_log ("V0.", NULL, 0, __VA_ARGS__) + +#if BEIHAI_ENABLE_LOG != 0 +# define LOG_ERROR(...) _bh_log ("V1.", NULL, 0, __VA_ARGS__) +# define LOG_WARNING(...) _bh_log ("V2.", NULL, 0, __VA_ARGS__) +# define LOG_INFO_RELEASE(...) _bh_log ("V3.", NULL, 0, __VA_ARGS__) +# define LOG_INFO_APP_DEV(...) _bh_log ("V4.", NULL, 0, __VA_ARGS__) +# define LOG_VERBOSE(...) _bh_log ("V5.", NULL, 0, __VA_ARGS__) +# if BEIHAI_ENABLE_MEMORY_PROFILING != 0 +# define LOG_PROFILE(...) _bh_log ("V3.", NULL, 0, __VA_ARGS__) +# else +# define LOG_PROFILE(...) (void)0 +#endif +# if BEIHAI_ENABLE_QUEUE_PROFILING != 0 +# define LOG_QUEUE_PROFILE(...) _bh_log ("V3.", NULL, 0, __VA_ARGS__) +# else +# define LOG_QUEUE_PROFILE(...) (void)0 +#endif +# if BEIHAI_ENABLE_GC_STAT_PROFILING != 0 +# define LOG_GC_STAT_PROFILE(...) _bh_log ("V3.", NULL, 0, __VA_ARGS__) +# else +# define LOG_GC_STAT_PROFILE(...) (void)0 +#endif +#else /* BEIHAI_ENABLE_LOG != 0 */ +# define LOG_ERROR(...) (void)0 +# define LOG_WARNING(...) (void)0 +# define LOG_INFO_APP_DEV(...) (void)0 +# define LOG_INFO_RELEASE(...) (void)0 +# define LOG_VERBOSE(...) (void)0 +# define LOG_PROFILE(...) (void)0 +# define LOG_QUEUE_PROFILE(...) (void)0 +# define LOG_GC_STAT_PROFILE(...) (void)0 +#endif /* BEIHAI_ENABLE_LOG != 0 */ + +#define LOG_PROFILE_INSTANCE_HEAP_CREATED(heap) \ + LOG_PROFILE ("PROF.INSTANCE.HEAP_CREATED: HEAP=%08X", heap) +#define LOG_PROFILE_INSTANCE_THREAD_STARTED(heap) \ + LOG_PROFILE ("PROF.INSTANCE.THREAD_STARTED: HEAP=%08X", heap) +#define LOG_PROFILE_HEAP_ALLOC(heap, size) \ + LOG_PROFILE ("PROF.HEAP.ALLOC: HEAP=%08X SIZE=%d", heap, size) +#define LOG_PROFILE_HEAP_FREE(heap, size) \ + LOG_PROFILE ("PROF.HEAP.FREE: HEAP=%08X SIZE=%d", heap, size) +#define LOG_PROFILE_HEAP_NEW(heap, size) \ + LOG_PROFILE ("PROF.HEAP.NEW: HEAP=%08X SIZE=%d", heap, size) +#define LOG_PROFILE_HEAP_GC(heap, size) \ + LOG_PROFILE ("PROF.HEAP.GC: HEAP=%08X SIZE=%d", heap, size) +#define LOG_PROFILE_STACK_PUSH(used) \ + LOG_PROFILE ("PROF.STACK.PUSH: USED=%d", used) +#define LOG_PROFILE_STACK_POP() \ + LOG_PROFILE ("PROF.STACK.POP") + +/* Please add your component ahead of LOG_COM_MAX */ +enum { + LOG_COM_APP_MANAGER = 0, + LOG_COM_GC, + LOG_COM_HMC, + LOG_COM_UTILS, + LOG_COM_VERIFIER_JEFF, + LOG_COM_VMCORE_JEFF, + LOG_COM_MAX +}; + +#if defined(BH_DEBUG) +void log_parse_coms(const char *coms); +int bh_log_dcom_is_enabled(int component); + +#define LOG_DEBUG(component, ...) do { \ + if (bh_log_dcom_is_enabled (component)) \ + _bh_log ("V6: ", __FILE__, __LINE__, __VA_ARGS__); \ + } while (0) + +#else /* defined(BH_DEBUG) */ + +#define LOG_DEBUG(component, ...) (void)0 + +#endif /* defined(BH_DEBUG) */ + +#ifdef __cplusplus +} +#endif + +#endif /* _BH_LOG_H */ diff --git a/core/shared-lib/include/bh_memory.h b/core/shared-lib/include/bh_memory.h new file mode 100644 index 000000000..c24b132a7 --- /dev/null +++ b/core/shared-lib/include/bh_memory.h @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_MEMORY_H +#define _BH_MEMORY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define BH_KB (1024) +#define BH_MB ((BH_KB)*1024) +#define BH_GB ((BH_MB)*1024) + +/** + * Initialize memory allocator with a pool, the bh_malloc/bh_free function + * will malloc/free memory from the pool + * + * @param mem the pool buffer + * @param bytes the size bytes of the buffer + * + * @return 0 if success, -1 otherwise + */ +int bh_memory_init_with_pool(void *mem, unsigned int bytes); + +/** + * Initialize memory allocator with memory allocator, the bh_malloc/bh_free + * function will malloc/free memory with the allocator passed + * + * @param malloc_func the malloc function + * @param free_func the free function + * + * @return 0 if success, -1 otherwise + */ +int bh_memory_init_with_allocator(void *malloc_func, void *free_func); + +/** + * Destroy memory + */ +void bh_memory_destroy(); + +/** + * This function allocates a memory chunk from system + * + * @param size bytes need allocate + * + * @return the pointer to memory allocated + */ +void* bh_malloc(unsigned int size); + +/** + * This function frees memory chunk + * + * @param ptr the pointer to memory need free + */ +void bh_free(void *ptr); + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _BH_MEMORY_H */ + diff --git a/core/shared-lib/include/bh_queue.h b/core/shared-lib/include/bh_queue.h new file mode 100644 index 000000000..a30c11266 --- /dev/null +++ b/core/shared-lib/include/bh_queue.h @@ -0,0 +1,99 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_QUEUE_H +#define _BH_QUEUE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "korp_types.h" /*For bool type*/ +#include "bh_platform.h" + +struct _bh_queue_node; +typedef struct _bh_queue_node * bh_message_t; +struct bh_queue; +typedef struct bh_queue bh_queue; + +typedef void (*bh_queue_handle_msg_callback)(void *message); + +#define bh_queue_malloc bh_malloc +#define bh_queue_free bh_free + +#define bh_queue_mutex korp_mutex +#define bh_queue_sem korp_sem +#define bh_queue_cond korp_cond + +#define bh_queue_mutex_init vm_mutex_init +#define bh_queue_mutex_destroy vm_mutex_destroy +#define bh_queue_mutex_lock vm_mutex_lock +#define bh_queue_mutex_unlock vm_mutex_unlock + +#define bh_queue_sem_init vm_sem_init +#define bh_queue_sem_destroy vm_sem_destroy +#define bh_queue_sem_wait vm_sem_wait +#define bh_queue_sem_reltimedwait vm_sem_reltimedwait +#define bh_queue_sem_post vm_sem_post + +#define bh_queue_cond_init vm_cond_init +#define bh_queue_cond_destroy vm_cond_destroy +#define bh_queue_cond_wait vm_cond_wait +#define bh_queue_cond_timedwait vm_cond_reltimedwait +#define bh_queue_cond_signal vm_cond_signal +#define bh_queue_cond_broadcast vm_cond_broadcast + +typedef void (*bh_msg_cleaner)(void *msg); + +bh_queue * +bh_queue_create(); + +void +bh_queue_destroy(bh_queue *queue); + +char * bh_message_payload(bh_message_t message); +int bh_message_payload_len(bh_message_t message); +int bh_message_type(bh_message_t message); + +bh_message_t bh_new_msg(unsigned short tag, void *body, unsigned int len, + void * handler); +void bh_free_msg(bh_message_t msg); +bool bh_post_msg(bh_queue *queue, unsigned short tag, void *body, + unsigned int len); +bool bh_post_msg2(bh_queue *queue, bh_message_t msg); + +bh_message_t bh_get_msg(bh_queue *queue, int timeout); + +unsigned +bh_queue_get_message_count(bh_queue *queue); + +void +bh_queue_enter_loop_run(bh_queue *queue, + bh_queue_handle_msg_callback handle_cb); + +void +bh_queue_enter_loop_run1(bh_queue *queue, + bh_queue_handle_msg_callback handle_cb); + +void +bh_queue_exit_loop_run(bh_queue *queue); + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _BH_QUEUE_H */ + diff --git a/core/shared-lib/include/config.h b/core/shared-lib/include/config.h new file mode 100644 index 000000000..8ca0e01e2 --- /dev/null +++ b/core/shared-lib/include/config.h @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _CONFIG_H_ + +/* Memory allocator ems */ +#define MEM_ALLOCATOR_EMS 0 + +/* Memory allocator tlsf */ +#define MEM_ALLOCATOR_TLSF 1 + +/* Default memory allocator */ +#define DEFAULT_MEM_ALLOCATOR MEM_ALLOCATOR_EMS + +/* Beihai log system */ +#define BEIHAI_ENABLE_LOG 1 + +/* Beihai debugger support */ +#define BEIHAI_ENABLE_TOOL_AGENT 1 + +/* Beihai debug monitoring server, must define + BEIHAI_ENABLE_TOOL_AGENT firstly */ +#define BEIHAI_ENABLE_TOOL_AGENT_BDMS 1 + +/* enable no signature on sdv since verify doesn't work as lacking public key */ +#ifdef CONFIG_SDV +#define BEIHAI_ENABLE_NO_SIGNATURE 1 +#else +#define BEIHAI_ENABLE_NO_SIGNATURE 0 +#endif + +/* WASM VM log system */ +#define WASM_ENABLE_LOG 1 + +/* WASM Interpreter labels-as-values feature */ +#define WASM_ENABLE_LABELS_AS_VALUES 1 + +/* Heap and stack profiling */ +#define BEIHAI_ENABLE_MEMORY_PROFILING 0 + +/* Max app number of all modules */ +#define MAX_APP_INSTALLATIONS 3 + +/* Default timer number in one app */ +#define DEFAULT_TIMERS_PER_APP 20 + +/* Max timer number in one app */ +#define MAX_TIMERS_PER_APP 30 + +/* Max resource registration number in one app */ +#define RESOURCE_REGISTRATION_NUM_MAX 16 + +/* Max length of resource/event url */ +#define RESOUCE_EVENT_URL_LEN_MAX 256 + +/* Default length of queue */ +#define DEFAULT_QUEUE_LENGTH 50 + +/* Default watchdog interval in ms */ +#define DEFAULT_WATCHDOG_INTERVAL (3 * 60 * 1000) + +/* Workflow heap size */ +/* +#define WORKING_FLOW_HEAP_SIZE 0 +*/ + +/* Default/min/max heap size of each app */ +#define APP_HEAP_SIZE_DEFAULT (48 * 1024) +#define APP_HEAP_SIZE_MIN (2 * 1024) +#define APP_HEAP_SIZE_MAX (1024 * 1024) + +/* Default/min/max stack size of each app thread */ +#define APP_THREAD_STACK_SIZE_DEFAULT (20 * 1024) +#define APP_THREAD_STACK_SIZE_MIN (16 * 1024) +#define APP_THREAD_STACK_SIZE_MAX (256 * 1024) + +#endif diff --git a/core/shared-lib/include/errcode.h b/core/shared-lib/include/errcode.h new file mode 100755 index 000000000..5fc81cb8d --- /dev/null +++ b/core/shared-lib/include/errcode.h @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file errcode.h + * @date Wed Feb 29 18:58:30 2012 + * + * @brief Host-visible error code definition + */ + +#ifndef BEIHAI_ERRCODE_H +#define BEIHAI_ERRCODE_H + +/** + * Responses to all remote requests from host to Beihai runtime has a + * return error code, which is used to indicate the processing result: + * successful or any error occurs. The following definitions include + * all those error codes that may be returned to host. + */ +enum { + BHE_SUCCESS = 0x000, /* Successful */ + + /* General errors: 0x100 */ + BHE_OUT_OF_MEMORY = 0x101, /* Out of memory */ + BHE_BAD_PARAMETER = 0x102, /* Bad parameters to native */ + BHE_INSUFFICIENT_BUFFER = 0x103, + BHE_MUTEX_INIT_FAIL = 0x104, + BHE_COND_INIT_FAIL = 0x105, /* Cond init fail is not return to + * host now, it may be used later. + */ + BHE_WD_TIMEOUT = 0x106, /* Watchdog time out */ + + /* Communication: 0x200 */ + BHE_MAILBOX_NOT_FOUND = 0x201, /* Mailbox not found */ + BHE_MSG_QUEUE_IS_FULL = 0x202, /* Message queue is full */ + BHE_MAILBOX_DENIED = 0x203, /* Mailbox is denied by firewall */ + + /* Applet manager: 0x300 */ + BHE_LOAD_JEFF_FAIL = 0x303, /* JEFF file load fail, OOM or file + * format error not distinct by + * current JEFF loading + * process (bool jeff_loader_load). + */ + BHE_PACKAGE_NOT_FOUND = 0x304, /* Request operation on a package, + * but it does not exist. + */ + BHE_EXIST_LIVE_SESSION = 0x305, /* Uninstall package fail because of + * live session exist. + */ + BHE_VM_INSTANCE_INIT_FAIL = 0x306, /* VM instance init fail when create + * session. + */ + BHE_QUERY_PROP_NOT_SUPPORT = 0x307, /* Query applet property that Beihai + * does not support. + */ + BHE_INVALID_BPK_FILE = 0x308, /* Incorrect Beihai package format */ + + BHE_VM_INSTNACE_NOT_FOUND = 0x312, /* VM instance not found */ + BHE_STARTING_JDWP_FAIL = 0x313, /* JDWP agent starting fail */ + BHE_GROUP_CHECK_FAIL = 0x314, /* Group access checking fail*/ + + /* Applet instance: 0x400 */ + BHE_UNCAUGHT_EXCEPTION = 0x401, /* uncaught exception */ + BHE_APPLET_BAD_PARAMETER = 0x402, /* Bad parameters to applet */ + BHE_APPLET_SMALL_BUFFER = 0x403, /* Small response buffer */ + + /*TODO: Should be removed these UI error code when integrate with ME 9 */ + /* UI: 0x500 */ + BHE_UI_EXCEPTION = 0x501, + BHE_UI_ILLEGAL_USE = 0x502, + BHE_UI_ILLEGAL_PARAMETER = 0x503, + BHE_UI_NOT_INITIALIZED = 0x504, + BHE_UI_NOT_SUPPORTED = 0x505, + BHE_UI_OUT_OF_RESOURCES = 0x506 +}; + +#endif diff --git a/core/shared-lib/include/korp_types.h b/core/shared-lib/include/korp_types.h new file mode 100755 index 000000000..daf6d6f4d --- /dev/null +++ b/core/shared-lib/include/korp_types.h @@ -0,0 +1,160 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _KORP_TYPES_H +#define _KORP_TYPES_H + +#include "bh_platform.h" +/* all types used in kORP should be explicit sized */ +typedef struct _korp_object korp_object; + +typedef unsigned int obj_info; +typedef korp_object* ref; + +#define BYTES_OF_OBJ_INFO 4 +#define BYTES_OF_REF 4 + +/* don't change the number, it's hardcoded in kORP */ +enum _korp_array_type { + ARRAY_UINT8 = 0, /* bytes_of_uint8 = 1 << ARRAY_UINT8 */ + ARRAY_UINT16 = 1, /* bytes_of_uint16 = 1 << ARRAY_UINT16 */ + ARRAY_UINT32 = 2, /* bytes_of_uint32 = 1 << ARRAY_UINT32 */ + ARRAY_UINT64 = 3, /* bytes_of_uint64 = 1 << ARRAY_UINT64 */ + ARRAY_BOOLEAN = 4, + ARRAY_CHAR = 5, + ARRAY_FLOAT = 6, + ARRAY_DOUBLE = 7, + ARRAY_BYTE = 8, + ARRAY_SHORT = 9, + ARRAY_INT = 10, + ARRAY_LONG = 11, + ARRAY_REF = 12 /* for calculation */ +}; + +enum _korp_java_type { + JAVA_TYPE_WRONG = 0, + JAVA_TYPE_BYTE = 'B', + JAVA_TYPE_CHAR = 'C', + JAVA_TYPE_DOUBLE = 'D', + JAVA_TYPE_FLOAT = 'F', + JAVA_TYPE_INT = 'I', + JAVA_TYPE_LONG = 'J', + JAVA_TYPE_SHORT = 'S', + JAVA_TYPE_BOOLEAN = 'Z', + JAVA_TYPE_CLASS = 'L', + JAVA_TYPE_ARRAY = '[', + JAVA_TYPE_VOID = 'V', + JAVA_TYPE_STRING = '$' /* for TAG_String const value */ +}; + +enum korp_modifier_type { + MOD_PUBLIC = 0x0001, /* Class Field Method */ + MOD_PRIVATE = 0x0002, /* Field Method */ + MOD_PROTECTED = 0x0004, /* Field Method */ + MOD_STATIC = 0x0008, /* Field Method */ + MOD_FINAL = 0x0010, /* Class Field Method */ + MOD_SUPER = 0x0020, /* Class */ + MOD_SYNCHRONIZED = 0x0020, /* Method */ + MOD_VOLATILE = 0x0040, /* Field */ + MOD_TRANSIENT = 0x0080, /* Field */ + MOD_NATIVE = 0x0100, /* Method */ + MOD_INTERFACE = 0x0200, /* Class */ + MOD_ABSTRACT = 0x0400, /* Class Method */ + MOD_STRICT = 0x0800 /* Method */ +}; + +/* object header, used to access object info */ +struct _korp_object { + obj_info header; /* object header (I) */ +}; + +#define HASH_TABLE_SIZE 359 + +#ifndef NULL +#define NULL (void*)0 +#endif + +#define KORP_ERROR (-1) + +#ifndef __cplusplus +#define true 1 +#define false 0 +#define inline __inline +#endif + +/* forwarded declarations */ +typedef struct _korp_string_pool korp_string_pool; +typedef struct _korp_class_table korp_class_table; + +typedef enum _korp_loader_exception { + LD_OK = 0, + LD_NoClassDefFoundError, + LD_ClassFormatError, + LD_ClassCircularityError, + LD_IncompatibleClassChangeError, + LD_AbstractMethodError, /* occurs during preparation */ + LD_IllegalAccessError, + LD_InstantiationError, + LD_NoSuchFieldError, + LD_NoSuchMethodError, + LD_UnsatisfiedLinkError, + LD_VerifyError +} korp_loader_exception; + +typedef enum _korp_java_type korp_java_type; +typedef enum _korp_array_type korp_array_type; + +/* typedef struct _korp_thread korp_thread; */ +typedef struct _korp_method korp_method; +typedef struct _korp_field korp_field; +typedef struct _korp_class korp_class; +typedef struct _korp_string korp_string; +typedef struct _korp_package korp_package; +typedef struct _korp_class_loader korp_class_loader; +typedef struct _korp_ref_array korp_ref_array; + +typedef struct _korp_entry korp_entry; +typedef struct _korp_preloaded korp_preloaded; +typedef struct _korp_env korp_env; + +typedef struct _korp_java_array korp_java_array; +typedef struct _korp_uint8_array korp_uint8_array; + +typedef struct _korp_vm_thread_list korp_vm_thread_list; + +#define korp_uint8 korp_uint32 +#define korp_uint16 korp_uint32 +#define korp_boolean korp_uint32 +#define korp_char korp_uint32 +#define korp_short korp_uint32 +#define korp_int korp_uint32 +#define korp_float korp_uint32 + +#define korp_long korp_uint64 +#define korp_double korp_uint64 + +#define korp_boolean_array korp_uint8_array +#define korp_char_array korp_uint8_array +#define korp_short_array korp_uint16_array +#define korp_int_array korp_uint32_array +#define korp_float_array korp_uint32_array +#define korp_double_array korp_uint64_array +#define korp_long_array korp_uint64_array + +#define korp_code korp_uint8_array + +#endif /* #ifndef _KORP_TYPES_H */ + diff --git a/core/shared-lib/include/mem_alloc.h b/core/shared-lib/include/mem_alloc.h new file mode 100644 index 000000000..acda4a911 --- /dev/null +++ b/core/shared-lib/include/mem_alloc.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __MEM_ALLOC_H +#define __MEM_ALLOC_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *mem_allocator_t; + +mem_allocator_t +mem_allocator_create(void *mem, uint32_t size); + +void +mem_allocator_destroy(mem_allocator_t allocator); + +void * +mem_allocator_malloc(mem_allocator_t allocator, uint32_t size); + +void +mem_allocator_free(mem_allocator_t allocator, void *ptr); + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef __MEM_ALLOC_H */ + diff --git a/core/shared-lib/mem-alloc/bh_memory.c b/core/shared-lib/mem-alloc/bh_memory.c new file mode 100644 index 000000000..46dd1fd8d --- /dev/null +++ b/core/shared-lib/mem-alloc/bh_memory.c @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_memory.h" +#include "mem_alloc.h" +#include +#include + +#ifndef MALLOC_MEMORY_FROM_SYSTEM + +typedef enum Memory_Mode { + MEMORY_MODE_UNKNOWN = 0, MEMORY_MODE_POOL, MEMORY_MODE_ALLOCATOR +} Memory_Mode; + +static Memory_Mode memory_mode = MEMORY_MODE_UNKNOWN; + +static mem_allocator_t pool_allocator = NULL; + +static void *(*malloc_func)(unsigned int size) = NULL; +static void (*free_func)(void *ptr) = NULL; + +int bh_memory_init_with_pool(void *mem, unsigned int bytes) +{ + mem_allocator_t _allocator = mem_allocator_create(mem, bytes); + + if (_allocator) { + memory_mode = MEMORY_MODE_POOL; + pool_allocator = _allocator; + return 0; + } + printf("Init memory with pool (%p, %u) failed.\n", mem, bytes); + return -1; +} + +int bh_memory_init_with_allocator(void *_malloc_func, void *_free_func) +{ + if (_malloc_func && _free_func && _malloc_func != _free_func) { + memory_mode = MEMORY_MODE_ALLOCATOR; + malloc_func = _malloc_func; + free_func = _free_func; + return 0; + } + printf("Init memory with allocator (%p, %p) failed.\n", _malloc_func, + _free_func); + return -1; +} + +void bh_memory_destroy() +{ + if (memory_mode == MEMORY_MODE_POOL) + mem_allocator_destroy(pool_allocator); + memory_mode = MEMORY_MODE_UNKNOWN; +} + +void* bh_malloc(unsigned int size) +{ + if (memory_mode == MEMORY_MODE_UNKNOWN) { + printf("bh_malloc failed: memory hasn't been initialize.\n"); + return NULL; + } else if (memory_mode == MEMORY_MODE_POOL) { + return mem_allocator_malloc(pool_allocator, size); + } else { + return malloc_func(size); + } +} + +void bh_free(void *ptr) +{ + if (memory_mode == MEMORY_MODE_UNKNOWN) { + printf("bh_free failed: memory hasn't been initialize.\n"); + } else if (memory_mode == MEMORY_MODE_POOL) { + mem_allocator_free(pool_allocator, ptr); + } else { + free_func(ptr); + } +} + +#else /* else of MALLOC_MEMORY_FROM_SYSTEM */ + +void* bh_malloc(unsigned int size) +{ + return malloc(size); +} + +void bh_free(void *ptr) +{ + if (ptr) + free(ptr); +} + +#endif /* end of MALLOC_MEMORY_FROM_SYSTEM*/ + diff --git a/core/shared-lib/mem-alloc/ems/ems_alloc.c b/core/shared-lib/mem-alloc/ems/ems_alloc.c new file mode 100644 index 000000000..d8682b6c7 --- /dev/null +++ b/core/shared-lib/mem-alloc/ems/ems_alloc.c @@ -0,0 +1,590 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ems_gc_internal.h" + +#if !defined(NVALGRIND) +#include +#endif + +static int hmu_is_in_heap(gc_heap_t* heap, hmu_t* hmu) +{ + return heap && hmu && (gc_uint8*) hmu >= heap->base_addr + && (gc_uint8*) hmu < heap->base_addr + heap->current_size; +} + +/* Remove a node from the tree it belongs to*/ + +/* @p can not be NULL*/ +/* @p can not be the ROOT node*/ + +/* Node @p will be removed from the tree and left,right,parent pointers of node @p will be*/ +/* set to be NULL. Other fields will not be touched.*/ +/* The tree will be re-organized so that the order conditions are still satisified.*/ +BH_STATIC void remove_tree_node(hmu_tree_node_t *p) +{ + hmu_tree_node_t *q = NULL, **slot = NULL; + + bh_assert(p); + bh_assert(p->parent); /* @p can not be the ROOT node*/ + + /* get the slot which holds pointer to node p*/ + if (p == p->parent->right) { + slot = &p->parent->right; + } else { + bh_assert(p == p->parent->left); /* @p should be a child of its parent*/ + slot = &p->parent->left; + } + + /* algorithms used to remove node p*/ + /* case 1: if p has no left child, replace p with its right child*/ + /* case 2: if p has no right child, replace p with its left child*/ + /* case 3: otherwise, find p's predecessor, remove it from the tree and replace p with it.*/ + /* use predecessor can keep the left <= root < right condition.*/ + + if (!p->left) { + /* move right child up*/ + *slot = p->right; + if (p->right) + p->right->parent = p->parent; + + p->left = p->right = p->parent = NULL; + return; + } + + if (!p->right) { + /* move left child up*/ + *slot = p->left; + p->left->parent = p->parent; /* p->left can never be NULL.*/ + + p->left = p->right = p->parent = NULL; + return; + } + + /* both left & right exist, find p's predecessor at first*/ + q = p->left; + while (q->right) + q = q->right; + remove_tree_node(q); /* remove from the tree*/ + + *slot = q; + q->parent = p->parent; + q->left = p->left; + q->right = p->right; + if (q->left) + q->left->parent = q; + if (q->right) + q->right->parent = q; + + p->left = p->right = p->parent = NULL; +} + +static void unlink_hmu(gc_heap_t *heap, hmu_t *hmu) +{ + gc_size_t size; + + bh_assert(gci_is_heap_valid(heap)); + bh_assert( + hmu && (gc_uint8*) hmu >= heap->base_addr + && (gc_uint8*) hmu < heap->base_addr + heap->current_size); + bh_assert(hmu_get_ut(hmu) == HMU_FC); + + size = hmu_get_size(hmu); + + if (HMU_IS_FC_NORMAL(size)) { + int node_idx = size >> 3; + hmu_normal_node_t* node = heap->kfc_normal_list[node_idx].next; + hmu_normal_node_t** p = &(heap->kfc_normal_list[node_idx].next); + while (node) { + if ((hmu_t*) node == hmu) { + *p = node->next; + break; + } + p = &(node->next); + node = node->next; + } + + if (!node) { + printf("[GC_ERROR]couldn't find the node in the normal list"); + } + } else { + remove_tree_node((hmu_tree_node_t *) hmu); + } +} + +static void hmu_set_free_size(hmu_t *hmu) +{ + gc_size_t size; + bh_assert(hmu && hmu_get_ut(hmu) == HMU_FC); + + size = hmu_get_size(hmu); + *((int*) ((char*) hmu + size) - 1) = size; +} + +/* Add free chunk back to KFC*/ + +/* @heap should not be NULL and it should be a valid heap*/ +/* @hmu should not be NULL and it should be a HMU of length @size inside @heap*/ +/* @hmu should be aligned to 8*/ +/* @size should be positive and multiple of 8*/ + +/* @hmu with size @size will be added into KFC as a new FC.*/ +void gci_add_fc(gc_heap_t *heap, hmu_t *hmu, gc_size_t size) +{ + hmu_normal_node_t *np = NULL; + hmu_tree_node_t *root = NULL, *tp = NULL, *node = NULL; + int node_idx; + + bh_assert(gci_is_heap_valid(heap)); + bh_assert( + hmu && (gc_uint8*) hmu >= heap->base_addr + && (gc_uint8*) hmu < heap->base_addr + heap->current_size); + bh_assert(((gc_uint32) hmu_to_obj(hmu) & 7) == 0); + bh_assert( + size > 0 + && ((gc_uint8*) hmu) + size + <= heap->base_addr + heap->current_size); + bh_assert(!(size & 7)); + + hmu_set_ut(hmu, HMU_FC); + hmu_set_size(hmu, size); + hmu_set_free_size(hmu); + + if (HMU_IS_FC_NORMAL(size)) { + np = (hmu_normal_node_t*) hmu; + + node_idx = size >> 3; + np->next = heap->kfc_normal_list[node_idx].next; + heap->kfc_normal_list[node_idx].next = np; + return; + } + + /* big block*/ + node = (hmu_tree_node_t*) hmu; + node->size = size; + node->left = node->right = node->parent = NULL; + + /* find proper node to link this new node to*/ + root = &heap->kfc_tree_root; + tp = root; + bh_assert(tp->size < size); + while (1) { + if (tp->size < size) { + if (!tp->right) { + tp->right = node; + node->parent = tp; + break; + } + tp = tp->right; + } else /* tp->size >= size*/ + { + if (!tp->left) { + tp->left = node; + node->parent = tp; + break; + } + tp = tp->left; + } + } +} + +/* Find a proper hmu for required memory size*/ + +/* @heap should not be NULL and it should be a valid heap*/ +/* @size should cover the header and it should be 8 bytes aligned*/ + +/* GC will not be performed here.*/ +/* Heap extension will not be performed here.*/ + +/* A proper HMU will be returned. This HMU can include the header and given size. The returned HMU will be aligned to 8 bytes.*/ +/* NULL will be returned if there are no proper HMU.*/ +BH_STATIC hmu_t *alloc_hmu(gc_heap_t *heap, gc_size_t size) +{ + hmu_normal_node_t *node = NULL, *p = NULL; + int node_idx = 0, init_node_idx = 0; + hmu_tree_node_t *root = NULL, *tp = NULL, *last_tp = NULL; + hmu_t *next, *rest; + + bh_assert(gci_is_heap_valid(heap)); + bh_assert(size > 0 && !(size & 7)); + + if (size < GC_SMALLEST_SIZE) + size = GC_SMALLEST_SIZE; + + /* check normal list at first*/ + if (HMU_IS_FC_NORMAL(size)) { + /* find a non-empty slot in normal_node_list with good size*/ + init_node_idx = (int) (size >> 3); + for (node_idx = init_node_idx; node_idx < HMU_NORMAL_NODE_CNT; + node_idx++) { + node = heap->kfc_normal_list + node_idx; + if (node->next) + break; + node = NULL; + } + + /* not found in normal list*/ + if (node) { + bh_assert(node_idx >= init_node_idx); + + p = node->next; + node->next = p->next; + bh_assert(((gc_int32) hmu_to_obj(p) & 7) == 0); + + if ((gc_size_t) node_idx + != init_node_idx&& ((gc_size_t)node_idx << 3) >= size + GC_SMALLEST_SIZE) { /* with bigger size*/ + rest = (hmu_t*) (((char *) p) + size); + gci_add_fc(heap, rest, (node_idx << 3) - size); + hmu_mark_pinuse(rest); + } else { + size = node_idx << 3; + next = (hmu_t*) ((char*) p + size); + if (hmu_is_in_heap(heap, next)) + hmu_mark_pinuse(next); + } + +#if GC_STAT_DATA != 0 + heap->total_free_size -= size; + if ((heap->current_size - heap->total_free_size) + > heap->highmark_size) + heap->highmark_size = heap->current_size + - heap->total_free_size; +#endif + + hmu_set_size((hmu_t* ) p, size); + return (hmu_t*) p; + } + } + + /* need to find a node in tree*/ + root = &heap->kfc_tree_root; + + /* find the best node*/ + bh_assert(root); + tp = root->right; + while (tp) { + if (tp->size < size) { + tp = tp->right; + continue; + } + + /* record the last node with size equal to or bigger than given size*/ + last_tp = tp; + tp = tp->left; + } + + if (last_tp) { + bh_assert(last_tp->size >= size); + + /* alloc in last_p*/ + + /* remove node last_p from tree*/ + remove_tree_node(last_tp); + + if (last_tp->size >= size + GC_SMALLEST_SIZE) { + rest = (hmu_t*) ((char*) last_tp + size); + gci_add_fc(heap, rest, last_tp->size - size); + hmu_mark_pinuse(rest); + } else { + size = last_tp->size; + next = (hmu_t*) ((char*) last_tp + size); + if (hmu_is_in_heap(heap, next)) + hmu_mark_pinuse(next); + } + +#if GC_STAT_DATA != 0 + heap->total_free_size -= size; + if ((heap->current_size - heap->total_free_size) > heap->highmark_size) + heap->highmark_size = heap->current_size - heap->total_free_size; +#endif + hmu_set_size((hmu_t* ) last_tp, size); + return (hmu_t*) last_tp; + } + + return NULL; +} + +/* Find a proper HMU for given size*/ + +/* @heap should not be NULL and it should be a valid heap*/ +/* @size should cover the header and it should be 8 bytes aligned*/ + +/* This function will try several ways to satisfy the allocation request.*/ +/* 1. Find a proper on available HMUs.*/ +/* 2. GC will be triggered if 1 failed.*/ +/* 3. Find a proper on available HMUS.*/ +/* 4. Return NULL if 3 failed*/ + +/* A proper HMU will be returned. This HMU can include the header and given size. The returned HMU will be aligned to 8 bytes.*/ +/* NULL will be returned if there are no proper HMU.*/ +BH_STATIC hmu_t* alloc_hmu_ex(gc_heap_t *heap, gc_size_t size) +{ + hmu_t *ret = NULL; + + bh_assert(gci_is_heap_valid(heap)); + bh_assert(size > 0 && !(size & 7)); + +#ifdef GC_IN_EVERY_ALLOCATION + gci_gc_heap(heap); + ret = alloc_hmu(heap, size); +#else + +# if GC_STAT_DATA != 0 + if (heap->gc_threshold < heap->total_free_size) + ret = alloc_hmu(heap, size); +# else + ret = alloc_hmu(heap, size); +# endif + + if (ret) + return ret; + + /*gci_gc_heap(heap);*//* disable gc claim currently */ + ret = alloc_hmu(heap, size); +#endif + return ret; +} + +unsigned long g_total_malloc = 0; +unsigned long g_total_free = 0; + +gc_object_t _gc_alloc_vo_i_heap(void *vheap, + gc_size_t size ALLOC_EXTRA_PARAMETERS) +{ + gc_heap_t* heap = (gc_heap_t*) vheap; + hmu_t *hmu = NULL; + gc_object_t ret = (gc_object_t) NULL; + gc_size_t tot_size = 0; + + /* align size*/ + tot_size = GC_ALIGN_8(size + HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE); /* hmu header, prefix, suffix*/ + if (tot_size < size) + return NULL; + + gct_vm_mutex_lock(&heap->lock); + + hmu = alloc_hmu_ex(heap, tot_size); + if (!hmu) + goto FINISH; + + g_total_malloc += tot_size; + + hmu_set_ut(hmu, HMU_VO); + hmu_unfree_vo(hmu); + +#if defined(GC_VERIFY) + hmu_init_prefix_and_suffix(hmu, tot_size, file_name, line_number); +#endif + + ret = hmu_to_obj(hmu); + +#if BH_ENABLE_MEMORY_PROFILING != 0 + printf("HEAP.ALLOC: heap: %p, size: %u", heap, size); +#endif + + FINISH: + gct_vm_mutex_unlock(&heap->lock); + + return ret; +} + +/* see ems_gc.h for description*/ +gc_object_t _gc_alloc_jo_i_heap(void *vheap, + gc_size_t size ALLOC_EXTRA_PARAMETERS) +{ + gc_heap_t* heap = (gc_heap_t*) vheap; + gc_object_t ret = (gc_object_t) NULL; + hmu_t *hmu = NULL; + gc_size_t tot_size = 0; + + bh_assert(gci_is_heap_valid(heap)); + + /* align size*/ + tot_size = GC_ALIGN_8(size + HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE); /* hmu header, prefix, suffix*/ + if (tot_size < size) + return NULL; + + hmu = alloc_hmu_ex(heap, tot_size); + if (!hmu) + goto FINISH; + + /* reset all fields*/ + memset((char*) hmu + sizeof(*hmu), 0, tot_size - sizeof(*hmu)); + + /* hmu->header = 0; */ + hmu_set_ut(hmu, HMU_JO); + hmu_unmark_jo(hmu); + +#if defined(GC_VERIFY) + hmu_init_prefix_and_suffix(hmu, tot_size, file_name, line_number); +#endif + ret = hmu_to_obj(hmu); + +#if BH_ENABLE_MEMORY_PROFILING != 0 + printf("HEAP.ALLOC: heap: %p, size: %u", heap, size); +#endif + + FINISH: + + return ret; +} + +/* Do some checking to see if given pointer is a possible valid heap*/ + +/* Return GC_TRUE if all checking passed*/ +/* Return GC_FALSE otherwise*/ +int gci_is_heap_valid(gc_heap_t *heap) +{ + if (!heap) + return GC_FALSE; + if (heap->heap_id != (gc_handle_t) heap) + return GC_FALSE; + + return GC_TRUE; +} + +int gc_free_i_heap(void *vheap, gc_object_t obj ALLOC_EXTRA_PARAMETERS) +{ + gc_heap_t* heap = (gc_heap_t*) vheap; + hmu_t *hmu = NULL; + hmu_t *prev = NULL; + hmu_t *next = NULL; + gc_size_t size = 0; + hmu_type_t ut; + int ret = GC_SUCCESS; + + if (!obj) { + return GC_SUCCESS; + } + + hmu = obj_to_hmu(obj); + + gct_vm_mutex_lock(&heap->lock); + + if ((gc_uint8 *) hmu >= heap->base_addr + && (gc_uint8 *) hmu < heap->base_addr + heap->current_size) { +#ifdef GC_VERIFY + hmu_verify(hmu); +#endif + ut = hmu_get_ut(hmu); + if (ut == HMU_VO) { + if (hmu_is_vo_freed(hmu)) { + bh_assert(0); + ret = GC_ERROR; + goto out; + } + + size = hmu_get_size(hmu); + + g_total_free += size; + +#if GC_STAT_DATA != 0 + heap->total_free_size += size; +#endif +#if BH_ENABLE_MEMORY_PROFILING != 0 + printf("HEAP.FREE, heap: %p, size: %u\n",heap, size); +#endif + + if (!hmu_get_pinuse(hmu)) { + prev = (hmu_t*) ((char*) hmu - *((int*) hmu - 1)); + + if (hmu_is_in_heap(heap, prev) && hmu_get_ut(prev) == HMU_FC) { + size += hmu_get_size(prev); + hmu = prev; + unlink_hmu(heap, prev); + } + } + + next = (hmu_t*) ((char*) hmu + size); + if (hmu_is_in_heap(heap, next)) { + if (hmu_get_ut(next) == HMU_FC) { + size += hmu_get_size(next); + unlink_hmu(heap, next); + next = (hmu_t*) ((char*) hmu + size); + } + } + + gci_add_fc(heap, hmu, size); + + if (hmu_is_in_heap(heap, next)) { + hmu_unmark_pinuse(next); + } + + } else { + ret = GC_ERROR; + goto out; + } + ret = GC_SUCCESS; + goto out; + } + + out: + gct_vm_mutex_unlock(&heap->lock); + return ret; +} + +void gc_dump_heap_stats(gc_heap_t *heap) +{ + printf("heap: %p, heap start: %p\n", heap, heap->base_addr); + printf( + "total malloc: totalfree: %u, current: %u, highmark: %u, gc cnt: %u\n", + heap->total_free_size, heap->current_size, heap->highmark_size, + heap->total_gc_count); + printf("g_total_malloc=%lu, g_total_free=%lu, occupied=%lu\n", + g_total_malloc, g_total_free, g_total_malloc - g_total_free); +} + +#ifdef GC_TEST + +void gci_dump(char* buf, gc_heap_t *heap) +{ + hmu_t *cur = NULL, *end = NULL; + hmu_type_t ut; + gc_size_t size; + int i = 0; + int p; + char inuse; + int mark; + + cur = (hmu_t*)heap->base_addr; + end = (hmu_t*)((char*)heap->base_addr + heap->current_size); + + while(cur < end) + { + ut = hmu_get_ut(cur); + size = hmu_get_size(cur); + p = hmu_get_pinuse(cur); + mark = hmu_is_jo_marked (cur); + + if(ut == HMU_VO) + inuse = 'V'; + else if(ut == HMU_JO) + inuse = hmu_is_jo_marked(cur) ? 'J' : 'j'; + else if(ut == HMU_FC) + inuse = 'F'; + + bh_assert(size > 0); + + buf += sprintf(buf, "#%d %08x %x %x %d %c %d\n", i, (char*) cur - (char*) heap->base_addr, ut, p, mark, inuse, hmu_obj_size(size)); + + cur = (hmu_t*)((char *)cur + size); + i++; + } + + bh_assert(cur == end); +} + +#endif diff --git a/core/shared-lib/mem-alloc/ems/ems_gc.h b/core/shared-lib/mem-alloc/ems/ems_gc.h new file mode 100644 index 000000000..d18fb2abf --- /dev/null +++ b/core/shared-lib/mem-alloc/ems/ems_gc.h @@ -0,0 +1,341 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file ems_gc.h + * @date Wed Aug 3 10:46:38 2011 + * + * @brief This file defines GC modules types and interfaces. + * + * + */ + +#ifndef _EMS_GC_H +#define _EMS_GC_H + +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/*Pre-compile configuration can be done here or on Makefiles*/ +/*#define GC_EMBEDDED or GC_STANDALONE*/ +/*#define GC_DEBUG*/ +/*#define GC_TEST // TEST mode is a sub-mode of STANDALONE*/ +/* #define GC_ALLOC_TRACE */ +/* #define GC_STAT */ +#ifndef GC_STAT_DATA +#define GC_STAT_DATA 1 +#endif + +#define GC_HEAD_PADDING 4 + +/* Standalone GC is used for testing.*/ +#ifndef GC_EMBEDDED +# ifndef GC_STANDALONE +# define GC_STANDALONE +# endif +#endif + +#if defined(GC_EMBEDDED) && defined(GC_STANDALONE) +# error "Can not define GC_EMBEDDED and GC_STANDALONE at the same time" +#endif + +#ifdef BH_TEST +# ifndef GC_TEST +# define GC_TEST +# endif +#endif + +#ifdef BH_DEBUG +/*instrument mode ignore GC_DEBUG feature, for instrument testing gc_alloc_vo_i_heap only has func_name parameter*/ +#if !defined INSTRUMENT_TEST_ENABLED && !defined GC_DEBUG +# define GC_DEBUG +#endif +#endif + +#if defined(GC_EMBEDDED) && defined(GC_TEST) +# error "Can not defined GC_EMBEDDED and GC_TEST at the same time" +#endif + +typedef void *gc_handle_t; +typedef void *gc_object_t; + +#define NULL_REF ((gc_object_t)NULL) + +#define GC_SUCCESS (0) +#define GC_ERROR (-1) + +#define GC_TRUE (1) +#define GC_FALSE (0) + +#define GC_MAX_HEAP_SIZE (256 * BH_KB) + +typedef int64 gc_int64; + +typedef unsigned int gc_uint32; +typedef signed int gc_int32; +typedef unsigned short gc_uint16; +typedef signed short gc_int16; +typedef unsigned char gc_uint8; +typedef signed char gc_int8; +typedef gc_uint32 gc_size_t; + +typedef enum { + MMT_SHARED = 0, + MMT_INSTANCE = 1, + MMT_APPMANAGER = MMT_SHARED, + MMT_VERIFIER = MMT_SHARED, + MMT_JHI = MMT_SHARED, + MMT_LOADER = MMT_SHARED, + MMT_APPLET = MMT_INSTANCE, + MMT_INTERPRETER = MMT_INSTANCE +} gc_mm_t; + +#ifdef GC_STAT +#define GC_HEAP_STAT_SIZE (128 / 4) + +typedef struct { + int usage; + int usage_block; + int vo_usage; + int jo_usage; + int free; + int free_block; + int vo_free; + int jo_free; + int usage_sizes[GC_HEAP_STAT_SIZE]; + int free_sizes[GC_HEAP_STAT_SIZE]; +}gc_stat_t; + +extern void gc_heap_stat(void* heap, gc_stat_t* gc_stat); +extern void __gc_print_stat(void *heap, int verbose); + +#define gc_print_stat __gc_print_stat + +#else + +#define gc_print_stat(heap, verbose) + +#endif + +#if GC_STAT_DATA != 0 + +typedef enum { + GC_STAT_TOTAL = 0, + GC_STAT_FREE, + GC_STAT_HIGHMARK, + GC_STAT_COUNT, + GC_STAT_TIME, + GC_STAT_MAX_1, + GC_STAT_MAX_2, + GC_STAT_MAX_3, + GC_STAT_MAX +} GC_STAT_INDEX; + +#endif + +/*////////////// Exported APIs*/ + +/** + * GC initialization from a buffer + * + * @param buf the buffer to be initialized to a heap + * @param buf_size the size of buffer + * + * @return gc handle if success, NULL otherwise + */ +extern gc_handle_t gc_init_with_pool(char *buf, gc_size_t buf_size); + +/** + * Destroy heap which is initilized from a buffer + * + * @param handle handle to heap needed destory + * + * @return GC_SUCCESS if success + * GC_ERROR for bad parameters or failed system resource freeing. + */ +extern int gc_destroy_with_pool(gc_handle_t handle); + +#if GC_STAT_DATA != 0 + +/** + * Get Heap Stats + * + * @param stats [out] integer array to save heap stats + * @param size [in] the size of stats + * @param mmt [in] type of heap, MMT_SHARED or MMT_INSTANCE + */ +extern void* gc_heap_stats(void *heap, int* stats, int size, gc_mm_t mmt); + +/** + * Set GC threshold factor + * + * @param heap [in] the heap to set + * @param factor [in] the threshold size is free_size * factor / 1000 + * + * @return GC_SUCCESS if success. + */ +extern int gc_set_threshold_factor(void *heap, unsigned int factor); + +#endif + +/*////// Allocate heap object*/ + +/* There are two versions of allocate functions. The functions with _i suffix should be only used*/ +/* internally. Functions without _i suffix are just wrappers with the corresponded functions with*/ +/* _i suffix. Allocation operation code position are record under DEBUG model for debugging.*/ +#ifdef GC_DEBUG +# define ALLOC_EXTRA_PARAMETERS ,const char*file_name,int line_number +# define ALLOC_EXTRA_ARGUMENTS , __FILE__, __LINE__ +# define ALLOC_PASSDOWN_EXTRA_ARGUMENTS , file_name, line_number +# define gc_alloc_vo_h(heap, size) gc_alloc_vo_i_heap(heap, size, __FILE__, __LINE__) +# define gc_free_h(heap, obj) gc_free_i_heap(heap, obj, __FILE__, __LINE__) +#else +# define ALLOC_EXTRA_PARAMETERS +# define ALLOC_EXTRA_ARGUMENTS +# define ALLOC_PASSDOWN_EXTRA_ARGUMENTS +# define gc_alloc_vo_h gc_alloc_vo_i_heap +# define gc_free_h gc_free_i_heap +#endif + +/** + * Invoke a GC + * + * @param heap + * + * @return GC_SUCCESS if success + */ +extern int gci_gc_heap(void *heap); + +/** + * Allocate VM Object in specific heap. + * + * @param heap heap to allocate. + * @param size bytes to allocate. + * + * @return pointer to VM object allocated + * NULL if failed. + */ +extern gc_object_t _gc_alloc_vo_i_heap(void *heap, + gc_size_t size ALLOC_EXTRA_PARAMETERS); +extern gc_object_t _gc_alloc_jo_i_heap(void *heap, + gc_size_t size ALLOC_EXTRA_PARAMETERS); +#ifdef INSTRUMENT_TEST_ENABLED +extern gc_object_t gc_alloc_vo_i_heap_instr(void *heap, gc_size_t size, const char* func_name ); +extern gc_object_t gc_alloc_jo_i_heap_instr(void *heap, gc_size_t size, const char* func_name); +# define gc_alloc_vo_i_heap(heap, size) gc_alloc_vo_i_heap_instr(heap, size, __FUNCTION__) +# define gc_alloc_jo_i_heap(heap, size) gc_alloc_jo_i_heap_instr(heap, size, __FUNCTION__) +#else +# define gc_alloc_vo_i_heap _gc_alloc_vo_i_heap +# define gc_alloc_jo_i_heap _gc_alloc_jo_i_heap +#endif + +/** + * Allocate Java object in specific heap. + * + * @param heap heap to allocate. + * @param size bytes to allocate. + * + * @return pointer to Java object allocated + * NULL if failed. + */ +extern gc_object_t _gc_alloc_jo_i_heap(void *heap, + gc_size_t size ALLOC_EXTRA_PARAMETERS); + +/** + * Free VM object + * + * @param heap heap to free. + * @param obj pointer to object need free. + * + * @return GC_SUCCESS if success + */ +extern int gc_free_i_heap(void *heap, gc_object_t obj ALLOC_EXTRA_PARAMETERS); + +/** + * Add ref to rootset of gc for current instance. + * + * @param obj pointer to real load of a valid Java object managed by gc for current instance. + * + * @return GC_SUCCESS if success. + * GC_ERROR for invalid parameters. + */ +extern int gc_add_root(void* heap, gc_object_t obj); + +/*////////////// Imported APIs which should be implemented in other components*/ + +/*////// Java object layout related APIs*/ + +/** + * Get Java object size from corresponding VM module + * + * @param obj pointer to the real load of a Java object. + * + * @return size of java object. + */ +extern gc_size_t vm_get_java_object_size(gc_object_t obj); + +/** + * Get reference list of this object + * + * @param obj [in] pointer to java object. + * @param is_compact_mode [in] indicate the java object mode. GC_TRUE or GC_FALSE. + * @param ref_num [out] the size of ref_list. + * @param ref_list [out] if is_compact_mode is GC_FALSE, this parameter will be set to a list of offset. + * @param ref_start_offset [out] If is_compact_mode is GC_TRUE, this parameter will be set to the start offset of the references in this object. + * + * @return GC_SUCCESS if success. + * GC_ERROR when error occurs. + */ +extern int vm_get_java_object_ref_list(gc_object_t obj, int *is_compact_mode, + gc_size_t *ref_num, gc_uint16 **ref_list, gc_uint32 *ref_start_offset); + +/** + * Get gc handle for current instance + * + * + * @return instance heap handle. + */ +extern gc_handle_t app_manager_get_cur_applet_heap(void); + +/** + * Begin current instance heap rootset enumeration + * + * + * @return GC_SUCCESS if success. + * GC_ERROR when error occurs. + */ +extern int vm_begin_rootset_enumeration(void *heap); + +#ifdef _INSTRUMENT_TEST_ENABLED +extern int vm_begin_rootset_enumeration_instr(void *heap, const char*func_name); +#define vm_begin_rootset_enumeration(heap) vm_begin_rootset_enumeration_instr(heap, __FUNCTION__) +#else +#define vm_begin_rootset_enumeration _vm_begin_rootset_enumeration +#endif /* INSTUMENT_TEST_ENABLED*/ + +#ifndef offsetof +#define offsetof(Type, field) ((size_t)(&((Type *)0)->field)) +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/core/shared-lib/mem-alloc/ems/ems_gc_internal.h b/core/shared-lib/mem-alloc/ems/ems_gc_internal.h new file mode 100644 index 000000000..42eff8ac0 --- /dev/null +++ b/core/shared-lib/mem-alloc/ems/ems_gc_internal.h @@ -0,0 +1,282 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _EMS_GC_INTERNAL_H +#define _EMS_GC_INTERNAL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "bh_thread.h" +#include "bh_memory.h" +#include "bh_assert.h" +#include "ems_gc.h" + +/* basic block managed by EMS gc is the so-called HMU (heap memory unit)*/ +typedef enum _hmu_type_enum +{ + HMU_TYPE_MIN = 0, + HMU_TYPE_MAX = 3, + HMU_JO = 3, + HMU_VO = 2, + HMU_FC = 1, + HMU_FM = 0 +}hmu_type_t; + +typedef struct _hmu_struct +{ + gc_uint32 header; +}hmu_t; + +#if defined(GC_VERIFY) + +#define GC_OBJECT_PREFIX_PADDING_CNT 3 +#define GC_OBJECT_SUFFIX_PADDING_CNT 4 +#define GC_OBJECT_PADDING_VALUE (0x12345678) + +typedef struct _gc_object_prefix +{ + const char *file_name; + gc_int32 line_no; + gc_int32 size; + gc_uint32 padding[GC_OBJECT_PREFIX_PADDING_CNT]; +}gc_object_prefix_t; + +#define OBJ_PREFIX_SIZE (sizeof(gc_object_prefix_t)) + +typedef struct _gc_object_suffix +{ + gc_uint32 padding[GC_OBJECT_SUFFIX_PADDING_CNT]; +}gc_object_suffix_t; + +#define OBJ_SUFFIX_SIZE (sizeof(gc_object_suffix_t)) + +extern void hmu_init_prefix_and_suffix(hmu_t *hmu, gc_size_t tot_size, const char *file_name, int line_no); +extern void hmu_verify(hmu_t *hmu); + +#define SKIP_OBJ_PREFIX(p) ((void*)((gc_uint8*)(p) + OBJ_PREFIX_SIZE)) +#define SKIP_OBJ_SUFFIX(p) ((void*)((gc_uint8*)(p) + OBJ_SUFFIX_SIZE)) + +#define OBJ_EXTRA_SIZE (HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE) + +#else + +#define OBJ_PREFIX_SIZE 0 +#define OBJ_SUFFIX_SIZE 0 + +#define SKIP_OBJ_PREFIX(p) ((void*)((gc_uint8*)(p) + OBJ_PREFIX_SIZE)) +#define SKIP_OBJ_SUFFIX(p) ((void*)((gc_uint8*)(p) + OBJ_SUFFIX_SIZE)) + +#define OBJ_EXTRA_SIZE (HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE) + +#endif /* GC_DEBUG*/ + +#define hmu_obj_size(s) ((s)-OBJ_EXTRA_SIZE) + +#define GC_ALIGN_8(s) (((int)(s) + 7) & ~7) + +#define GC_SMALLEST_SIZE GC_ALIGN_8(HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE + 8) +#define GC_GET_REAL_SIZE(x) GC_ALIGN_8(HMU_SIZE + OBJ_PREFIX_SIZE + OBJ_SUFFIX_SIZE + (((x) > 8) ? (x): 8)) + +/*////// functions for bit operation*/ + +#define SETBIT(v, offset) (v) |= (1 << (offset)) +#define GETBIT(v, offset) ((v) & (1 << (offset)) ? 1 : 0) +#define CLRBIT(v, offset) (v) &= ~(1 << (offset)) + +#define SETBITS(v, offset, size, value) do { \ + (v) &= ~(((1 << size) - 1) << offset); \ + (v) |= value << offset; \ + } while(0) +#define CLRBITS(v, offset, size) (v) &= ~(((1 << size) - 1) << offset) +#define GETBITS(v, offset, size) (((v) & (((1 << size) - 1) << offset)) >> offset) + +/*////// gc object layout definition*/ + +#define HMU_SIZE (sizeof(hmu_t)) + +#define hmu_to_obj(hmu) (gc_object_t)(SKIP_OBJ_PREFIX((hmu_t*) (hmu) + 1)) +#define obj_to_hmu(obj) ((hmu_t *)((gc_uint8*)(obj) - OBJ_PREFIX_SIZE) - 1) + +#define HMU_UT_SIZE 2 +#define HMU_UT_OFFSET 30 + +#define hmu_get_ut(hmu) GETBITS ((hmu)->header, HMU_UT_OFFSET, HMU_UT_SIZE) +#define hmu_set_ut(hmu, type) SETBITS ((hmu)->header, HMU_UT_OFFSET, HMU_UT_SIZE, type) +#define hmu_is_ut_valid(tp) (tp >= HMU_TYPE_MIN && tp <= HMU_TYPE_MAX) + +/* P in use bit means the previous chunk is in use */ +#define HMU_P_OFFSET 29 + +#define hmu_mark_pinuse(hmu) SETBIT ((hmu)->header, HMU_P_OFFSET) +#define hmu_unmark_pinuse(hmu) CLRBIT ((hmu)->header, HMU_P_OFFSET) +#define hmu_get_pinuse(hmu) GETBIT ((hmu)->header, HMU_P_OFFSET) + +#define HMU_JO_VT_SIZE 27 +#define HMU_JO_VT_OFFSET 0 +#define HMU_JO_MB_OFFSET 28 + +#define hmu_mark_jo(hmu) SETBIT ((hmu)->header, HMU_JO_MB_OFFSET) +#define hmu_unmark_jo(hmu) CLRBIT ((hmu)->header, HMU_JO_MB_OFFSET) +#define hmu_is_jo_marked(hmu) GETBIT ((hmu)->header, HMU_JO_MB_OFFSET) + +#define HMU_SIZE_SIZE 27 +#define HMU_SIZE_OFFSET 0 + +#define HMU_VO_FB_OFFSET 28 + +#define hmu_is_vo_freed(hmu) GETBIT ((hmu)->header, HMU_VO_FB_OFFSET) +#define hmu_unfree_vo(hmu) CLRBIT ((hmu)->header, HMU_VO_FB_OFFSET) + +#define hmu_get_size(hmu) GETBITS ((hmu)->header, HMU_SIZE_OFFSET, HMU_SIZE_SIZE) +#define hmu_set_size(hmu, size) SETBITS ((hmu)->header, HMU_SIZE_OFFSET, HMU_SIZE_SIZE, size) + +/*////// HMU free chunk management*/ + +#define HMU_NORMAL_NODE_CNT 32 +#define HMU_FC_NORMAL_MAX_SIZE ((HMU_NORMAL_NODE_CNT - 1) << 3) +#define HMU_IS_FC_NORMAL(size) ((size) < HMU_FC_NORMAL_MAX_SIZE) +#if HMU_FC_NORMAL_MAX_SIZE >= GC_MAX_HEAP_SIZE +# error "Too small GC_MAX_HEAP_SIZE" +#endif + +typedef struct _hmu_normal_node +{ + hmu_t hmu_header; + struct _hmu_normal_node *next; +}hmu_normal_node_t; + +typedef struct _hmu_tree_node +{ + hmu_t hmu_header; + gc_size_t size; + struct _hmu_tree_node *left; + struct _hmu_tree_node *right; + struct _hmu_tree_node *parent; +}hmu_tree_node_t; + +typedef struct _gc_heap_struct +{ + gc_handle_t heap_id; /* for double checking*/ + + gc_uint8 *base_addr; + gc_size_t current_size; + gc_size_t max_size; + + korp_mutex lock; + + hmu_normal_node_t kfc_normal_list[HMU_NORMAL_NODE_CNT]; + + /* order in kfc_tree is: size[left] <= size[cur] < size[right]*/ + hmu_tree_node_t kfc_tree_root; + + /* for rootset enumeration of private heap*/ + void *root_set; + + /* whether the fast mode of marking process that requires + additional memory fails. When the fast mode fails, the + marking process can still be done in the slow mode, which + doesn't need additional memory (by walking through all + blocks and marking sucessors of marked nodes until no new + node is marked). TODO: slow mode is not implemented. */ + unsigned is_fast_marking_failed : 1; + +#if GC_STAT_DATA != 0 + gc_size_t highmark_size; + gc_size_t init_size; + gc_size_t total_gc_count; + gc_size_t total_free_size; + gc_size_t gc_threshold; + gc_size_t gc_threshold_factor; + gc_int64 total_gc_time; +#endif +}gc_heap_t; + +/*////// MISC internal used APIs*/ + +extern void gci_add_fc(gc_heap_t *heap, hmu_t *hmu, gc_size_t size); +extern int gci_is_heap_valid(gc_heap_t *heap); + +#ifdef GC_DEBUG +extern void gci_verify_heap(gc_heap_t *heap); +extern void gci_dump(char* buf, gc_heap_t *heap); +#endif + +#if GC_STAT_DATA != 0 + +/* the default GC threshold size is free_size * GC_DEFAULT_THRESHOLD_FACTOR / 1000 */ +#define GC_DEFAULT_THRESHOLD_FACTOR 400 + +static inline void gc_update_threshold(gc_heap_t *heap) +{ + heap->gc_threshold = heap->total_free_size * heap->gc_threshold_factor / 1000; +} +#endif + +/*////// MISC data structures*/ + +#define MARK_NODE_OBJ_CNT 256 + +/* mark node is used for gc marker*/ +typedef struct _mark_node_struct +{ + /* number of to-expand objects can be saved in this node*/ + gc_size_t cnt; + + /* the first unused index*/ + int idx; + + /* next node on the node list*/ + struct _mark_node_struct *next; + + /* the actual to-expand objects list*/ + gc_object_t set[MARK_NODE_OBJ_CNT]; +}mark_node_t; + +/*////// Imported APIs wrappers under TEST mode*/ + +#ifdef GC_TEST +extern int (*gct_vm_get_java_object_ref_list)( + gc_object_t obj, + int *is_compact_mode, /* can be set to GC_TRUE, or GC_FALSE */ + gc_size_t *ref_num, + gc_uint16 **ref_list, + gc_uint32 *ref_start_offset); +extern int (*gct_vm_mutex_init)(korp_mutex *mutex); +extern int (*gct_vm_mutex_destroy)(korp_mutex *mutex); +extern int (*gct_vm_mutex_lock)(korp_mutex *mutex); +extern int (*gct_vm_mutex_unlock)(korp_mutex *mutex); +extern gc_handle_t (*gct_vm_get_gc_handle_for_current_instance)(void); +extern int (*gct_vm_begin_rootset_enumeration)(void* heap); +extern int (*gct_vm_gc_finished)(void); +#else +#define gct_vm_get_java_object_ref_list bh_get_java_object_ref_list +#define gct_vm_mutex_init vm_mutex_init +#define gct_vm_mutex_destroy vm_mutex_destroy +#define gct_vm_mutex_lock vm_mutex_lock +#define gct_vm_mutex_unlock vm_mutex_unlock +#define gct_vm_get_gc_handle_for_current_instance app_manager_get_cur_applet_heap +#define gct_vm_begin_rootset_enumeration vm_begin_rootset_enumeration +#define gct_vm_gc_finished jeff_runtime_gc_finished +#endif + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/core/shared-lib/mem-alloc/ems/ems_hmu.c b/core/shared-lib/mem-alloc/ems/ems_hmu.c new file mode 100644 index 000000000..6b612d8fa --- /dev/null +++ b/core/shared-lib/mem-alloc/ems/ems_hmu.c @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ems_gc_internal.h" + +#if defined(GC_VERIFY) +/* Set default value to prefix and suffix*/ + +/* @hmu should not be NULL and it should have been correctly initilized (except for prefix and suffix part)*/ +/* @tot_size is offered here because hmu_get_size can not be used till now. @tot_size should not be smaller than OBJ_EXTRA_SIZE.*/ +/* For VO, @tot_size should be equal to object total size.*/ +void hmu_init_prefix_and_suffix(hmu_t *hmu, gc_size_t tot_size, const char *file_name, int line_no) +{ + gc_object_prefix_t *prefix = NULL; + gc_object_suffix_t *suffix = NULL; + gc_uint32 i = 0; + + bh_assert(hmu); + bh_assert(hmu_get_ut(hmu) == HMU_JO || hmu_get_ut(hmu) == HMU_VO); + bh_assert(tot_size >= OBJ_EXTRA_SIZE); + bh_assert(!(tot_size & 7)); + bh_assert(hmu_get_ut(hmu) != HMU_VO || hmu_get_size(hmu) >= tot_size); + + prefix = (gc_object_prefix_t *)(hmu + 1); + suffix = (gc_object_suffix_t *)((gc_uint8*)hmu + tot_size - OBJ_SUFFIX_SIZE); + prefix->file_name = file_name; + prefix->line_no = line_no; + prefix->size = tot_size; + for(i = 0;i < GC_OBJECT_PREFIX_PADDING_CNT;i++) + { + prefix->padding[i] = GC_OBJECT_PADDING_VALUE; + } + for(i = 0;i < GC_OBJECT_SUFFIX_PADDING_CNT;i++) + { + suffix->padding[i] = GC_OBJECT_PADDING_VALUE; + } +} + +void hmu_verify(hmu_t *hmu) +{ + gc_object_prefix_t *prefix = NULL; + gc_object_suffix_t *suffix = NULL; + gc_uint32 i = 0; + hmu_type_t ut; + gc_size_t size = 0; + int is_padding_ok = 1; + + bh_assert(hmu); + ut = hmu_get_ut(hmu); + bh_assert(hmu_is_ut_valid(ut)); + + prefix = (gc_object_prefix_t *)(hmu + 1); + size = prefix->size; + suffix = (gc_object_suffix_t *)((gc_uint8*)hmu + size - OBJ_SUFFIX_SIZE); + + if(ut == HMU_VO || ut == HMU_JO) + { + /* check padding*/ + for(i = 0;i < GC_OBJECT_PREFIX_PADDING_CNT;i++) + { + if(prefix->padding[i] != GC_OBJECT_PADDING_VALUE) + { + is_padding_ok = 0; + break; + } + } + for(i = 0;i < GC_OBJECT_SUFFIX_PADDING_CNT;i++) + { + if(suffix->padding[i] != GC_OBJECT_PADDING_VALUE) + { + is_padding_ok = 0; + break; + } + } + + if(!is_padding_ok) + { + printf("Invalid padding for object created at %s:%d", + (prefix->file_name ? prefix->file_name : ""), prefix->line_no); + } + bh_assert(is_padding_ok); + } +} +#endif + diff --git a/core/shared-lib/mem-alloc/ems/ems_kfc.c b/core/shared-lib/mem-alloc/ems/ems_kfc.c new file mode 100644 index 000000000..10fe090ad --- /dev/null +++ b/core/shared-lib/mem-alloc/ems/ems_kfc.c @@ -0,0 +1,196 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ems_gc_internal.h" + +#if !defined(NVALGRIND) +#include +#endif + +#define HEAP_INC_FACTOR 1 + +/* Check if current platform is compatible with current GC design*/ + +/* Return GC_ERROR if not;*/ +/* Return GC_SUCCESS otherwise.*/ +int gci_check_platform() +{ +#define CHECK(x, y) do { \ + if((x) != (y)) { \ + printf("Platform checking failed on LINE %d at FILE %s.", \ + __LINE__, __FILE__); \ + return GC_ERROR; \ + } \ +} while(0) + + CHECK(8, sizeof(gc_int64)); + CHECK(4, sizeof(gc_uint32)); + CHECK(4, sizeof(gc_int32)); + CHECK(2, sizeof(gc_uint16)); + CHECK(2, sizeof(gc_int16)); + CHECK(1, sizeof(gc_int8)); + CHECK(1, sizeof(gc_uint8)); + CHECK(4, sizeof(gc_size_t)); + CHECK(4, sizeof(void *)); + + return GC_SUCCESS; +} + +gc_handle_t gc_init_with_pool(char *buf, gc_size_t buf_size) +{ + char *buf_end = buf + buf_size; + char *buf_aligned = (char*) (((uintptr_t) buf + 7) & ~7); + char *base_addr = buf_aligned + sizeof(gc_heap_t); + gc_heap_t *heap = (gc_heap_t*) buf_aligned; + gc_size_t heap_max_size; + hmu_normal_node_t *p = NULL; + hmu_tree_node_t *root = NULL, *q = NULL; + int i = 0, ret; + + /* check system compatibility*/ + if (gci_check_platform() == GC_ERROR) { + printf("Check platform compatibility failed"); + return NULL; + } + + if (buf_size < 1024) { + printf("[GC_ERROR]heap_init_size(%d) < 1024", buf_size); + return NULL; + } + + base_addr = (char*) (((uintptr_t) base_addr + 7) & ~7) + GC_HEAD_PADDING; + heap_max_size = (buf_end - base_addr) & ~7; + + memset(heap, 0, sizeof *heap); + memset(base_addr, 0, heap_max_size); + + ret = gct_vm_mutex_init(&heap->lock); + if (ret != BHT_OK) { + printf("[GC_ERROR]failed to init lock "); + return NULL; + } + +#ifdef BH_FOOTPRINT + printf("\nINIT HEAP 0x%08x %d\n", base_addr, heap_max_size); +#endif + + /* init all data structures*/ + heap->max_size = heap_max_size; + heap->current_size = heap_max_size; + heap->base_addr = (gc_uint8*) base_addr; + heap->heap_id = (gc_handle_t) heap; + +#if GC_STAT_DATA != 0 + heap->total_free_size = heap->current_size; + heap->highmark_size = 0; + heap->total_gc_count = 0; + heap->total_gc_time = 0; + heap->gc_threshold_factor = GC_DEFAULT_THRESHOLD_FACTOR; + gc_update_threshold(heap); +#endif + + for (i = 0; i < HMU_NORMAL_NODE_CNT; i++) { + /* make normal node look like a FC*/ + p = &heap->kfc_normal_list[i]; + memset(p, 0, sizeof *p); + hmu_set_ut(&p->hmu_header, HMU_FC); + hmu_set_size(&p->hmu_header, sizeof *p); + } + + root = &heap->kfc_tree_root; + memset(root, 0, sizeof *root); + root->size = sizeof *root; + hmu_set_ut(&root->hmu_header, HMU_FC); + hmu_set_size(&root->hmu_header, sizeof *root); + + q = (hmu_tree_node_t *) heap->base_addr; + memset(q, 0, sizeof *q); + hmu_set_ut(&q->hmu_header, HMU_FC); + hmu_set_size(&q->hmu_header, heap->current_size); + + hmu_mark_pinuse(&q->hmu_header); + root->right = q; + q->parent = root; + q->size = heap->current_size; + + bh_assert( + root->size <= HMU_FC_NORMAL_MAX_SIZE + && HMU_FC_NORMAL_MAX_SIZE < q->size); /*@NOTIFY*/ + +#if BH_ENABLE_MEMORY_PROFILING != 0 + printf("heap is successfully initialized with max_size=%u.", + heap_max_size); +#endif + return heap; +} + +int gc_destroy_with_pool(gc_handle_t handle) +{ + gc_heap_t *heap = (gc_heap_t *) handle; + gct_vm_mutex_destroy(&heap->lock); + memset(heap->base_addr, 0, heap->max_size); + memset(heap, 0, sizeof(gc_heap_t)); + return GC_SUCCESS; +} + +#if defined(GC_VERIFY) +/* Verify heap integrity*/ +/* @heap should not be NULL and it should be a valid heap*/ +void gci_verify_heap(gc_heap_t *heap) +{ + hmu_t *cur = NULL, *end = NULL; + + bh_assert(heap && gci_is_heap_valid(heap)); + cur = (hmu_t *)heap->base_addr; + end = (hmu_t *)(heap->base_addr + heap->current_size); + while(cur < end) + { + hmu_verify(cur); + cur = (hmu_t *)((gc_uint8*)cur + hmu_get_size(cur)); + } + bh_assert(cur == end); +} +#endif + +void* gc_heap_stats(void *heap_arg, int* stats, int size, gc_mm_t mmt) +{ + (void) mmt; + int i; + gc_heap_t *heap = (gc_heap_t *) heap_arg; + + for (i = 0; i < size; i++) { + switch (i) { + case GC_STAT_TOTAL: + stats[i] = heap->current_size; + break; + case GC_STAT_FREE: + stats[i] = heap->total_free_size; + break; + case GC_STAT_HIGHMARK: + stats[i] = heap->highmark_size; + break; + case GC_STAT_COUNT: + stats[i] = heap->total_gc_count; + break; + case GC_STAT_TIME: + stats[i] = (int) heap->total_gc_time; + break; + default: + break; + } + } + return heap; +} diff --git a/core/shared-lib/mem-alloc/mem_alloc.c b/core/shared-lib/mem-alloc/mem_alloc.c new file mode 100644 index 000000000..c19d669ed --- /dev/null +++ b/core/shared-lib/mem-alloc/mem_alloc.c @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "mem_alloc.h" +#include "config.h" + +#if DEFAULT_MEM_ALLOCATOR == MEM_ALLOCATOR_EMS + +#include "ems/ems_gc.h" + +mem_allocator_t mem_allocator_create(void *mem, uint32_t size) +{ + return gc_init_with_pool((char *) mem, size); +} + +void mem_allocator_destroy(mem_allocator_t allocator) +{ + gc_destroy_with_pool((gc_handle_t) allocator); +} + +void * +mem_allocator_malloc(mem_allocator_t allocator, uint32_t size) +{ + return gc_alloc_vo_h((gc_handle_t) allocator, size); +} + +void mem_allocator_free(mem_allocator_t allocator, void *ptr) +{ + if (ptr) + gc_free_h((gc_handle_t) allocator, ptr); +} + +#else /* else of DEFAULT_MEM_ALLOCATOR */ + +#include "tlsf/tlsf.h" +#include "bh_thread.h" + +typedef struct mem_allocator_tlsf { + tlsf_t tlsf; + korp_mutex lock; +}mem_allocator_tlsf; + +mem_allocator_t +mem_allocator_create(void *mem, uint32_t size) +{ + mem_allocator_tlsf *allocator_tlsf; + tlsf_t tlsf; + char *mem_aligned = (char*)(((uintptr_t)mem + 3) & ~3); + + if (size < 1024) { + printf("Create mem allocator failed: pool size must be " + "at least 1024 bytes.\n"); + return NULL; + } + + size -= mem_aligned - (char*)mem; + mem = (void*)mem_aligned; + + tlsf = tlsf_create_with_pool(mem, size); + if (!tlsf) { + printf("Create mem allocator failed: tlsf_create_with_pool failed.\n"); + return NULL; + } + + allocator_tlsf = tlsf_malloc(tlsf, sizeof(mem_allocator_tlsf)); + if (!allocator_tlsf) { + printf("Create mem allocator failed: tlsf_malloc failed.\n"); + tlsf_destroy(tlsf); + return NULL; + } + + allocator_tlsf->tlsf = tlsf; + + if (vm_mutex_init(&allocator_tlsf->lock)) { + printf("Create mem allocator failed: tlsf_malloc failed.\n"); + tlsf_free(tlsf, allocator_tlsf); + tlsf_destroy(tlsf); + return NULL; + } + + return allocator_tlsf; +} + +void +mem_allocator_destroy(mem_allocator_t allocator) +{ + mem_allocator_tlsf *allocator_tlsf = (mem_allocator_tlsf *)allocator; + tlsf_t tlsf = allocator_tlsf->tlsf; + + vm_mutex_destroy(&allocator_tlsf->lock); + tlsf_free(tlsf, allocator_tlsf); + tlsf_destroy(tlsf); +} + +void * +mem_allocator_malloc(mem_allocator_t allocator, uint32_t size) +{ + void *ret; + mem_allocator_tlsf *allocator_tlsf = (mem_allocator_tlsf *)allocator; + + if (size == 0) + /* tlsf doesn't allow to allocate 0 byte */ + size = 1; + + vm_mutex_lock(&allocator_tlsf->lock); + ret = tlsf_malloc(allocator_tlsf->tlsf, size); + vm_mutex_unlock(&allocator_tlsf->lock); + return ret; +} + +void +mem_allocator_free(mem_allocator_t allocator, void *ptr) +{ + if (ptr) { + mem_allocator_tlsf *allocator_tlsf = (mem_allocator_tlsf *)allocator; + vm_mutex_lock(&allocator_tlsf->lock); + tlsf_free(allocator_tlsf->tlsf, ptr); + vm_mutex_unlock(&allocator_tlsf->lock); + } +} + +#endif /* end of DEFAULT_MEM_ALLOCATOR */ + diff --git a/core/shared-lib/mem-alloc/mem_alloc.cmake b/core/shared-lib/mem-alloc/mem_alloc.cmake new file mode 100644 index 000000000..28372ade5 --- /dev/null +++ b/core/shared-lib/mem-alloc/mem_alloc.cmake @@ -0,0 +1,27 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +set (MEM_ALLOC_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${MEM_ALLOC_DIR}) + +file (GLOB_RECURSE source_all + ${MEM_ALLOC_DIR}/ems/*.c + ${MEM_ALLOC_DIR}/tlsf/*.c + ${MEM_ALLOC_DIR}/mem_alloc.c + ${MEM_ALLOC_DIR}/bh_memory.c) + +set (MEM_ALLOC_SHARED_SOURCE ${source_all}) + diff --git a/core/shared-lib/platform/CMakeLists.txt b/core/shared-lib/platform/CMakeLists.txt new file mode 100755 index 000000000..036ad4e5b --- /dev/null +++ b/core/shared-lib/platform/CMakeLists.txt @@ -0,0 +1,31 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_directories (./include ../include ./${PLATFORM}) + +add_definitions (-D__POSIX__ -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE) + +file (GLOB_RECURSE source_all ${PLATFORM}/*.c) +add_library (supportlib ${source_all}) + +target_link_libraries (supportlib -pthread -lrt) + +if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") + add_library (supportlib_ut ${source_all}) + + set_target_properties (supportlib_ut PROPERTIES COMPILE_DEFINITIONS BH_TEST=1) + + target_link_libraries (supportlib_ut -pthread -lrt) +endif () + diff --git a/core/shared-lib/platform/Makefile b/core/shared-lib/platform/Makefile new file mode 100644 index 000000000..6e8435d47 --- /dev/null +++ b/core/shared-lib/platform/Makefile @@ -0,0 +1,15 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +obj-y += zephyr/ diff --git a/core/shared-lib/platform/android/bh_assert.c b/core/shared-lib/platform/android/bh_assert.c new file mode 100755 index 000000000..b52a9aa5b --- /dev/null +++ b/core/shared-lib/platform/android/bh_assert.c @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include "bh_assert.h" +#include +#include +#include + +#ifdef BH_TEST +#include +#endif + +#ifdef BH_TEST +/* for exception throwing */ +jmp_buf bh_test_jb; +#endif + +void bh_assert_internal(int v, const char *file_name, int line_number, + const char *expr_string) +{ + if (v) + return; + + if (!file_name) + file_name = "NULL FILENAME"; + if (!expr_string) + expr_string = "NULL EXPR_STRING"; + + printf("\nASSERTION FAILED: %s, at FILE=%s, LINE=%d\n", expr_string, + file_name, line_number); + +#ifdef BH_TEST + longjmp(bh_test_jb, 1); +#endif + + abort(); +} + +void bh_debug_internal(const char *file_name, int line_number, const char *fmt, + ...) +{ +#ifndef JEFF_TEST_VERIFIER + va_list args; + + va_start(args, fmt); + bh_assert(file_name); + + printf("\nDebug info FILE=%s, LINE=%d: ", file_name, line_number); + vprintf(fmt, args); + + va_end(args); + printf("\n"); +#endif +} + diff --git a/core/shared-lib/platform/android/bh_definition.c b/core/shared-lib/platform/android/bh_definition.c new file mode 100755 index 000000000..47ee11ed2 --- /dev/null +++ b/core/shared-lib/platform/android/bh_definition.c @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_definition.h" +#include "bh_platform.h" + +int bh_return(int ret) +{ + return ret; +} + +#define RSIZE_MAX 0x7FFFFFFF +int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, unsigned int n) +{ + char *dest = (char*) s1; + char *src = (char*) s2; + if (n == 0) { + return 0; + } + + if (s1 == NULL || s1max > RSIZE_MAX) { + return -1; + } + if (s2 == NULL || n > s1max) { + memset(dest, 0, s1max); + return -1; + } + memcpy(dest, src, n); + return 0; +} + +int b_strcat_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s1) + strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcat(s1, s2); + + return 0; +} + +int b_strcpy_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcpy(s1, s2); + + return 0; +} + +int fopen_s(FILE ** pFile, const char *filename, const char *mode) +{ + if (NULL == pFile || NULL == filename || NULL == mode) { + return -1; + } + + *pFile = fopen(filename, mode); + + if (NULL == *pFile) + return -1; + + return 0; +} diff --git a/core/shared-lib/platform/android/bh_platform.h b/core/shared-lib/platform/android/bh_platform.h new file mode 100755 index 000000000..eff38612d --- /dev/null +++ b/core/shared-lib/platform/android/bh_platform.h @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_PLATFORM_H +#define _BH_PLATFORM_H + +#include "bh_config.h" +#include "bh_types.h" + +#include +#include +typedef uint64_t uint64; +typedef int64_t int64; + +extern void DEBUGME(void); + +#define DIE do{bh_debug("Die here\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); DEBUGME(void); while(1);}while(0) + +#define BH_PLATFORM "Linux" + +/* NEED qsort */ + +#include +#include +#include +#include +#include +#include + +#define _STACK_SIZE_ADJUSTMENT (32 * 1024) + +/* Stack size of applet manager thread. */ +#define BH_APPLET_MANAGER_THREAD_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of HMC thread. */ +#define BH_HMC_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of watchdog thread. */ +#define BH_WATCHDOG_THREAD_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of applet threads's native part. */ +#define BH_APPLET_PRESERVED_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of remote invoke listen thread. */ +#define BH_REMOTE_INVOKE_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of remote post listen thread. */ +#define BH_REMOTE_POST_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Maximal recursion depth of interpreter. */ +#define BH_MAX_INTERP_RECURSION_DEPTH 8 + +#define BH_ROUTINE_MODIFIER +#define BHT_TIMEDOUT ETIMEDOUT + +#define INVALID_THREAD_ID 0xFFffFFff +#define INVALID_SEM_ID SEM_FAILED + +typedef pthread_t korp_tid; +typedef pthread_mutex_t korp_mutex; +typedef sem_t korp_sem; +typedef pthread_cond_t korp_cond; +typedef void* (*thread_start_routine_t)(void*); + +#include +#include + +/* The following operations declared in string.h may be defined as + macros on Linux, so don't declare them as functions here. */ +/* memset */ +/* memcpy */ +/* memmove */ + +/* #include */ + +/* Unit test framework is based on C++, where the declaration of + snprintf is different. */ +#ifndef __cplusplus +int snprintf(char *buffer, size_t count, const char *format, ...); +#endif + +/* #include */ + +double fmod(double x, double y); +float fmodf(float x, float y); + +/* Definitions for applet debugging */ +#define APPLET_DEBUG_LISTEN_PORT 8000 +#define BH_SOCKET_INVALID_SOCK -1 +#define BH_WAIT_FOREVER 0xFFFFFFFF +typedef int bh_socket_t; + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +extern int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, + unsigned int n); +extern int strcat_s(char * s1, size_t s1max, const char * s2); +extern int strcpy_s(char * s1, size_t s1max, const char * s2); +#include +extern int fopen_s(FILE ** pFile, const char *filename, const char *mode); + +#endif diff --git a/core/shared-lib/platform/android/bh_platform_log.c b/core/shared-lib/platform/android/bh_platform_log.c new file mode 100755 index 000000000..4ff03192a --- /dev/null +++ b/core/shared-lib/platform/android/bh_platform_log.c @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include + +void bh_log_emit(const char *fmt, va_list ap) +{ + vprintf(fmt, ap); + fflush(stdout); +} + +int bh_fprintf(FILE *stream, const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, fmt); + ret = vfprintf(stream ? stream : stdout, fmt, ap); + va_end(ap); + + return ret; +} + +int bh_fflush(void *stream) +{ + return fflush(stream ? stream : stdout); +} diff --git a/core/shared-lib/platform/android/bh_thread.c b/core/shared-lib/platform/android/bh_thread.c new file mode 100755 index 000000000..6e4f4a573 --- /dev/null +++ b/core/shared-lib/platform/android/bh_thread.c @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_thread.h" +#include "bh_assert.h" +#include "bh_log.h" +#include "bh_memory.h" +#include +#include +#include + +static korp_mutex thread_list_lock; +static pthread_key_t thread_local_storage_key[BH_MAX_TLS_NUM]; + +int _vm_thread_sys_init() +{ + unsigned i; + + for (i = 0; i < BH_MAX_TLS_NUM; i++) + pthread_key_create(&thread_local_storage_key[i], NULL); + + return vm_mutex_init(&thread_list_lock); +} + +korp_tid _vm_self_thread() +{ + return (korp_tid) pthread_self(); +} + +void *_vm_tls_get(unsigned idx) +{ + bh_assert(idx < BH_MAX_TLS_NUM); + return pthread_getspecific(thread_local_storage_key[idx]); +} + +int _vm_tls_put(unsigned idx, void * tls) +{ + bh_assert(idx < BH_MAX_TLS_NUM); + pthread_setspecific(thread_local_storage_key[idx], tls); + return BHT_OK; +} + +int _vm_mutex_init(korp_mutex *mutex) +{ + return pthread_mutex_init(mutex, NULL) == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_recursive_mutex_init(korp_mutex *mutex) +{ + int ret; + + pthread_mutexattr_t mattr; + + bh_assert(mutex); + ret = pthread_mutexattr_init(&mattr); + if (ret) + return BHT_ERROR; + + pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE_NP); + ret = pthread_mutex_init(mutex, &mattr); + pthread_mutexattr_destroy(&mattr); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_mutex_destroy(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_destroy(mutex); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +/* Returned error (EINVAL, EAGAIN and EDEADLK) from + locking the mutex indicates some logic error present in + the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_lock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_lock(mutex); + if (0 != ret) { + LOG_FATAL("vm mutex lock failed (ret=%d)!\n", ret); + exit(-1); + } +} + +int vm_mutex_trylock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_trylock(mutex); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +/* Returned error (EINVAL, EAGAIN and EPERM) from + unlocking the mutex indicates some logic error present + in the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_unlock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_unlock(mutex); + if (0 != ret) { + LOG_FATAL("vm mutex unlock failed (ret=%d)!\n", ret); + exit(-1); + } +} + +int _vm_cond_init(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_init(cond, NULL) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_destroy(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_destroy(cond) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + diff --git a/core/shared-lib/platform/android/bh_time.c b/core/shared-lib/platform/android/bh_time.c new file mode 100755 index 000000000..6dad59620 --- /dev/null +++ b/core/shared-lib/platform/android/bh_time.c @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_time.h" + +#include +#include +//#include +#include + +/* + * This function returns milliseconds per tick. + * @return milliseconds per tick. + */ +uint64 _bh_time_get_tick_millisecond() +{ + return sysconf(_SC_CLK_TCK); +} + +/* + * This function returns milliseconds after boot. + * @return milliseconds after boot. + */ +uint64 _bh_time_get_boot_millisecond() +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { + return 0; + } + + return ((uint64) ts.tv_sec) * 1000 + ts.tv_nsec / (1000 * 1000); +} + +/* + * This function returns GMT time milliseconds since from 1970.1.1, AKA UNIX time. + * @return milliseconds since from 1970.1.1. + */ +uint64 _bh_time_get_millisecond_from_1970() +{ + struct timeval tv; + gettimeofday(&tv, NULL); + uint64 millisecondsSinceEpoch = (uint64_t)(tv.tv_sec) * 1000 + + (uint64_t)(tv.tv_usec) / 1000; + return millisecondsSinceEpoch; +} + +size_t _bh_time_strftime(char *s, size_t max, const char *format, int64 time) +{ + time_t time_sec = time / 1000; + struct tm *ltp; + + ltp = localtime(&time_sec); + if (ltp == NULL) { + return 0; + } + return strftime(s, max, format, ltp); +} + diff --git a/core/shared-lib/platform/include/bh_assert.h b/core/shared-lib/platform/include/bh_assert.h new file mode 100644 index 000000000..7e9158c5c --- /dev/null +++ b/core/shared-lib/platform/include/bh_assert.h @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_ASSERT_H +#define _BH_ASSERT_H + +#include "bh_config.h" +#include "bh_platform.h" + +#ifdef BH_TEST +# ifndef BH_DEBUG +# error "BH_TEST should be defined under BH_DEBUG" +# endif +#endif + +#ifdef BH_TEST +# if defined(WIN32) || defined(__linux__) +# else +# error "Test case can not run on the current platform" +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef BH_DEBUG + +extern void bh_assert_internal(int v, const char *file_name, int line_number, const char *expr_string); +#define bh_assert(expr) bh_assert_internal((int)(expr), __FILE__, __LINE__, # expr) +extern void bh_debug_internal(const char *file_name, int line_number, const char *fmt, ...); + +#if defined(WIN32) || defined(EMU) +# define bh_debug(fmt, ...) bh_debug_internal(__FILE__, __LINE__, fmt, __VA_ARGS__) +#elif defined(__linux__) +/*# define bh_debug(...) bh_debug_internal(__FILE__, __LINE__, ## __VA_ARGS__)*/ +# define bh_debug bh_debug_internal(__FILE__, __LINE__, "");printf +#elif defined(PLATFORM_SEC) +# define bh_debug(fmt, ...) bh_debug_internal(__FILE__, __LINE__, fmt, __VA_ARGS__) +#else +# error "Unsupported platform" +#endif + +#else + +#define bh_debug if(0)printf + +#endif + +#define bh_assert_abort(x) do { \ + if (!x) \ + abort(); \ + } while (0) + +#ifdef BH_TEST +# define BH_STATIC +#else +# define BH_STATIC static +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/* Local Variables: */ +/* mode:c */ +/* c-basic-offset: 4 */ +/* indent-tabs-mode: nil */ +/* End: */ diff --git a/core/shared-lib/platform/include/bh_config.h b/core/shared-lib/platform/include/bh_config.h new file mode 100644 index 000000000..37904311f --- /dev/null +++ b/core/shared-lib/platform/include/bh_config.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file bh_config.h + * @date Tue Sep 13 14:53:17 2011 + * + * @brief Configurations for different platforms and targets. Make + * sure all source files in Beihai project include this header file + * directly or indirectly. + */ + +#ifndef BH_CONFIG + +#include "config.h" + +#endif /* end of BH_CONFIG */ + diff --git a/core/shared-lib/platform/include/bh_definition.h b/core/shared-lib/platform/include/bh_definition.h new file mode 100755 index 000000000..7780f4132 --- /dev/null +++ b/core/shared-lib/platform/include/bh_definition.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_DEFINITION_H +#define _BH_DEFINITION_H + +#include "bh_config.h" + +typedef enum { + BH_FAILED = -100, + BH_UNKOWN = -99, + BH_MAGIC_UNMATCH = -12, + BH_UNIMPLEMENTED = -11, + BH_INTR = -10, + BH_CLOSED = -9, + BH_BUFFER_OVERFLOW = -8, /* TODO: no used error, should remove*/ + BH_NOT_SUPPORTED = -7, + BH_WEAR_OUT_VIOLATION = -6, + BH_NOT_FOUND = -5, + BH_INVALID_PARAMS = -4, + BH_ACCESS_DENIED = -3, + BH_OUT_OF_MEMORY = -2, + BH_INVALID = -1, + BH_SUCCESS = 0, + BH_TIMEOUT = 2 +} bh_status; + +#endif diff --git a/core/shared-lib/platform/include/bh_platform_log.h b/core/shared-lib/platform/include/bh_platform_log.h new file mode 100644 index 000000000..9f2bac2c4 --- /dev/null +++ b/core/shared-lib/platform/include/bh_platform_log.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef BH_PLATFORM_LOG +#define BH_PLATFORM_LOG + +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void bh_log_emit(const char *fmt, va_list ap); + +int bh_fprintf(void *stream, const char *fmt, ...); + +int bh_fflush(void *stream); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/shared-lib/platform/include/bh_thread.h b/core/shared-lib/platform/include/bh_thread.h new file mode 100644 index 000000000..68dc59359 --- /dev/null +++ b/core/shared-lib/platform/include/bh_thread.h @@ -0,0 +1,409 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_THREAD_H +#define _BH_THREAD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "bh_config.h" +#include "bh_platform.h" + +#define BH_MAX_THREAD 32 +#define BH_MAX_TLS_NUM 2 + +#define BHT_ERROR (-1) +#define BHT_TIMED_OUT (1) +#define BHT_OK (0) + +#define BHT_NO_WAIT 0x00000000 +#define BHT_WAIT_FOREVER 0xFFFFFFFF + +/** + * vm_thread_sys_init + * initiation function for beihai thread system. Invoked at the beginning of beihai intiation. + * + * @return BH_SUCCESS if succuess. + */ +int _vm_thread_sys_init(void); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_sys_init_instr(const char*func_name); +#define vm_thread_sys_init(void) vm_thread_sys_init_instr(__FUNCTION__) +#else +#define vm_thread_sys_init _vm_thread_sys_init +#endif + +void vm_thread_sys_destroy(void); + +/** + * This function creates a thread + * + * @param p_tid [OUTPUT] the pointer of tid + * @param start main routine of the thread + * @param arg argument passed to main routine + * @param stack_size bytes of stack size + * + * @return BH_SUCCESS if success. + */ +int _vm_thread_create(korp_tid *p_tid, thread_start_routine_t start, void *arg, + unsigned int stack_size); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_create_instr(korp_tid *p_tid, thread_start_routine_t start, void *arg, unsigned int stack_size, const char*func_name); +#define vm_thread_create(p_tid, start, arg, stack_size) vm_thread_create_instr(p_tid, start, arg, stack_size, __FUNCTION__) +#else +#define vm_thread_create _vm_thread_create +#endif + +/** + * This function creates a thread + * + * @param p_tid [OUTPUT] the pointer of tid + * @param start main routine of the thread + * @param arg argument passed to main routine + * @param stack_size bytes of stack size + * @param prio the priority + * + * @return BH_SUCCESS if success. + */ +int _vm_thread_create_with_prio(korp_tid *p_tid, thread_start_routine_t start, + void *arg, unsigned int stack_size, int prio); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_create_with_prio_instr(korp_tid *p_tid, thread_start_routine_t start, void *arg, unsigned int stack_size, int prio, const char*func_name); +#define vm_thread_create_with_prio(p_tid, start, arg, stack_size) vm_thread_create_instr(p_tid, start, arg, stack_size, prio, __FUNCTION__) +#else +#define vm_thread_create_with_prio _vm_thread_create_with_prio +#endif + +/** + * This function never returns. + * + * @param code not used + */ +void vm_thread_exit(void *code); + +/** + * This function gets current thread id + * + * @return current thread id + */ +korp_tid _vm_self_thread(void); +#ifdef _INSTRUMENT_TEST_ENABLED +korp_tid vm_self_thread_instr(const char*func_name); +#define vm_self_thread(void) vm_self_thread_instr(__FUNCTION__) +#else +#define vm_self_thread _vm_self_thread +#endif + +/** + * This function saves a pointer in thread local storage. One thread can only save one pointer. + * + * @param idx tls array index + * @param ptr pointer need save as TLS + * + * @return BH_SUCCESS if success + */ +int _vm_tls_put(unsigned idx, void *ptr); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_tls_put_instr(unsigned idx, void *ptr, const char*func_name); +#define vm_tls_put(idx, ptr) vm_tls_put_instr(idx, ptr, __FUNCTION__) +#else +#define vm_tls_put _vm_tls_put +#endif + +/** + * This function gets a pointer saved in TLS. + * + * @param idx tls array index + * + * @return the pointer saved in TLS. + */ +void *_vm_tls_get(unsigned idx); +#ifdef _INSTRUMENT_TEST_ENABLED +void *vm_tls_get_instr(unsigned idx, const char*func_name); +#define vm_tls_get(idx) vm_tls_get_instr(idx, __FUNCTION__) +#else +#define vm_tls_get _vm_tls_get +#endif + +#define vm_thread_testcancel(void) + +/** + * This function creates a non-recursive mutex + * + * @param mutex [OUTPUT] pointer to mutex initialized. + * + * @return BH_SUCCESS if success + */ +int _vm_mutex_init(korp_mutex *mutex); +#ifdef INSTRUMENT_TEST_ENABLED +int vm_mutex_init_instr(korp_mutex *mutex, const char*func_name); +#define vm_mutex_init(mutex) vm_mutex_init_instr(mutex, __FUNCTION__) +#else +#define vm_mutex_init _vm_mutex_init +#endif + +/** + * This function creates a recursive mutex + * + * @param mutex [OUTPUT] pointer to mutex initialized. + * + * @return BH_SUCCESS if success + */ +int _vm_recursive_mutex_init(korp_mutex *mutex); +#ifdef INSTRUMENT_TEST_ENABLED +int vm_recursive_mutex_init_instr(korp_mutex *mutex, const char*func_name); +#define vm_recursive_mutex_init(mutex) vm_recursive_mutex_init_instr(mutex, __FUNCTION__) +#else +#define vm_recursive_mutex_init _vm_recursive_mutex_init +#endif + +/** + * This function destorys a mutex + * + * @param mutex pointer to mutex need destory + * + * @return BH_SUCCESS if success + */ +int _vm_mutex_destroy(korp_mutex *mutex); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_mutex_destroy_instr(korp_mutex *mutex, const char*func_name); +#define vm_mutex_destroy(mutex) vm_mutex_destroy_instr(mutex, __FUNCTION__) +#else +#define vm_mutex_destroy _vm_mutex_destroy +#endif + +/** + * This function locks the mutex + * + * @param mutex pointer to mutex need lock + * + * @return Void + */ +void vm_mutex_lock(korp_mutex *mutex); + +/** + * This function locks the mutex without waiting + * + * @param mutex pointer to mutex need lock + * + * @return BH_SUCCESS if success + */ +int vm_mutex_trylock(korp_mutex *mutex); + +/** + * This function unlocks the mutex + * + * @param mutex pointer to mutex need unlock + * + * @return Void + */ +void vm_mutex_unlock(korp_mutex *mutex); + +/** + * This function creates a semaphone + * + * @param sem [OUTPUT] pointer to semaphone + * @param c counter of semaphone + * + * @return BH_SUCCESS if success + */ +int _vm_sem_init(korp_sem *sem, unsigned int c); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_sem_init_instr(korp_sem *sem, unsigned int c, const char*func_name); +#define vm_sem_init(sem, c) vm_sem_init_instr(sem, c, __FUNCTION__) +#else +#define vm_sem_init _vm_sem_init +#endif + +/** + * This function destroys a semaphone + * + * @param sem pointer to semaphone need destroy + * + * @return BH_SUCCESS if success + */ +int _vm_sem_destroy(korp_sem *sem); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_sem_destroy_instr(korp_sem *sem, const char*func_name); +#define vm_sem_destroy(sem) vm_sem_destroy_instr(sem, __FUNCTION__) +#else +#define vm_sem_destroy _vm_sem_destroy +#endif + +/** + * This function performs wait operation on semaphone + * + * @param sem pointer to semaphone need perform wait operation + * + * @return BH_SUCCESS if success + */ +int _vm_sem_wait(korp_sem *sem); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_sem_wait_instr(korp_sem *sem, const char*func_name); +#define vm_sem_wait(sem) vm_sem_wait_instr(sem, __FUNCTION__) +#else +#define vm_sem_wait _vm_sem_wait +#endif + +/** + * This function performs wait operation on semaphone with a timeout + * + * @param sem pointer to semaphone need perform wait operation + * @param mills wait milliseconds to return + * + * @return BH_SUCCESS if success + * @return BH_TIMEOUT if time out + */ +int _vm_sem_reltimedwait(korp_sem *sem, int mills); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_sem_reltimedwait_instr(korp_sem *sem, int mills, const char*func_name); +#define vm_sem_reltimedwait(sem, mills) vm_sem_reltimedwait_instr(sem, mills, __FUNCTION__) +#else +#define vm_sem_reltimedwait _vm_sem_reltimedwait +#endif + +/** + * This function performs post operation on semaphone + * + * @param sem pointer to semaphone need perform post operation + * + * @return BH_SUCCESS if success + */ +int _vm_sem_post(korp_sem *sem); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_sem_post_instr(korp_sem *sem, const char*func_name); +#define vm_sem_post(sem) vm_sem_post_instr(sem, __FUNCTION__) +#else +#define vm_sem_post _vm_sem_post +#endif + +/** + * This function creates a condition variable + * + * @param cond [OUTPUT] pointer to condition variable + * + * @return BH_SUCCESS if success + */ +int _vm_cond_init(korp_cond *cond); +#ifdef INSTRUMENT_TEST_ENABLED +int vm_cond_init_instr(korp_cond *cond, const char*func_name); +#define vm_cond_init(cond) vm_cond_init_instr(cond, __FUNCTION__) +#else +#define vm_cond_init _vm_cond_init +#endif + +/** + * This function destorys condition variable + * + * @param cond pointer to condition variable + * + * @return BH_SUCCESS if success + */ +int _vm_cond_destroy(korp_cond *cond); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_cond_destroy_instr(korp_cond *cond, const char*func_name); +#define vm_cond_destroy(cond) vm_cond_destroy_instr(cond, __FUNCTION__) +#else +#define vm_cond_destroy _vm_cond_destroy +#endif + +/** + * This function will block on a condition varible. + * + * @param cond pointer to condition variable + * @param mutex pointer to mutex to protect the condition variable + * + * @return BH_SUCCESS if success + */ +int _vm_cond_wait(korp_cond *cond, korp_mutex *mutex); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_cond_wait_instr(korp_cond *cond, korp_mutex *mutex, const char*func_name); +#define vm_cond_wait(cond, mutex) vm_cond_wait_instr(cond, mutex, __FUNCTION__) +#else +#define vm_cond_wait _vm_cond_wait +#endif + +/** + * This function will block on a condition varible or return if time specified passes. + * + * @param cond pointer to condition variable + * @param mutex pointer to mutex to protect the condition variable + * @param mills milliseconds to wait + * + * @return BH_SUCCESS if success + */ +int _vm_cond_reltimedwait(korp_cond *cond, korp_mutex *mutex, int mills); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_cond_reltimedwait_instr(korp_cond *cond, korp_mutex *mutex, int mills, const char*func_name); +#define vm_cond_reltimedwait(cond, mutex, mills) vm_cond_reltimedwait_instr(cond, mutex, mills, __FUNCTION__) +#else +#define vm_cond_reltimedwait _vm_cond_reltimedwait +#endif + +/** + * This function signals the condition variable + * + * @param cond condition variable + * + * @return BH_SUCCESS if success + */ +int _vm_cond_signal(korp_cond *cond); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_cond_signal_instr(korp_cond *cond, const char*func_name); +#define vm_cond_signal(cond) vm_cond_signal_instr(cond, __FUNCTION__) +#else +#define vm_cond_signal _vm_cond_signal +#endif + +int _vm_cond_broadcast(korp_cond *cond); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_cond_broadcast_instr(korp_cond *cond, const char*func_name); +#define vm_cond_broadcast(cond) vm_cond_broadcast_instr(cond, __FUNCTION__) +#else +#define vm_cond_broadcast _vm_cond_broadcast +#endif + +int _vm_thread_cancel(korp_tid thread); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_cancel_instr(korp_tid thread, const char*func_name); +#define vm_thread_cancel(thread) vm_thread_cancel_instr(thread, __FUNCTION__) +#else +#define vm_thread_cancel _vm_thread_cancel +#endif + +int _vm_thread_join(korp_tid thread, void **value_ptr, int mills); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_join_instr(korp_tid thread, void **value_ptr, int mills, const char*func_name); +#define vm_thread_join(thread, value_ptr, mills) vm_thread_join_instr(thread, value_ptr, mills, __FUNCTION__) +#else +#define vm_thread_join _vm_thread_join +#endif + +int _vm_thread_detach(korp_tid thread); +#ifdef _INSTRUMENT_TEST_ENABLED +int vm_thread_detach_instr(korp_tid thread, const char*func_name); +#define vm_thread_detach(thread) vm_thread_detach_instr(thread, __FUNCTION__) +#else +#define vm_thread_detach _vm_thread_detach +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* #ifndef _BH_THREAD_H */ diff --git a/core/shared-lib/platform/include/bh_time.h b/core/shared-lib/platform/include/bh_time.h new file mode 100644 index 000000000..31e1454a8 --- /dev/null +++ b/core/shared-lib/platform/include/bh_time.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_TIME_H +#define _BH_TIME_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "bh_config.h" +#include "bh_definition.h" +#include "bh_types.h" +#include "bh_platform.h" + +/* + * This function returns milliseconds per tick. + * @return milliseconds per tick. + */ +extern uint64 _bh_time_get_tick_millisecond(void); +#ifdef _INSTRUMENT_TEST_ENABLED +extern uint64 bh_time_get_tick_millisecond_instr(const char*func_name); +#define bh_time_get_tick_millisecond() bh_time_get_tick_millisecond_instr(__FUNCTION__) +#else +#define bh_time_get_tick_millisecond _bh_time_get_tick_millisecond +#endif + +/* + * This function returns milliseconds after boot. + * @return milliseconds after boot. + */ +extern uint64 _bh_time_get_boot_millisecond(void); +#ifdef _INSTRUMENT_TEST_ENABLED +extern uint64 bh_time_get_boot_millisecond_instr(const char*func_name); +#define bh_time_get_boot_millisecond() bh_time_get_boot_millisecond_instr(__FUNCTION__) +#else +#define bh_time_get_boot_millisecond _bh_time_get_boot_millisecond +#endif + +extern uint32 bh_get_tick_sec(); +#define bh_get_tick_ms _bh_time_get_boot_millisecond + +/* + * This function returns GMT milliseconds since from 1970.1.1, AKA UNIX time. + * @return milliseconds since from 1970.1.1. + */ +extern uint64 _bh_time_get_millisecond_from_1970(void); +#ifdef _INSTRUMENT_TEST_ENABLED +extern uint64 bh_time_get_millisecond_from_1970_instr(const char*func_name); +#define bh_time_get_millisecond_from_1970() bh_time_get_millisecond_from_1970_instr(__FUNCTION__) +#else +#define bh_time_get_millisecond_from_1970 _bh_time_get_millisecond_from_1970 +#endif + +/** + * This function sets timezone with specific hours. + * + * @param hours represents the deviation (in hours) of the local time from GMT (can be a positive or a negative number) + * @param half_hour if true, adds half an hour to the local time calculation. For example, if hours=(+5) then the time will be GMT +5:30; if hours=(-5) then the time will be GMT -4:30. + * @param daylight_save if true, applies the daylight saving scheme when calculating the local time (adds one hour to the local time calculation) + */ +extern void bh_set_timezone(int hours, int half_hour, int daylight_save); + +/** + * This functions returns the offset in seconds which needs to be added GMT to get the local time. + * + * + * @return offset in secords which needs to be added GMT to get the local time. + */ +extern int bh_get_timezone_offset(void); + +size_t bh_time_strftime(char *s, size_t max, const char *format, int64 time); + +#ifdef _INSTRUMENT_TEST_ENABLED +size_t bh_time_strftime_instr(char *s, size_t max, const char *format, int64 time, const char*func_name); +#define bh_time_strftime(s, max, format, time) bh_time_strftime_instr(s, max, format, time, __FUNCTION__) +#else +#define bh_time_strftime _bh_time_strftime +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/shared-lib/platform/include/bh_types.h b/core/shared-lib/platform/include/bh_types.h new file mode 100644 index 000000000..ff561b244 --- /dev/null +++ b/core/shared-lib/platform/include/bh_types.h @@ -0,0 +1,51 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_TYPES_H +#define _BH_TYPES_H + +#include "bh_config.h" + +typedef unsigned char uint8; +typedef char int8; +typedef unsigned short uint16; +typedef short int16; +typedef unsigned int uint32; +typedef int int32; + +#define BYTES_OF_UINT8 1 +#define BYTES_OF_UINT16 2 +#define BYTES_OF_UINT32 4 +#define BYTES_OF_UINT64 8 + +#define BYTES_OF_BOOLEAN 1 +#define BYTES_OF_BYTE 1 +#define BYTES_OF_CHAR 2 +#define BYTES_OF_SHORT 2 +#define BYTES_OF_INT 4 +#define BYTES_OF_FLOAT 4 +#define BYTES_OF_LONG 8 +#define BYTES_OF_DOUBLE 8 + +#include "bh_platform.h" + +#ifndef __cplusplus +#define true 1 +#define false 0 +#endif + +#endif + diff --git a/core/shared-lib/platform/linux/bh_assert.c b/core/shared-lib/platform/linux/bh_assert.c new file mode 100644 index 000000000..b52a9aa5b --- /dev/null +++ b/core/shared-lib/platform/linux/bh_assert.c @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include "bh_assert.h" +#include +#include +#include + +#ifdef BH_TEST +#include +#endif + +#ifdef BH_TEST +/* for exception throwing */ +jmp_buf bh_test_jb; +#endif + +void bh_assert_internal(int v, const char *file_name, int line_number, + const char *expr_string) +{ + if (v) + return; + + if (!file_name) + file_name = "NULL FILENAME"; + if (!expr_string) + expr_string = "NULL EXPR_STRING"; + + printf("\nASSERTION FAILED: %s, at FILE=%s, LINE=%d\n", expr_string, + file_name, line_number); + +#ifdef BH_TEST + longjmp(bh_test_jb, 1); +#endif + + abort(); +} + +void bh_debug_internal(const char *file_name, int line_number, const char *fmt, + ...) +{ +#ifndef JEFF_TEST_VERIFIER + va_list args; + + va_start(args, fmt); + bh_assert(file_name); + + printf("\nDebug info FILE=%s, LINE=%d: ", file_name, line_number); + vprintf(fmt, args); + + va_end(args); + printf("\n"); +#endif +} + diff --git a/core/shared-lib/platform/linux/bh_definition.c b/core/shared-lib/platform/linux/bh_definition.c new file mode 100644 index 000000000..47ee11ed2 --- /dev/null +++ b/core/shared-lib/platform/linux/bh_definition.c @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_definition.h" +#include "bh_platform.h" + +int bh_return(int ret) +{ + return ret; +} + +#define RSIZE_MAX 0x7FFFFFFF +int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, unsigned int n) +{ + char *dest = (char*) s1; + char *src = (char*) s2; + if (n == 0) { + return 0; + } + + if (s1 == NULL || s1max > RSIZE_MAX) { + return -1; + } + if (s2 == NULL || n > s1max) { + memset(dest, 0, s1max); + return -1; + } + memcpy(dest, src, n); + return 0; +} + +int b_strcat_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s1) + strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcat(s1, s2); + + return 0; +} + +int b_strcpy_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcpy(s1, s2); + + return 0; +} + +int fopen_s(FILE ** pFile, const char *filename, const char *mode) +{ + if (NULL == pFile || NULL == filename || NULL == mode) { + return -1; + } + + *pFile = fopen(filename, mode); + + if (NULL == *pFile) + return -1; + + return 0; +} diff --git a/core/shared-lib/platform/linux/bh_platform.c b/core/shared-lib/platform/linux/bh_platform.c new file mode 100755 index 000000000..fe05e8bd1 --- /dev/null +++ b/core/shared-lib/platform/linux/bh_platform.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include +#include + +char *bh_strdup(const char *s) +{ + char *s1 = NULL; + if (s && (s1 = bh_malloc(strlen(s) + 1))) + memcpy(s1, s, strlen(s) + 1); + return s1; +} diff --git a/core/shared-lib/platform/linux/bh_platform.h b/core/shared-lib/platform/linux/bh_platform.h new file mode 100644 index 000000000..00c25b492 --- /dev/null +++ b/core/shared-lib/platform/linux/bh_platform.h @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_PLATFORM_H +#define _BH_PLATFORM_H + +#include "bh_config.h" +#include "bh_types.h" +#include "bh_memory.h" +#include +#include +#include +#include +#include +#include +#include + +#ifndef __cplusplus +int snprintf(char *buffer, size_t count, const char *format, ...); +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef uint64_t uint64; +typedef int64_t int64; + +extern void DEBUGME(void); + +#define DIE do{bh_debug("Die here\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); DEBUGME(void); while(1);}while(0) + +#define BH_PLATFORM "Linux" + +/* NEED qsort */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define _STACK_SIZE_ADJUSTMENT (32 * 1024) + +/* Stack size of applet manager thread. */ +#define BH_APPLET_MANAGER_THREAD_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of HMC thread. */ +#define BH_HMC_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of watchdog thread. */ +#define BH_WATCHDOG_THREAD_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of applet threads's native part. */ +#define BH_APPLET_PRESERVED_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of remote invoke listen thread. */ +#define BH_REMOTE_INVOKE_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of remote post listen thread. */ +#define BH_REMOTE_POST_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Maximal recursion depth of interpreter. */ +#define BH_MAX_INTERP_RECURSION_DEPTH 8 + +/* Default thread priority */ +#define BH_THREAD_DEFAULT_PRIORITY 0 + +#define BH_ROUTINE_MODIFIER +#define BHT_TIMEDOUT ETIMEDOUT + +#define INVALID_THREAD_ID 0xFFffFFff +#define INVALID_SEM_ID SEM_FAILED + +typedef pthread_t korp_tid; +typedef pthread_mutex_t korp_mutex; +typedef sem_t korp_sem; +typedef pthread_cond_t korp_cond; +typedef pthread_t korp_thread; +typedef void* (*thread_start_routine_t)(void*); + +#define wa_malloc bh_malloc +#define wa_free bh_free +#define wa_strdup bh_strdup + +double fmod(double x, double y); +float fmodf(float x, float y); + +/* Definitions for applet debugging */ +#define APPLET_DEBUG_LISTEN_PORT 8000 +#define BH_SOCKET_INVALID_SOCK -1 +#define BH_WAIT_FOREVER 0xFFFFFFFF +typedef int bh_socket_t; + +#ifndef NULL +# define NULL ((void*) 0) +#endif + +#define bh_assert assert + +extern int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, + unsigned int n); +extern int b_strcat_s(char * s1, size_t s1max, const char * s2); +extern int b_strcpy_s(char * s1, size_t s1max, const char * s2); +extern int fopen_s(FILE ** pFile, const char *filename, const char *mode); + +extern char *bh_strdup(const char *s); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/core/shared-lib/platform/linux/bh_platform_log.c b/core/shared-lib/platform/linux/bh_platform_log.c new file mode 100644 index 000000000..4ff03192a --- /dev/null +++ b/core/shared-lib/platform/linux/bh_platform_log.c @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include + +void bh_log_emit(const char *fmt, va_list ap) +{ + vprintf(fmt, ap); + fflush(stdout); +} + +int bh_fprintf(FILE *stream, const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, fmt); + ret = vfprintf(stream ? stream : stdout, fmt, ap); + va_end(ap); + + return ret; +} + +int bh_fflush(void *stream) +{ + return fflush(stream ? stream : stdout); +} diff --git a/core/shared-lib/platform/linux/bh_thread.c b/core/shared-lib/platform/linux/bh_thread.c new file mode 100755 index 000000000..9d45b147f --- /dev/null +++ b/core/shared-lib/platform/linux/bh_thread.c @@ -0,0 +1,404 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_thread.h" +#include "bh_assert.h" +#include "bh_log.h" +#include "bh_memory.h" +#include +#include +#include + +static bool is_thread_sys_inited = false; + +static korp_mutex thread_list_lock; +static pthread_key_t thread_local_storage_key[BH_MAX_TLS_NUM]; + +int _vm_thread_sys_init() +{ + unsigned i, j; + int ret; + + if (is_thread_sys_inited) + return 0; + + for (i = 0; i < BH_MAX_TLS_NUM; i++) { + ret = pthread_key_create(&thread_local_storage_key[i], NULL); + if (ret) + goto fail; + } + + ret = vm_mutex_init(&thread_list_lock); + if (ret) + goto fail; + + is_thread_sys_inited = true; + return 0; + + fail: for (j = 0; j < i; j++) + pthread_key_delete(thread_local_storage_key[j]); + return -1; +} + +void vm_thread_sys_destroy(void) +{ + if (is_thread_sys_inited) { + unsigned i; + for (i = 0; i < BH_MAX_TLS_NUM; i++) + pthread_key_delete(thread_local_storage_key[i]); + vm_mutex_destroy(&thread_list_lock); + is_thread_sys_inited = false; + } +} + +typedef struct { + thread_start_routine_t start; + void* stack; + int stack_size; + void* arg; +} thread_wrapper_arg; + +static void *vm_thread_wrapper(void *arg) +{ + thread_wrapper_arg * targ = arg; + LOG_VERBOSE("THREAD CREATE 0x%08x\n", &targ); + targ->stack = (void *) ((unsigned int) (&arg) & ~0xfff); + _vm_tls_put(1, targ); + targ->start(targ->arg); + bh_free(targ); + _vm_tls_put(1, NULL); + return NULL; +} + +int _vm_thread_create_with_prio(korp_tid *tid, thread_start_routine_t start, + void *arg, unsigned int stack_size, int prio) +{ + pthread_attr_t tattr; + thread_wrapper_arg *targ; + + bh_assert(stack_size > 0); + bh_assert(tid); + bh_assert(start); + + *tid = INVALID_THREAD_ID; + + pthread_attr_init(&tattr); + pthread_attr_setdetachstate(&tattr, PTHREAD_CREATE_JOINABLE); + if (pthread_attr_setstacksize(&tattr, stack_size) != 0) { + bh_debug("Invalid thread stack size %u. Min stack size on Linux = %u", + stack_size, PTHREAD_STACK_MIN); + pthread_attr_destroy(&tattr); + return BHT_ERROR; + } + + targ = (thread_wrapper_arg*) bh_malloc(sizeof(*targ)); + if (!targ) { + pthread_attr_destroy(&tattr); + return BHT_ERROR; + } + + targ->start = start; + targ->arg = arg; + targ->stack_size = stack_size; + + if (pthread_create(tid, &tattr, vm_thread_wrapper, targ) != 0) { + pthread_attr_destroy(&tattr); + bh_free(targ); + return BHT_ERROR; + } + + pthread_attr_destroy(&tattr); + return BHT_OK; +} + +int _vm_thread_create(korp_tid *tid, thread_start_routine_t start, void *arg, + unsigned int stack_size) +{ + return _vm_thread_create_with_prio(tid, start, arg, stack_size, + BH_THREAD_DEFAULT_PRIORITY); +} + +korp_tid _vm_self_thread() +{ + return (korp_tid) pthread_self(); +} + +void vm_thread_exit(void * code) +{ + bh_free(_vm_tls_get(1)); + _vm_tls_put(1, NULL); + pthread_exit(code); +} + +void *_vm_tls_get(unsigned idx) +{ + bh_assert(idx < BH_MAX_TLS_NUM); + return pthread_getspecific(thread_local_storage_key[idx]); +} + +int _vm_tls_put(unsigned idx, void * tls) +{ + bh_assert(idx < BH_MAX_TLS_NUM); + pthread_setspecific(thread_local_storage_key[idx], tls); + return BHT_OK; +} + +int _vm_mutex_init(korp_mutex *mutex) +{ + return pthread_mutex_init(mutex, NULL) == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_recursive_mutex_init(korp_mutex *mutex) +{ + int ret; + + pthread_mutexattr_t mattr; + + bh_assert(mutex); + ret = pthread_mutexattr_init(&mattr); + if (ret) + return BHT_ERROR; + + pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE_NP); + ret = pthread_mutex_init(mutex, &mattr); + pthread_mutexattr_destroy(&mattr); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_mutex_destroy(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_destroy(mutex); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +/* Returned error (EINVAL, EAGAIN and EDEADLK) from + locking the mutex indicates some logic error present in + the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_lock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_lock(mutex); + if (0 != ret) { + printf("vm mutex lock failed (ret=%d)!\n", ret); + exit(-1); + } +} + +int vm_mutex_trylock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_trylock(mutex); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +/* Returned error (EINVAL, EAGAIN and EPERM) from + unlocking the mutex indicates some logic error present + in the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_unlock(korp_mutex *mutex) +{ + int ret; + + bh_assert(mutex); + ret = pthread_mutex_unlock(mutex); + if (0 != ret) { + printf("vm mutex unlock failed (ret=%d)!\n", ret); + exit(-1); + } +} + +int _vm_sem_init(korp_sem* sem, unsigned int c) +{ + int ret; + + bh_assert(sem); + ret = sem_init(sem, 0, c); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_sem_destroy(korp_sem *sem) +{ + int ret; + + bh_assert(sem); + ret = sem_destroy(sem); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_sem_wait(korp_sem *sem) +{ + int ret; + + bh_assert(sem); + + ret = sem_wait(sem); + + return ret == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_sem_reltimedwait(korp_sem *sem, int mills) +{ + int ret = BHT_OK; + + struct timespec timeout; + const int mills_per_sec = 1000; + const int mills_to_nsec = 1E6; + + bh_assert(sem); + + if (mills == BHT_WAIT_FOREVER) { + ret = sem_wait(sem); + } else { + + timeout.tv_sec = mills / mills_per_sec; + timeout.tv_nsec = (mills % mills_per_sec) * mills_to_nsec; + timeout.tv_sec += time(NULL); + + ret = sem_timedwait(sem, &timeout); + } + + if (ret != BHT_OK) { + if (errno == BHT_TIMEDOUT) { + ret = BHT_TIMEDOUT; + errno = 0; + } else { + bh_debug("Faliure happens when timed wait is called"); + bh_assert(0); + } + } + + return ret; +} + +int _vm_sem_post(korp_sem *sem) +{ + bh_assert(sem); + + return sem_post(sem) == 0 ? BHT_OK : BHT_ERROR; +} + +int _vm_cond_init(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_init(cond, NULL) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_destroy(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_destroy(cond) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_wait(korp_cond *cond, korp_mutex *mutex) +{ + bh_assert(cond); + bh_assert(mutex); + + if (pthread_cond_wait(cond, mutex) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +static void msec_nsec_to_abstime(struct timespec *ts, int64 msec, int32 nsec) +{ + struct timeval tv; + + gettimeofday(&tv, NULL); + + ts->tv_sec = tv.tv_sec + msec / 1000; + ts->tv_nsec = tv.tv_usec * 1000 + (msec % 1000) * 1000000 + nsec; + + if (ts->tv_nsec >= 1000000000L) { + ts->tv_sec++; + ts->tv_nsec -= 1000000000L; + } +} + +int _vm_cond_reltimedwait(korp_cond *cond, korp_mutex *mutex, int mills) +{ + int ret; + struct timespec abstime; + + if (mills == BHT_WAIT_FOREVER) + ret = pthread_cond_wait(cond, mutex); + else { + msec_nsec_to_abstime(&abstime, mills, 0); + ret = pthread_cond_timedwait(cond, mutex, &abstime); + } + + if (ret != BHT_OK && ret != BHT_TIMEDOUT) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_signal(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_signal(cond) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_broadcast(korp_cond *cond) +{ + bh_assert(cond); + + if (pthread_cond_broadcast(cond) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_thread_cancel(korp_tid thread) +{ + return pthread_cancel(thread); +} + +int _vm_thread_join(korp_tid thread, void **value_ptr, int mills) +{ + return pthread_join(thread, value_ptr); +} + +int _vm_thread_detach(korp_tid thread) +{ + return pthread_detach(thread); +} + diff --git a/core/shared-lib/platform/linux/bh_time.c b/core/shared-lib/platform/linux/bh_time.c new file mode 100755 index 000000000..0627b08d0 --- /dev/null +++ b/core/shared-lib/platform/linux/bh_time.c @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_time.h" + +#include +#include +#include +#include + +/* + * This function returns milliseconds per tick. + * @return milliseconds per tick. + */ +uint64 _bh_time_get_tick_millisecond() +{ + return sysconf(_SC_CLK_TCK); +} + +/* + * This function returns milliseconds after boot. + * @return milliseconds after boot. + */ +uint64 _bh_time_get_boot_millisecond() +{ + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) { + return 0; + } + + return ((uint64) ts.tv_sec) * 1000 + ts.tv_nsec / (1000 * 1000); +} + +uint32 bh_get_tick_sec() +{ + return _bh_time_get_boot_millisecond() / 1000; +} + +/* + * This function returns GMT time milliseconds since from 1970.1.1, AKA UNIX time. + * @return milliseconds since from 1970.1.1. + */ +uint64 _bh_time_get_millisecond_from_1970() +{ + struct timeb tp; + ftime(&tp); + + return ((uint64) tp.time) * 1000 + tp.millitm + - (tp.dstflag == 0 ? 0 : 60 * 60 * 1000) + tp.timezone * 60 * 1000; +} + +size_t _bh_time_strftime(char *s, size_t max, const char *format, int64 time) +{ + time_t time_sec = time / 1000; + struct timeb tp; + struct tm *ltp; + + ftime(&tp); + time_sec -= tp.timezone * 60; + + ltp = localtime(&time_sec); + if (ltp == NULL) { + return 0; + } + return strftime(s, max, format, ltp); +} + diff --git a/core/shared-lib/platform/linux/shared_platform.cmake b/core/shared-lib/platform/linux/shared_platform.cmake new file mode 100644 index 000000000..5b403a09c --- /dev/null +++ b/core/shared-lib/platform/linux/shared_platform.cmake @@ -0,0 +1,24 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (PLATFORM_SHARED_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${PLATFORM_SHARED_DIR}) +include_directories(${PLATFORM_SHARED_DIR}/../include) + + +file (GLOB_RECURSE source_all ${PLATFORM_SHARED_DIR}/*.c) + +set (PLATFORM_SHARED_SOURCE ${source_all}) + diff --git a/core/shared-lib/platform/win32/bh_assert.c b/core/shared-lib/platform/win32/bh_assert.c new file mode 100644 index 000000000..b0bbbcbe1 --- /dev/null +++ b/core/shared-lib/platform/win32/bh_assert.c @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include "bh_assert.h" +#include + +#ifdef BH_TEST +#include +#endif + +#ifdef BH_TEST +/* for exception throwing */ +jmp_buf bh_test_jb; +#endif + +void bh_assert_internal(int v, const char *file_name, int line_number, + const char *expr_string) +{ + if (v) + return; + + if (!file_name) + file_name = "NULL FILENAME"; + if (!expr_string) + expr_string = "NULL EXPR_STRING"; + + printf("\nASSERTION FAILED: %s, at FILE=%s, LINE=%d\n", expr_string, + file_name, line_number); + +#ifdef BH_TEST + longjmp(bh_test_jb, 1); +#endif + + abort(); +} + +void bh_debug_internal(const char *file_name, int line_number, const char *fmt, + ...) +{ +#ifndef JEFF_TEST_VERIFIER + va_list args; + + va_start(args, fmt); + bh_assert(file_name); + + printf("\nDebug info FILE=%s, LINE=%d: ", file_name, line_number); + vprintf(fmt, args); + + va_end(args); + printf("\n"); +#endif +} + diff --git a/core/shared-lib/platform/win32/bh_definition.c b/core/shared-lib/platform/win32/bh_definition.c new file mode 100644 index 000000000..058804c68 --- /dev/null +++ b/core/shared-lib/platform/win32/bh_definition.c @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_definition.h" + +int bh_return(int ret) +{ + return ret; +} diff --git a/core/shared-lib/platform/win32/bh_platform.h b/core/shared-lib/platform/win32/bh_platform.h new file mode 100755 index 000000000..c898a747d --- /dev/null +++ b/core/shared-lib/platform/win32/bh_platform.h @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_PLATFORM_H +#define _BH_PLATFORM_H + +#include "bh_config.h" +#include "bh_types.h" + +#ifndef NVALGRIND +#define NVALGRIND +#endif + +/* Reserve bytes on applet stack for native functions called from + * Java methods to avoid undetectable stack overflow. + */ +#ifndef APPLET_PRESERVED_STACK_SIZE +#define APPLET_PRESERVED_STACK_SIZE (16 * BH_KB) +#endif + +typedef unsigned __int64 uint64; +typedef __int64 int64; + +extern void DEBUGME(void); + +#define DIE do{bh_debug("Die here\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); DEBUGME(void); while(1);}while(0) + +#ifndef BH_INVALID_HANDLE +#define BH_INVALID_HANDLE NULL +#endif + +#define BH_PLATFORM "AMULET" + +#include +#include +#include +#include +#include + +#include + +#define _STACK_SIZE_ADJUSTMENT (32 * 1024) + +/* Stack size of applet manager thread. */ +#define BH_APPLET_MANAGER_THREAD_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of HMC thread. */ +#define BH_HMC_THREAD_STACK_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of watchdog thread. */ +#define BH_WATCHDOG_THREAD_SIZE (4 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Stack size of applet threads's native part. */ +#define BH_APPLET_PRESERVED_STACK_SIZE (8 * 1024 + _STACK_SIZE_ADJUSTMENT) + +/* Maximal recursion depth of interpreter. */ +#define BH_MAX_INTERP_RECURSION_DEPTH 8 + +#define wa_malloc bh_malloc +#define wa_free bh_free + +#define snprintf _snprintf + +#define BH_ROUTINE_MODIFIER __stdcall + +typedef void *korp_tid; +#define INVALID_THREAD_ID 0 + +typedef void *korp_mutex; +typedef void *korp_sem; + +typedef struct { + korp_sem s; + unsigned waiting_count; +} korp_cond; + +typedef void* (BH_ROUTINE_MODIFIER *thread_start_routine_t)(void*); + +#endif + diff --git a/core/shared-lib/platform/win32/bh_platform_log.c b/core/shared-lib/platform/win32/bh_platform_log.c new file mode 100755 index 000000000..80bec06c5 --- /dev/null +++ b/core/shared-lib/platform/win32/bh_platform_log.c @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "bh_platform.h" + +void bh_log_emit(const char *fmt, va_list ap) +{ + vprintf(fmt, ap); + fflush(stdout); +} + +int bh_fprintf(FILE *stream, const char *fmt, ...) +{ + int ret; + va_list ap; + va_start(ap, fmt); + ret = vfprintf(stream ? stream : stdout, fmt, ap); + va_end(ap); + return ret; +} + +int bh_fflush(void *stream) +{ + return fflush(stream ? stream : stdout); +} diff --git a/core/shared-lib/platform/win32/bh_thread.c b/core/shared-lib/platform/win32/bh_thread.c new file mode 100755 index 000000000..ab7e783b5 --- /dev/null +++ b/core/shared-lib/platform/win32/bh_thread.c @@ -0,0 +1,342 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_thread.h" +#include "bh_assert.h" +#include "bh_log.h" +#include "bh_memory.h" + +#include +#include + +#ifdef _DEBUG +#define THREAD_STACK_ADJUSTMENT (32 * 1024) +#else +#define THREAD_STACK_ADJUSTMENT 0 +#endif + +static korp_mutex thread_list_lock; +static DWORD tls_indexes[BH_MAX_TLS_NUM]; + +typedef struct { + int zero_padding; + thread_start_routine_t start; + void* stack; + void* args; + int stack_size; +} vm_thread_block; + +static DWORD tb_index; + +int _vm_thread_sys_init() +{ + unsigned int i; + for (i = 0; i < BH_MAX_TLS_NUM; i++) { + tls_indexes[i] = TlsAlloc(); + if (tls_indexes[i] == TLS_OUT_OF_INDEXES) + return BHT_ERROR; + } + + tb_index = TlsAlloc(); + if (tb_index == TLS_OUT_OF_INDEXES) + return BHT_ERROR; + + return vm_mutex_init(&thread_list_lock); +} + +static unsigned int BH_ROUTINE_MODIFIER beihai_starter(void* arg) +{ + vm_thread_block* tb = (vm_thread_block*) arg; + TlsSetValue(tb_index, tb); + tb->stack = (void *) &arg; + tb->start(tb->args); + + return 0; +} + +int _vm_thread_create(korp_tid *tid, thread_start_routine_t start, void *arg, + unsigned int stack_size) +{ + unsigned int default_stack_size = 20 * 1024; + vm_thread_block* tb; + bh_assert(tid); + bh_assert(start); + + if (stack_size == 0) + stack_size = default_stack_size; + +#ifdef _DEBUG + stack_size = THREAD_STACK_ADJUSTMENT + stack_size*3; +#endif + + tb = (vm_thread_block*) bh_malloc(sizeof(*tb)); + if (tb == NULL) + return BHT_ERROR; + + memset(tb, 0, sizeof(*tb)); + + tb->start = start; + tb->stack_size = stack_size; + tb->args = arg; + + *tid = (korp_tid) _beginthreadex(NULL, stack_size, beihai_starter, + (void*) tb, 0, NULL); + + /* TODO: to deal with the handle; how to close it? */ + return (*tid == INVALID_THREAD_ID) ? BHT_ERROR : BHT_OK; +} + +korp_tid _vm_self_thread() +{ + return (korp_tid) GetCurrentThread(); +} + +void vm_thread_exit(void *code) +{ + vm_thread_block *tb = (vm_thread_block*) TlsGetValue(tb_index); + bh_free(tb); + _endthreadex((unsigned int) code); +} + +void* vm_get_stackaddr() +{ + vm_thread_block *tb = (vm_thread_block*) TlsGetValue(tb_index); + return (char *) tb->stack + THREAD_STACK_ADJUSTMENT - tb->stack_size; +} + +void *_vm_tls_get(unsigned idx) +{ + bh_assert(idx < BH_MAX_TLS_NUM); + return TlsGetValue(tls_indexes[idx]); +} + +int _vm_tls_put(unsigned idx, void *tls) +{ + BOOL r; + + bh_assert(idx < BH_MAX_TLS_NUM); + r = TlsSetValue(tls_indexes[idx], tls); + return (r == FALSE) ? BHT_ERROR : BHT_OK; +} + +int _vm_mutex_init(korp_mutex *mutex) +{ + bh_assert(mutex); + *mutex = CreateMutex(NULL, FALSE, NULL); + return (*mutex == 0) ? BHT_ERROR : BHT_OK; +} + +int _vm_mutex_destroy(korp_mutex *mutex) +{ + return BHT_OK; +} + +/* Returned error (e.g. ERROR_INVALID_HANDLE) from + locking the mutex indicates some logic error present in + the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_lock(korp_mutex *mutex) +{ + DWORD ret; + + bh_assert(mutex); + ret = WaitForSingleObject(*mutex, INFINITE); + if (WAIT_FAILED == ret) { + LOG_FATAL("vm mutex lock failed (ret=%d)!\n", GetLastError()); + exit(-1); + } +} + +int vm_mutex_trylock(korp_mutex *mutex) +{ + DWORD ret; + + bh_assert(mutex); + ret = WaitForSingleObject(*mutex, 0); + if (WAIT_FAILED == ret) { + LOG_FATAL("vm mutex lock failed (ret=%d)!\n", GetLastError()); + exit(-1); + } + return ret == WAIT_OBJECT_0 ? BHT_OK : BHT_ERROR; +} + +/* Returned error (e.g. ERROR_INVALID_HANDLE) from + unlocking the mutex indicates some logic error present + in the program somewhere. + Don't try to recover error for an existing unknown error.*/ +void vm_mutex_unlock(korp_mutex *mutex) +{ + BOOL ret; + + bh_assert(mutex); + ret = ReleaseMutex(*mutex); + if (FALSE == ret) { + LOG_FATAL("vm mutex unlock failed (ret=%d)!\n", GetLastError()); + exit(-1); + } +} + +#define BH_SEM_COUNT_MAX 0xFFFF + +int _vm_sem_init(korp_sem *sem, unsigned int count) +{ + bh_assert(sem); + bh_assert(count <= BH_SEM_COUNT_MAX); + *sem = CreateSemaphore(NULL, count, BH_SEM_COUNT_MAX, NULL); + + return (*sem == NULL) ? BHT_ERROR : BHT_OK; +} + +int _vm_sem_destroy(korp_sem *sem) +{ + return BHT_OK; +} + +int _vm_sem_P(korp_sem *sem) +{ + DWORD r; + bh_assert(sem); + r = WaitForSingleObject(*sem, INFINITE); + + return (r == WAIT_FAILED) ? BHT_ERROR : BHT_OK; +} + +int _vm_sem_reltimedP(korp_sem *sem, int mills) +{ + DWORD r; + bh_assert(sem); + + if (mills == BHT_WAIT_FOREVER) + mills = INFINITE; + + r = WaitForSingleObject(*sem, (unsigned int) mills); + + switch (r) { + case WAIT_OBJECT_0: + return BHT_OK; + case WAIT_TIMEOUT: + return BHT_TIMEDOUT; + default: + return BHT_ERROR; + } +} + +int _vm_sem_V(korp_sem *sem) +{ + BOOL r; + bh_assert(sem); + r = ReleaseSemaphore(*sem, 1, NULL); + return (r == FALSE) ? BHT_ERROR : BHT_OK; +} + +int _vm_cond_init(korp_cond *cond) +{ + bh_assert(cond); + cond->waiting_count = 0; + return vm_sem_init(&cond->s, 0); +} + +int _vm_cond_destroy(korp_cond *cond) +{ + bh_assert(cond); + return vm_sem_destroy(&cond->s); +} + +int _vm_cond_wait(korp_cond *cond, korp_mutex *mutex) +{ + bh_assert(cond); + bh_assert(mutex); + + cond->waiting_count++; + + vm_mutex_unlock(mutex); + + if (vm_sem_P(&cond->s) != BHT_OK) + return BHT_ERROR; + + vm_mutex_lock(mutex); + + cond->waiting_count--; + + return BHT_OK; +} + +int _vm_cond_reltimedwait(korp_cond *cond, korp_mutex *mutex, int mills) +{ + int r; + + bh_assert(cond); + bh_assert(mutex); + + cond->waiting_count++; + + vm_mutex_unlock(mutex); + + r = vm_sem_reltimedP(&cond->s, mills); + + if ((r != BHT_OK) && (r != BHT_TIMEDOUT)) + return BHT_ERROR; + + vm_mutex_lock(mutex); + + cond->waiting_count--; + + return r; +} + +int _vm_cond_signal(korp_cond *cond) +{ + bh_assert(cond); + + if (cond->waiting_count == 0) + return BHT_OK; + + if (vm_sem_V(&cond->s) != BHT_OK) + return BHT_ERROR; + + return BHT_OK; +} + +int _vm_cond_broadcast(korp_cond *cond) +{ + /* FIXME: use pthread's API to implement this and above + functions. */ + + unsigned count = cond->waiting_count; + + for (; count > 0; count--) + vm_sem_V(&cond->s); + + return BHT_OK; +} + +int _vm_thread_cancel(korp_tid thread) +{ + /* FIXME: implement this with Windows API. */ + return 0; +} + +int _vm_thread_join(korp_tid thread, void **value_ptr) +{ + /* FIXME: implement this with Windows API. */ + return 0; +} + +int _vm_thread_detach(korp_tid thread) +{ + /* FIXME: implement this with Windows API. */ + return 0; +} diff --git a/core/shared-lib/platform/win32/bh_time.c b/core/shared-lib/platform/win32/bh_time.c new file mode 100755 index 000000000..c8d426c4d --- /dev/null +++ b/core/shared-lib/platform/win32/bh_time.c @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "bh_time.h" + +#include +#include + +/* Since GetTickCount64 is not supported on Windows XP, use a temporary method + * to solve the issue. However, GetTickCount return a DWORD value and overflow + * may happen (http://msdn.microsoft.com/en-us/library/ms724408(v=vs.85).aspx). + * + * TODO: Implement GetTickCount64 on Windows XP by self or check overflow issues. + */ +#if (WINVER >= 0x0600) +extern uint64 __stdcall GetTickCount64(void); +#else +extern uint32 __stdcall GetTickCount(void); +#endif + +/* + * This function returns milliseconds per tick. + * @return milliseconds per tick. + */ +uint64 _bh_time_get_tick_millisecond() +{ + return 5; +} + +/* + * This function returns milliseconds after boot. + * @return milliseconds after boot. + */ +uint64 _bh_time_get_boot_millisecond() +{ + /* Since GetTickCount64 is not supported on Windows XP, use a temporary method + * to solve the issue. However, GetTickCount return a DWORD value and overflow + * may happen (http://msdn.microsoft.com/en-us/library/ms724408(v=vs.85).aspx). + * + * TODO: Implement GetTickCount64 on Windows XP by self or check overflow issues. + */ +#if (WINVER >= 0x0600) + return GetTickCount64(); +#else + return GetTickCount(); +#endif +} + +/* + * This function returns GMT time milliseconds since from 1970.1.1, AKA UNIX time. + * @return milliseconds since from 1970.1.1. + */ +uint64 _bh_time_get_millisecond_from_1970() +{ + struct timeb tp; + ftime(&tp); + + return ((uint64) tp.time) * 1000 + tp.millitm + - (tp.dstflag == 0 ? 0 : 60 * 60 * 1000) + tp.timezone * 60 * 1000; +} + +size_t bh_time_strftime(char *s, size_t max, const char *format, int64 time) +{ + time_t time_sec = time / 1000; + struct timeb tp; + struct tm local_time; + + if (NULL == s) + return 0; + + ftime(&tp); + time_sec -= tp.timezone * 60; + if (localtime_s(&local_time, &time_sec) != 0) + return 0; + + return strftime(s, max, format, &local_time); +} + +int bh_time_get(uint8 *timeoff_info, int16 timeoff_info_len, uint32* time) +{ + return BH_UNIMPLEMENTED; +} + +int bh_time_set(uint32 ntp, uint8 *timeoff_info) +{ + return BH_UNIMPLEMENTED; +} diff --git a/core/shared-lib/platform/zephyr/Makefile b/core/shared-lib/platform/zephyr/Makefile new file mode 100644 index 000000000..4528ff531 --- /dev/null +++ b/core/shared-lib/platform/zephyr/Makefile @@ -0,0 +1,15 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +obj-y += bh_assert.o bh_definition.o bh_memory.o bh_platform_log.o bh_thread.o bh_time.o diff --git a/core/shared-lib/platform/zephyr/bh_assert.c b/core/shared-lib/platform/zephyr/bh_assert.c new file mode 100644 index 000000000..121adddfd --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_assert.c @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include "bh_assert.h" +#include +#include +#include + +#ifdef BH_TEST +#include +#endif + +#ifdef BH_TEST +/* for exception throwing */ +jmp_buf bh_test_jb; +#endif +extern void abort(void); +void bh_assert_internal(int v, const char *file_name, int line_number, + const char *expr_string) +{ + if (v) + return; + + if (!file_name) + file_name = "NULL FILENAME"; + if (!expr_string) + expr_string = "NULL EXPR_STRING"; + + printk("\nASSERTION FAILED: %s, at FILE=%s, LINE=%d\n", expr_string, + file_name, line_number); + +#ifdef BH_TEST + longjmp(bh_test_jb, 1); +#endif + + abort(); +} + +void bh_debug_internal(const char *file_name, int line_number, const char *fmt, + ...) +{ +#ifndef JEFF_TEST_VERIFIER + va_list args; + + va_start(args, fmt); + bh_assert(file_name); + + printf("\nDebug info FILE=%s, LINE=%d: ", file_name, line_number); + vprintf(fmt, args); + + va_end(args); + printf("\n"); +#endif +} + diff --git a/core/shared-lib/platform/zephyr/bh_definition.c b/core/shared-lib/platform/zephyr/bh_definition.c new file mode 100644 index 000000000..0c9d3fc6c --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_definition.c @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_definition.h" +#include "bh_platform.h" + +int bh_return(int ret) +{ + return ret; +} + +#define RSIZE_MAX 0x7FFFFFFF +int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, unsigned int n) +{ + char *dest = (char*) s1; + char *src = (char*) s2; + if (n == 0) { + return 0; + } + + if (s1 == NULL || s1max > RSIZE_MAX) { + return -1; + } + if (s2 == NULL || n > s1max) { + memset(dest, 0, s1max); + return -1; + } + memcpy(dest, src, n); + return 0; +} + +int b_strcat_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s1) + strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcat(s1, s2); + + return 0; +} + +int b_strcpy_s(char * s1, size_t s1max, const char * s2) +{ + if (NULL + == s1|| NULL == s2 || s1max < (strlen(s2) + 1) || s1max > RSIZE_MAX) { + return -1; + } + + strcpy(s1, s2); + + return 0; +} + diff --git a/core/shared-lib/platform/zephyr/bh_platform.c b/core/shared-lib/platform/zephyr/bh_platform.c new file mode 100755 index 000000000..fe05e8bd1 --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_platform.c @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include +#include + +char *bh_strdup(const char *s) +{ + char *s1 = NULL; + if (s && (s1 = bh_malloc(strlen(s) + 1))) + memcpy(s1, s, strlen(s) + 1); + return s1; +} diff --git a/core/shared-lib/platform/zephyr/bh_platform.h b/core/shared-lib/platform/zephyr/bh_platform.h new file mode 100644 index 000000000..4e22d9049 --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_platform.h @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _BH_PLATFORM_H +#define _BH_PLATFORM_H + +#include "bh_config.h" +#include "bh_types.h" +#include "bh_memory.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef CONFIG_NET_BUF_USER_DATA_SIZE +#define CONFIG_NET_BUF_USER_DATA_SIZE 0 +#endif +#include +#include +#include +#include + +/* Platform name */ +#define BH_PLATFORM "Zephyr" + +#define BH_APPLET_PRESERVED_STACK_SIZE (2 * BH_KB) + +/* Default thread priority */ +#define BH_THREAD_DEFAULT_PRIORITY 7 + +#define BH_ROUTINE_MODIFIER + +/* Invalid thread tid */ +#define INVALID_THREAD_ID NULL + +#define INVALID_SEM_ID SEM_FAILED +#define BH_WAIT_FOREVER K_FOREVER + +typedef uint64_t uint64; +typedef int64_t int64; + +typedef struct k_thread korp_thread; +typedef korp_thread *korp_tid; +typedef struct k_mutex korp_mutex; +typedef struct k_sem korp_sem; + +#define wa_malloc bh_malloc +#define wa_free bh_free +#define wa_strdup bh_strdup + +struct bh_thread_wait_node; +typedef struct bh_thread_wait_node *bh_thread_wait_list; +typedef struct korp_cond { + struct k_mutex wait_list_lock; + bh_thread_wait_list thread_wait_list; +} korp_cond; + +typedef void* (*thread_start_routine_t)(void*); + +#define wa_malloc bh_malloc +#define wa_free bh_free + +/* Unit test framework is based on C++, where the declaration of + snprintf is different. */ +#ifndef __cplusplus +int snprintf(char *buffer, size_t count, const char *format, ...); +#endif + +#ifndef NULL +#define NULL ((void*)0) +#endif + +#define bh_assert(x) \ + do { \ + if (!(x)) { \ + printk("bh_assert(%s, %d)\n", __func__, __LINE__);\ + } \ + } while (0) + +extern int b_memcpy_s(void * s1, unsigned int s1max, const void * s2, + unsigned int n); +extern int b_strcat_s(char * s1, size_t s1max, const char * s2); +extern int b_strcpy_s(char * s1, size_t s1max, const char * s2); + +#endif diff --git a/core/shared-lib/platform/zephyr/bh_platform_log.c b/core/shared-lib/platform/zephyr/bh_platform_log.c new file mode 100644 index 000000000..c418cd819 --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_platform_log.c @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_platform.h" +#include + +struct out_context { + int count; +}; + +typedef int (*out_func_t)(int c, void *ctx); + +extern void *__printk_get_hook(void); +static int (*_char_out)(int) = NULL; + +static int char_out(int c, struct out_context *ctx) +{ + ctx->count++; + if (_char_out == NULL) { + _char_out = __printk_get_hook(); + } + return _char_out(c); +} + +static int bh_vprintk(const char *fmt, va_list ap) +{ + struct out_context ctx = { 0 }; + _vprintk((out_func_t) char_out, &ctx, fmt, ap); + return ctx.count; +} + +void bh_log_emit(const char *fmt, va_list ap) +{ + bh_vprintk(fmt, ap); +} + +int bh_fprintf(FILE *stream, const char *fmt, ...) +{ + (void) stream; + va_list ap; + int ret; + + va_start(ap, fmt); + ret = bh_vprintk(fmt, ap); + va_end(ap); + + return ret; +} + +int bh_fflush(void *stream) +{ + (void) stream; + return 0; +} + diff --git a/core/shared-lib/platform/zephyr/bh_thread.c b/core/shared-lib/platform/zephyr/bh_thread.c new file mode 100755 index 000000000..99dd1a246 --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_thread.c @@ -0,0 +1,537 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_thread.h" +#include "bh_assert.h" +#include "bh_log.h" +#include "bh_memory.h" +#include +#include + +typedef struct bh_thread_wait_node { + struct k_sem sem; + bh_thread_wait_list next; +} bh_thread_wait_node; + +typedef struct bh_thread_data { + /* Next thread data */ + struct bh_thread_data *next; + /* Zephyr thread handle */ + korp_tid tid; + /* Jeff thread local root */ + void *tlr; + /* Lock for waiting list */ + struct k_mutex wait_list_lock; + /* Waiting list of other threads who are joining this thread */ + bh_thread_wait_list thread_wait_list; + /* Thread stack size */ + unsigned stack_size; + /* Thread stack */ + char stack[1]; +} bh_thread_data; + +typedef struct bh_thread_obj { + struct k_thread thread; + /* Whether the thread is terminated and this thread object is to + be freed in the future. */ + bool to_be_freed; + struct bh_thread_obj *next; +} bh_thread_obj; + +static bool is_thread_sys_inited = false; + +/* Thread data of supervisor thread */ +static bh_thread_data supervisor_thread_data; + +/* Lock for thread data list */ +static struct k_mutex thread_data_lock; + +/* Thread data list */ +static bh_thread_data *thread_data_list = NULL; + +/* Lock for thread object list */ +static struct k_mutex thread_obj_lock; + +/* Thread object list */ +static bh_thread_obj *thread_obj_list = NULL; + +static void thread_data_list_add(bh_thread_data *thread_data) +{ + k_mutex_lock(&thread_data_lock, K_FOREVER); + if (!thread_data_list) + thread_data_list = thread_data; + else { + /* If already in list, just return */ + bh_thread_data *p = thread_data_list; + while (p) { + if (p == thread_data) { + k_mutex_unlock(&thread_data_lock); + return; + } + p = p->next; + } + + /* Set as head of list */ + thread_data->next = thread_data_list; + thread_data_list = thread_data; + } + k_mutex_unlock(&thread_data_lock); +} + +static void thread_data_list_remove(bh_thread_data *thread_data) +{ + k_mutex_lock(&thread_data_lock, K_FOREVER); + if (thread_data_list) { + if (thread_data_list == thread_data) + thread_data_list = thread_data_list->next; + else { + /* Search and remove it from list */ + bh_thread_data *p = thread_data_list; + while (p && p->next != thread_data) + p = p->next; + if (p && p->next == thread_data) + p->next = p->next->next; + } + } + k_mutex_unlock(&thread_data_lock); +} + +static bh_thread_data * +thread_data_list_lookup(k_tid_t tid) +{ + k_mutex_lock(&thread_data_lock, K_FOREVER); + if (thread_data_list) { + bh_thread_data *p = thread_data_list; + while (p) { + if (p->tid == tid) { + /* Found */ + k_mutex_unlock(&thread_data_lock); + return p; + } + p = p->next; + } + } + k_mutex_unlock(&thread_data_lock); + return NULL; +} + +static void thread_obj_list_add(bh_thread_obj *thread_obj) +{ + k_mutex_lock(&thread_obj_lock, K_FOREVER); + if (!thread_obj_list) + thread_obj_list = thread_obj; + else { + /* Set as head of list */ + thread_obj->next = thread_obj_list; + thread_obj_list = thread_obj; + } + k_mutex_unlock(&thread_obj_lock); +} + +static void thread_obj_list_reclaim() +{ + bh_thread_obj *p, *p_prev; + k_mutex_lock(&thread_obj_lock, K_FOREVER); + p_prev = NULL; + p = thread_obj_list; + while (p) { + if (p->to_be_freed) { + if (p_prev == NULL) { /* p is the head of list */ + thread_obj_list = p->next; + bh_free(p); + p = thread_obj_list; + } else { /* p is not the head of list */ + p_prev->next = p->next; + bh_free(p); + p = p_prev->next; + } + } else { + p_prev = p; + p = p->next; + } + } + k_mutex_unlock(&thread_obj_lock); +} + +int _vm_thread_sys_init() +{ + if (is_thread_sys_inited) + return BHT_OK; + + k_mutex_init(&thread_data_lock); + k_mutex_init(&thread_obj_lock); + + /* Initialize supervisor thread data */ + memset(&supervisor_thread_data, 0, sizeof(supervisor_thread_data)); + supervisor_thread_data.tid = k_current_get(); + /* Set as head of thread data list */ + thread_data_list = &supervisor_thread_data; + + is_thread_sys_inited = true; + return BHT_OK; +} + +void vm_thread_sys_destroy(void) +{ + if (is_thread_sys_inited) { + is_thread_sys_inited = false; + } +} + +static bh_thread_data * +thread_data_current() +{ + k_tid_t tid = k_current_get(); + return thread_data_list_lookup(tid); +} + +static void vm_thread_cleanup(void) +{ + bh_thread_data *thread_data = thread_data_current(); + + bh_assert(thread_data != NULL); + k_mutex_lock(&thread_data->wait_list_lock, K_FOREVER); + if (thread_data->thread_wait_list) { + /* Signal each joining thread */ + bh_thread_wait_list head = thread_data->thread_wait_list; + while (head) { + bh_thread_wait_list next = head->next; + k_sem_give(&head->sem); + bh_free(head); + head = next; + } + thread_data->thread_wait_list = NULL; + } + k_mutex_unlock(&thread_data->wait_list_lock); + + thread_data_list_remove(thread_data); + /* Set flag to true for the next thread creating to + free the thread object */ + ((bh_thread_obj*) thread_data->tid)->to_be_freed = true; + bh_free(thread_data); +} + +static void vm_thread_wrapper(void *start, void *arg, void *thread_data) +{ + /* Set thread custom data */ + ((bh_thread_data*) thread_data)->tid = k_current_get(); + thread_data_list_add(thread_data); + + ((thread_start_routine_t) start)(arg); + vm_thread_cleanup(); +} + +int _vm_thread_create(korp_tid *p_tid, thread_start_routine_t start, void *arg, + unsigned int stack_size) +{ + return _vm_thread_create_with_prio(p_tid, start, arg, stack_size, + BH_THREAD_DEFAULT_PRIORITY); +} + +int _vm_thread_create_with_prio(korp_tid *p_tid, thread_start_routine_t start, + void *arg, unsigned int stack_size, int prio) +{ + korp_tid tid; + bh_thread_data *thread_data; + unsigned thread_data_size; + + if (!p_tid || !stack_size) + return BHT_ERROR; + + /* Free the thread objects of terminated threads */ + thread_obj_list_reclaim(); + + /* Create and initialize thread object */ + if (!(tid = bh_malloc(sizeof(bh_thread_obj)))) + return BHT_ERROR; + + memset(tid, 0, sizeof(bh_thread_obj)); + + /* Create and initialize thread data */ + thread_data_size = offsetof(bh_thread_data, stack) + stack_size; + if (!(thread_data = bh_malloc(thread_data_size))) { + bh_free(tid); + return BHT_ERROR; + } + + memset(thread_data, 0, thread_data_size); + k_mutex_init(&thread_data->wait_list_lock); + thread_data->stack_size = stack_size; + thread_data->tid = tid; + + /* Create the thread */ + if (!((tid = k_thread_create(tid, (k_thread_stack_t *) thread_data->stack, + stack_size, vm_thread_wrapper, start, arg, thread_data, prio, 0, + K_NO_WAIT)))) { + bh_free(tid); + bh_free(thread_data); + return BHT_ERROR; + } + + bh_assert(tid == thread_data->tid); + + /* Set thread custom data */ + thread_data_list_add(thread_data); + thread_obj_list_add((bh_thread_obj*) tid); + *p_tid = tid; + return BHT_OK; +} + +korp_tid _vm_self_thread() +{ + return (korp_tid) k_current_get(); +} + +void vm_thread_exit(void * code) +{ + (void) code; + korp_tid self = vm_self_thread(); + vm_thread_cleanup(); + k_thread_abort((k_tid_t) self); +} + +int _vm_thread_cancel(korp_tid thread) +{ + k_thread_abort((k_tid_t) thread); + return 0; +} + +int _vm_thread_join(korp_tid thread, void **value_ptr, int mills) +{ + (void) value_ptr; + bh_thread_data *thread_data; + bh_thread_wait_node *node; + + /* Create wait node and append it to wait list */ + if (!(node = bh_malloc(sizeof(bh_thread_wait_node)))) + return BHT_ERROR; + + k_sem_init(&node->sem, 0, 1); + node->next = NULL; + + /* Get thread data */ + thread_data = thread_data_list_lookup(thread); + bh_assert(thread_data != NULL); + + k_mutex_lock(&thread_data->wait_list_lock, K_FOREVER); + if (!thread_data->thread_wait_list) + thread_data->thread_wait_list = node; + else { + /* Add to end of waiting list */ + bh_thread_wait_node *p = thread_data->thread_wait_list; + while (p->next) + p = p->next; + p->next = node; + } + k_mutex_unlock(&thread_data->wait_list_lock); + + /* Wait the sem */ + k_sem_take(&node->sem, mills); + + /* Wait some time for the thread to be actually terminated */ + k_sleep(100); + + return BHT_OK; +} + +int _vm_thread_detach(korp_tid thread) +{ + (void) thread; + return BHT_OK; +} + +void *_vm_tls_get(unsigned idx) +{ + (void) idx; + bh_thread_data *thread_data; + + bh_assert(idx == 0); + thread_data = thread_data_current(); + + return thread_data ? thread_data->tlr : NULL; +} + +int _vm_tls_put(unsigned idx, void * tls) +{ + bh_thread_data *thread_data; + + (void) idx; + bh_assert(idx == 0); + thread_data = thread_data_current(); + bh_assert(thread_data != NULL); + + thread_data->tlr = tls; + return BHT_OK; +} + +int _vm_mutex_init(korp_mutex *mutex) +{ + (void) mutex; + k_mutex_init(mutex); + return BHT_OK; +} + +int _vm_recursive_mutex_init(korp_mutex *mutex) +{ + k_mutex_init(mutex); + return BHT_OK; +} + +int _vm_mutex_destroy(korp_mutex *mutex) +{ + (void) mutex; + return BHT_OK; +} + +void vm_mutex_lock(korp_mutex *mutex) +{ + k_mutex_lock(mutex, K_FOREVER); +} + +int vm_mutex_trylock(korp_mutex *mutex) +{ + return k_mutex_lock(mutex, K_NO_WAIT); +} + +void vm_mutex_unlock(korp_mutex *mutex) +{ + k_mutex_unlock(mutex); +} + +int _vm_sem_init(korp_sem* sem, unsigned int c) +{ + k_sem_init(sem, 0, c); + return BHT_OK; +} + +int _vm_sem_destroy(korp_sem *sem) +{ + (void) sem; + return BHT_OK; +} + +int _vm_sem_wait(korp_sem *sem) +{ + return k_sem_take(sem, K_FOREVER); +} + +int _vm_sem_reltimedwait(korp_sem *sem, int mills) +{ + return k_sem_take(sem, mills); +} + +int _vm_sem_post(korp_sem *sem) +{ + k_sem_give(sem); + return BHT_OK; +} + +int _vm_cond_init(korp_cond *cond) +{ + k_mutex_init(&cond->wait_list_lock); + cond->thread_wait_list = NULL; + return BHT_OK; +} + +int _vm_cond_destroy(korp_cond *cond) +{ + (void) cond; + return BHT_OK; +} + +static int _vm_cond_wait_internal(korp_cond *cond, korp_mutex *mutex, + bool timed, int mills) +{ + bh_thread_wait_node *node; + + /* Create wait node and append it to wait list */ + if (!(node = bh_malloc(sizeof(bh_thread_wait_node)))) + return BHT_ERROR; + + k_sem_init(&node->sem, 0, 1); + node->next = NULL; + + k_mutex_lock(&cond->wait_list_lock, K_FOREVER); + if (!cond->thread_wait_list) + cond->thread_wait_list = node; + else { + /* Add to end of wait list */ + bh_thread_wait_node *p = cond->thread_wait_list; + while (p->next) + p = p->next; + p->next = node; + } + k_mutex_unlock(&cond->wait_list_lock); + + /* Unlock mutex, wait sem and lock mutex again */ + k_mutex_unlock(mutex); + k_sem_take(&node->sem, timed ? mills : K_FOREVER); + k_mutex_lock(mutex, K_FOREVER); + + /* Remove wait node from wait list */ + k_mutex_lock(&cond->wait_list_lock, K_FOREVER); + if (cond->thread_wait_list == node) + cond->thread_wait_list = node->next; + else { + /* Remove from the wait list */ + bh_thread_wait_node *p = cond->thread_wait_list; + while (p->next != node) + p = p->next; + p->next = node->next; + } + bh_free(node); + k_mutex_unlock(&cond->wait_list_lock); + + return BHT_OK; +} + +int _vm_cond_wait(korp_cond *cond, korp_mutex *mutex) +{ + return _vm_cond_wait_internal(cond, mutex, false, 0); +} + +int _vm_cond_reltimedwait(korp_cond *cond, korp_mutex *mutex, int mills) +{ + return _vm_cond_wait_internal(cond, mutex, true, mills); +} + +int _vm_cond_signal(korp_cond *cond) +{ + /* Signal the head wait node of wait list */ + k_mutex_lock(&cond->wait_list_lock, K_FOREVER); + if (cond->thread_wait_list) + k_sem_give(&cond->thread_wait_list->sem); + k_mutex_unlock(&cond->wait_list_lock); + + return BHT_OK; +} + +int _vm_cond_broadcast(korp_cond *cond) +{ + /* Signal each wait node of wait list */ + k_mutex_lock(&cond->wait_list_lock, K_FOREVER); + if (cond->thread_wait_list) { + bh_thread_wait_node *p = cond->thread_wait_list; + while (p) { + k_sem_give(&p->sem); + p = p->next; + } + } + k_mutex_unlock(&cond->wait_list_lock); + + return BHT_OK; +} + diff --git a/core/shared-lib/platform/zephyr/bh_time.c b/core/shared-lib/platform/zephyr/bh_time.c new file mode 100755 index 000000000..9fe2bdbb8 --- /dev/null +++ b/core/shared-lib/platform/zephyr/bh_time.c @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_time.h" + +/* + * This function returns milliseconds per tick. + * @return milliseconds per tick. + */ +uint64 _bh_time_get_tick_millisecond() +{ + return k_uptime_get_32(); +} + +/* + * This function returns milliseconds after boot. + * @return milliseconds after boot. + */ +uint64 _bh_time_get_boot_millisecond() +{ + return k_uptime_get_32(); +} + +uint64 _bh_time_get_millisecond_from_1970() +{ + return k_uptime_get(); +} + +size_t _bh_time_strftime(char *str, size_t max, const char *format, int64 time) +{ + (void) format; + (void) time; + uint32 t = k_uptime_get_32(); + int h, m, s; + + t = t % (24 * 60 * 60); + h = t / (60 * 60); + t = t % (60 * 60); + m = t / 60; + s = t % 60; + + return snprintf(str, max, "%02d:%02d:%02d", h, m, s); +} + diff --git a/core/shared-lib/platform/zephyr/shared_platform.cmake b/core/shared-lib/platform/zephyr/shared_platform.cmake new file mode 100644 index 000000000..102ec9c78 --- /dev/null +++ b/core/shared-lib/platform/zephyr/shared_platform.cmake @@ -0,0 +1,24 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (PLATFORM_SHARED_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${PLATFORM_SHARED_DIR}) +include_directories(${PLATFORM_SHARED_DIR}/../include) + + +file (GLOB_RECURSE source_all ${PLATFORM_SHARED_DIR}/*.c) + +set (PLATFORM_SHARED_SOURCE ${source_all}) + diff --git a/core/shared-lib/shared_lib.cmake b/core/shared-lib/shared_lib.cmake new file mode 100644 index 000000000..7c131940e --- /dev/null +++ b/core/shared-lib/shared_lib.cmake @@ -0,0 +1,17 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include (${CMAKE_CURRENT_LIST_DIR}/utils/shared_utils.cmake) +include (${CMAKE_CURRENT_LIST_DIR}/mem-alloc/mem_alloc.cmake) +include (${CMAKE_CURRENT_LIST_DIR}/platform/${PLATFORM}/shared_platform.cmake) diff --git a/core/shared-lib/utils/CMakeLists.txt b/core/shared-lib/utils/CMakeLists.txt new file mode 100644 index 000000000..1f2e561c7 --- /dev/null +++ b/core/shared-lib/utils/CMakeLists.txt @@ -0,0 +1,21 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include_directories (. ../include ../platform/include ../platform/${PLATFORM} coap/er-coap coap/extension) + + +file (GLOB_RECURSE source_all *.c ) + +add_library (vmutilslib ${source_all}) + diff --git a/core/shared-lib/utils/Makefile b/core/shared-lib/utils/Makefile new file mode 100644 index 000000000..0a2104cff --- /dev/null +++ b/core/shared-lib/utils/Makefile @@ -0,0 +1,16 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +obj-y += bh_list.o bh_log.o attr-container.o bh_queue.o +obj-y += coap/ diff --git a/core/shared-lib/utils/bh_list.c b/core/shared-lib/utils/bh_list.c new file mode 100644 index 000000000..0c15ff513 --- /dev/null +++ b/core/shared-lib/utils/bh_list.c @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_list.h" +#include "bh_assert.h" + +#ifdef BH_DEBUG +/** + * Test whehter a pointer value has exist in given list. + * + * @param list pointer to list. + * @param elem pointer to elem that will be inserted into list. + * @return true if the pointer has been in the list; + * false otherwise. + */ +BH_STATIC bool bh_list_is_elem_exist(bh_list *list, void *elem); +#endif + +bh_list_status bh_list_init(bh_list *list) +{ + if (!list) + return BH_LIST_ERROR; + + (list->head).next = NULL; + list->len = 0; + return BH_LIST_SUCCESS; +} + +bh_list_status _bh_list_insert(bh_list *list, void *elem) +{ + bh_list_link *p = NULL; + + if (!list || !elem) + return BH_LIST_ERROR; +#ifdef BH_DEBUG + bh_assert (!bh_list_is_elem_exist(list, elem)); +#endif + p = (bh_list_link *) elem; + p->next = (list->head).next; + (list->head).next = p; + list->len++; + return BH_LIST_SUCCESS; +} + +bh_list_status bh_list_remove(bh_list *list, void *elem) +{ + bh_list_link *cur = NULL; + bh_list_link *prev = NULL; + + if (!list || !elem) + return BH_LIST_ERROR; + + cur = (list->head).next; + + while (cur) { + if (cur == elem) { + if (prev) + prev->next = cur->next; + else + (list->head).next = cur->next; + + list->len--; + return BH_LIST_SUCCESS; + } + + prev = cur; + cur = cur->next; + } + + return BH_LIST_ERROR; +} + +uint32 bh_list_length(bh_list *list) +{ + return (list ? list->len : 0); +} + +void* bh_list_first_elem(bh_list *list) +{ + return (list ? (list->head).next : NULL); +} + +void* bh_list_elem_next(void *node) +{ + return (node ? ((bh_list_link *) node)->next : NULL); +} + +#ifdef BH_DEBUG +BH_STATIC bool bh_list_is_elem_exist(bh_list *list, void *elem) +{ + bh_list_link *p = NULL; + + if (!list || !elem) return false; + + p = (list->head).next; + while (p && p != elem) p = p->next; + + return (p != NULL); +} +#endif + diff --git a/core/shared-lib/utils/bh_log.c b/core/shared-lib/utils/bh_log.c new file mode 100644 index 000000000..58591fb66 --- /dev/null +++ b/core/shared-lib/utils/bh_log.c @@ -0,0 +1,213 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/** + * @file bh_log.c + * @date Tue Nov 8 18:20:06 2011 + * + * @brief Implementation of Beihai's log system. + */ + +#include "bh_assert.h" +#include "bh_time.h" +#include "bh_thread.h" +#include "bh_log.h" +#include "bh_platform_log.h" + +/** + * The verbose level of the log system. Only those verbose logs whose + * levels are less than or equal to this value are outputed. + */ +static int log_verbose_level; + +/** + * The lock for protecting the global output stream of logs. + */ +static korp_mutex log_stream_lock; + +/** + * The current logging thread that owns the log_stream_lock. + */ +static korp_tid cur_logging_thread = INVALID_THREAD_ID; + +/** + * Whether the currently being printed log is ennabled. + */ +static bool cur_log_enabled; + +int _bh_log_init() +{ + log_verbose_level = 3; + return vm_mutex_init(&log_stream_lock); +} + +void _bh_log_set_verbose_level(int level) +{ + log_verbose_level = level; +} + +void _bh_log_printf(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + _bh_log_vprintf(fmt, ap); + va_end(ap); +} + +/** + * Return true if the given tag is enabled by the configuration. + * + * @param tag the tag (or prefix) of the log message. + * + * @return true if the log should be enabled. + */ +static bool is_log_enabled(const char *tag) +{ + /* Print all non-verbose or verbose logs whose levels are less than + or equal to the configured verbose level. */ + return tag[0] != 'V' || tag[1] - '0' <= log_verbose_level; +} + +/** + * Helper function for converting "..." to va_list. + */ +static void bh_log_emit_helper(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + bh_log_emit(fmt, ap); + va_end(ap); +} + +extern size_t _bh_time_strftime(char *s, size_t max, const char *format, + int64 time); + +void _bh_log_vprintf(const char *fmt, va_list ap) +{ + korp_tid self = vm_self_thread(); + /* Try to own the log stream and start the log output. */ + if (self != cur_logging_thread) { + vm_mutex_lock(&log_stream_lock); + cur_logging_thread = self; + + if (fmt && (cur_log_enabled = is_log_enabled(fmt))) { + char buf[32]; + bh_time_strftime(buf, 32, "%Y-%m-%d %H:%M:%S", + bh_time_get_millisecond_from_1970()); + bh_log_emit_helper("\n[%s - %X]: ", buf, (int) self); + + /* Strip the "Vn." prefix. */ + if (fmt && strlen(fmt) >= 3 && fmt[0] == 'V' && fmt[1] && fmt[2]) + fmt += 3; + } + } + + if (cur_log_enabled && fmt) + bh_log_emit(fmt, ap); +} + +void _bh_log_commit() +{ + if (vm_self_thread() != cur_logging_thread) + /* Ignore the single commit without printing anything. */ + return; + + cur_logging_thread = INVALID_THREAD_ID; + vm_mutex_unlock(&log_stream_lock); +} + +void _bh_log(const char *tag, const char *file, int line, const char *fmt, ...) +{ + va_list ap; + + if (tag) + _bh_log_printf(tag); + + if (file) + _bh_log_printf("%s:%d", file, line); + + va_start(ap, fmt); + _bh_log_vprintf(fmt, ap); + va_end(ap); + + _bh_log_commit(); +} + +#if defined(BH_DEBUG) + +BH_STATIC char com_switchs[LOG_COM_MAX]; /* 0: off; 1: on */ +BH_STATIC char *com_names[LOG_COM_MAX] = {"app_manager", "gc", "hmc", "utils", + "verifier_jeff", "vmcore_jeff"}; + +BH_STATIC int com_find_name(const char **com) +{ + int i; + const char *c, *name; + + for (i = 0; i < LOG_COM_MAX; i++) { + c = *com; + name = com_names[i]; + while (*name != '\0') { + if (*c != *name) + break; + c++; + name++; + } + if (*name == '\0') { + *com = c; + return i; + } + } + + return LOG_COM_MAX; +} + +void log_parse_coms(const char *coms) +{ + int i; + + for (i = LOG_COM_MAX; i--; ) + com_switchs[i] = 0; + + com_switchs[LOG_COM_UTILS] = 1; /* utils is a common part */ + + if (coms == NULL) + return; + + while (*coms != '\0') { + i = com_find_name(&coms); + if (i == LOG_COM_MAX) + break; + com_switchs[i] = 1; + + if (*coms == '\0') + return; + if (*coms != ';') + break; + /* *com == ';' */ + coms++; + } + + /* Log the message without aborting. */ + LOG_DEBUG(LOG_COM_UTILS, "The component names for logging are not right: %s.", coms); +} + +int bh_log_dcom_is_enabled(int component) +{ + return com_switchs[component]; +} + +#endif /* defined(BH_DEBUG) */ + diff --git a/core/shared-lib/utils/bh_queue.c b/core/shared-lib/utils/bh_queue.c new file mode 100644 index 000000000..2fef7ace0 --- /dev/null +++ b/core/shared-lib/utils/bh_queue.c @@ -0,0 +1,258 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "bh_queue.h" +#include "bh_thread.h" +#include "bh_memory.h" +#include "bh_time.h" +#include "bh_common.h" + +typedef struct _bh_queue_node { + struct _bh_queue_node * next; + struct _bh_queue_node * prev; + unsigned short tag; + unsigned long len; + void * body; + bh_msg_cleaner msg_cleaner; +} bh_queue_node; + +struct bh_queue { + bh_queue_mutex queue_lock; + bh_queue_cond queue_wait_cond; + unsigned int cnt; + unsigned int max; + unsigned int drops; + bh_queue_node * head; + bh_queue_node * tail; + + bool exit_loop_run; +}; + +char * bh_message_payload(bh_message_t message) +{ + return message->body; +} + +int bh_message_payload_len(bh_message_t message) +{ + return message->len; +} + +int bh_message_type(bh_message_t message) +{ + return message->tag; +} + +bh_queue * +bh_queue_create() +{ + int ret; + bh_queue *queue = bh_queue_malloc(sizeof(bh_queue)); + + if (queue) { + memset(queue, 0, sizeof(bh_queue)); + queue->max = DEFAULT_QUEUE_LENGTH; + + ret = bh_queue_mutex_init(&queue->queue_lock); + if (ret != 0) { + bh_queue_free(queue); + return NULL; + } + + ret = bh_queue_cond_init(&queue->queue_wait_cond); + if (ret != 0) { + bh_queue_mutex_destroy(&queue->queue_lock); + bh_queue_free(queue); + return NULL; + } + } + + return queue; +} + +void bh_queue_destroy(bh_queue *queue) +{ + bh_queue_node *node; + + if (!queue) + return; + + bh_queue_mutex_lock(&queue->queue_lock); + while (queue->head) { + node = queue->head; + queue->head = node->next; + + bh_free_msg(node); + } + bh_queue_mutex_unlock(&queue->queue_lock); + + bh_queue_cond_destroy(&queue->queue_wait_cond); + bh_queue_mutex_destroy(&queue->queue_lock); + bh_queue_free(queue); +} + +bool bh_post_msg2(bh_queue *queue, bh_queue_node *msg) +{ + if (queue->cnt >= queue->max) { + queue->drops++; + bh_free_msg(msg); + return false; + } + + bh_queue_mutex_lock(&queue->queue_lock); + + if (queue->cnt == 0) { + bh_assert(queue->head == NULL); + bh_assert(queue->tail == NULL); + queue->head = queue->tail = msg; + msg->next = msg->prev = NULL; + queue->cnt = 1; + + bh_queue_cond_signal(&queue->queue_wait_cond); + } else { + msg->next = NULL; + msg->prev = queue->tail; + queue->tail->next = msg; + queue->tail = msg; + queue->cnt++; + } + + bh_queue_mutex_unlock(&queue->queue_lock); + + return true; +} + +bool bh_post_msg(bh_queue *queue, unsigned short tag, void *body, + unsigned int len) +{ + bh_queue_node *msg = bh_new_msg(tag, body, len, NULL); + if (msg == NULL) { + queue->drops++; + if (len != 0 && body) + bh_free(body); + return false; + } + + if (!bh_post_msg2(queue, msg)) { + // bh_post_msg2 already freed the msg for failure + return false; + } + + return true; +} + +bh_queue_node * bh_new_msg(unsigned short tag, void *body, unsigned int len, + void * handler) +{ + bh_queue_node *msg = (bh_queue_node*) bh_queue_malloc( + sizeof(bh_queue_node)); + if (msg == NULL) + return NULL; + memset(msg, 0, sizeof(bh_queue_node)); + msg->len = len; + msg->body = body; + msg->tag = tag; + msg->msg_cleaner = (bh_msg_cleaner) handler; + + return msg; +} + +void bh_free_msg(bh_queue_node *msg) +{ + if (msg->msg_cleaner) { + msg->msg_cleaner(msg->body); + bh_queue_free(msg); + return; + } + + // note: sometime we just use the payload pointer for a integer value + // len!=0 is the only indicator about the body is an allocated buffer. + if (msg->body && msg->len) + bh_queue_free(msg->body); + + bh_queue_free(msg); +} + +bh_message_t bh_get_msg(bh_queue *queue, int timeout) +{ + bh_queue_node *msg = NULL; + bh_queue_mutex_lock(&queue->queue_lock); + + if (queue->cnt == 0) { + bh_assert(queue->head == NULL); + bh_assert(queue->tail == NULL); + + if (timeout == 0) { + bh_queue_mutex_unlock(&queue->queue_lock); + return NULL; + } + + bh_queue_cond_timedwait(&queue->queue_wait_cond, &queue->queue_lock, + timeout); + } + + if (queue->cnt == 0) { + bh_assert(queue->head == NULL); + bh_assert(queue->tail == NULL); + } else if (queue->cnt == 1) { + bh_assert(queue->head == queue->tail); + + msg = queue->head; + queue->head = queue->tail = NULL; + queue->cnt = 0; + } else { + msg = queue->head; + queue->head = queue->head->next; + queue->head->prev = NULL; + queue->cnt--; + } + + bh_queue_mutex_unlock(&queue->queue_lock); + + return msg; +} + +unsigned bh_queue_get_message_count(bh_queue *queue) +{ + if (!queue) + return 0; + + return queue->cnt; +} + +void bh_queue_enter_loop_run(bh_queue *queue, + bh_queue_handle_msg_callback handle_cb) +{ + if (!queue) + return; + + while (!queue->exit_loop_run) { + bh_queue_node * message = bh_get_msg(queue, BH_WAIT_FOREVER); + + if (message) { + handle_cb(message); + bh_free_msg(message); + } + } +} + +void bh_queue_exit_loop_run(bh_queue *queue) +{ + if (queue) { + queue->exit_loop_run = true; + bh_queue_cond_signal(&queue->queue_wait_cond); + } +} diff --git a/core/shared-lib/utils/runtime_timer.c b/core/shared-lib/utils/runtime_timer.c new file mode 100644 index 000000000..60356e930 --- /dev/null +++ b/core/shared-lib/utils/runtime_timer.c @@ -0,0 +1,478 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "runtime_timer.h" +#include "bh_thread.h" +#include "bh_time.h" + +#define PRINT(...) +//#define PRINT printf + +typedef struct _app_timer { + struct _app_timer * next; + uint32 id; + unsigned int interval; + uint64 expiry; + bool is_periodic; +} app_timer_t; + +struct _timer_ctx { + app_timer_t * g_app_timers; + app_timer_t * idle_timers; + app_timer_t * free_timers; + unsigned int g_max_id; + int pre_allocated; + unsigned int owner; + + //add mutext and conditions + korp_cond cond; + korp_mutex mutex; + + timer_callback_f timer_callback; + check_timer_expiry_f refresh_checker; +}; + +uint32 bh_get_elpased_ms(uint32 * last_system_clock) +{ + uint32 elpased_ms; + + // attention: the bh_get_tick_ms() return 64 bits integer. + // but the bh_get_elpased_ms() is designed to use 32 bits clock count. + uint32 now = (uint32) bh_get_tick_ms(); + + // system clock overrun + if (now < *last_system_clock) { + elpased_ms = now + (0xFFFFFFFF - *last_system_clock) + 1; + } else { + elpased_ms = now - *last_system_clock; + } + + *last_system_clock = now; + + return elpased_ms; +} + +static app_timer_t * remove_timer_from(timer_ctx_t ctx, uint32 timer_id, + bool active_list) +{ + vm_mutex_lock(&ctx->mutex); + app_timer_t ** head; + if (active_list) + head = &ctx->g_app_timers; + else + head = &ctx->idle_timers; + + app_timer_t * t = *head; + app_timer_t * prev = NULL; + + while (t) { + if (t->id == timer_id) { + if (prev == NULL) { + *head = t->next; + PRINT("removed timer [%d] at head from list %d\n", t->id, active_list); + } else { + prev->next = t->next; + PRINT("removed timer [%d] after [%d] from list %d\n", t->id, prev->id, active_list); + } + vm_mutex_unlock(&ctx->mutex); + + if (active_list && prev == NULL && ctx->refresh_checker) + ctx->refresh_checker(ctx); + + return t; + } else { + prev = t; + t = t->next; + } + } + + vm_mutex_unlock(&ctx->mutex); + + return NULL; +} + +static app_timer_t * remove_timer(timer_ctx_t ctx, uint32 timer_id, + bool * active) +{ + app_timer_t* t = remove_timer_from(ctx, timer_id, true); + if (t) { + if (active) + *active = true; + return t; + } + + if (active) + *active = false; + return remove_timer_from(ctx, timer_id, false); +} + +static void reschedule_timer(timer_ctx_t ctx, app_timer_t * timer) +{ + + vm_mutex_lock(&ctx->mutex); + app_timer_t * t = ctx->g_app_timers; + app_timer_t * prev = NULL; + + timer->next = NULL; + timer->expiry = bh_get_tick_ms() + timer->interval; + + while (t) { + if (timer->expiry < t->expiry) { + if (prev == NULL) { + timer->next = ctx->g_app_timers; + ctx->g_app_timers = timer; + PRINT("rescheduled timer [%d] at head\n", timer->id); + } else { + timer->next = t; + prev->next = timer; + PRINT("rescheduled timer [%d] after [%d]\n", timer->id, prev->id); + } + + vm_mutex_unlock(&ctx->mutex); + + // ensure the refresh_checker() is called out of the lock + if (prev == NULL && ctx->refresh_checker) + ctx->refresh_checker(ctx); + + return; + } else { + prev = t; + t = t->next; + } + } + + if (prev) { + // insert to the list end + prev->next = timer; + PRINT("rescheduled timer [%d] at end, after [%d]\n", timer->id, prev->id); + } else { + // insert at the begin + bh_assert(ctx->g_app_timers == NULL); + ctx->g_app_timers = timer; + PRINT("rescheduled timer [%d] as first\n", timer->id); + } + + vm_mutex_unlock(&ctx->mutex); + + // ensure the refresh_checker() is called out of the lock + if (prev == NULL && ctx->refresh_checker) + ctx->refresh_checker(ctx); + +} + +static void release_timer(timer_ctx_t ctx, app_timer_t * t) +{ + if (ctx->pre_allocated) { + vm_mutex_lock(&ctx->mutex); + t->next = ctx->free_timers; + ctx->free_timers = t; + PRINT("recycle timer :%d\n", t->id); + vm_mutex_unlock(&ctx->mutex); + } else { + PRINT("destroy timer :%d\n", t->id); + bh_free(t); + } +} + +void release_timer_list(app_timer_t ** p_list) +{ + app_timer_t *t = *p_list; + while (t) { + app_timer_t *next = t->next; + PRINT("destroy timer list:%d\n", t->id); + bh_free(t); + t = next; + } + + *p_list = NULL; +} + +/* + * + * API exposed + * + */ + +timer_ctx_t create_timer_ctx(timer_callback_f timer_handler, + check_timer_expiry_f expiery_checker, int prealloc_num, + unsigned int owner) +{ + timer_ctx_t ctx = (timer_ctx_t) bh_malloc(sizeof(struct _timer_ctx)); + if (ctx == NULL) + return NULL; + memset(ctx, 0, sizeof(struct _timer_ctx)); + + ctx->timer_callback = timer_handler; + ctx->pre_allocated = prealloc_num; + ctx->refresh_checker = expiery_checker; + ctx->owner = owner; + + while (prealloc_num > 0) { + app_timer_t *timer = (app_timer_t*) bh_malloc(sizeof(app_timer_t)); + if (timer == NULL) + goto cleanup; + + memset(timer, 0, sizeof(*timer)); + timer->next = ctx->free_timers; + ctx->free_timers = timer; + prealloc_num--; + } + + vm_cond_init(&ctx->cond); + vm_mutex_init(&ctx->mutex); + + PRINT("timer ctx created. pre-alloc: %d\n", ctx->pre_allocated); + + return ctx; + + cleanup: + + if (ctx) { + release_timer_list(&ctx->free_timers); + bh_free(ctx); + } + printf("timer ctx create failed\n"); + return NULL; +} + +void destroy_timer_ctx(timer_ctx_t ctx) +{ + while (ctx->free_timers) { + void * tmp = ctx->free_timers; + ctx->free_timers = ctx->free_timers->next; + bh_free(tmp); + } + + cleanup_app_timers(ctx); + + vm_cond_destroy(&ctx->cond); + vm_mutex_destroy(&ctx->mutex); + bh_free(ctx); +} + +void timer_ctx_set_lock(timer_ctx_t ctx, bool lock) +{ + if (lock) + vm_mutex_lock(&ctx->mutex); + else + vm_mutex_unlock(&ctx->mutex); +} + +void * timer_ctx_get_lock(timer_ctx_t ctx) +{ + return &ctx->mutex; +} + +unsigned int timer_ctx_get_owner(timer_ctx_t ctx) +{ + return ctx->owner; +} + +void add_idle_timer(timer_ctx_t ctx, app_timer_t * timer) +{ + vm_mutex_lock(&ctx->mutex); + timer->next = ctx->idle_timers; + ctx->idle_timers = timer; + vm_mutex_unlock(&ctx->mutex); +} + +uint32 sys_create_timer(timer_ctx_t ctx, int interval, bool is_period, + bool auto_start) +{ + + app_timer_t *timer; + + if (ctx->pre_allocated) { + if (ctx->free_timers == NULL) + return -1; + else { + timer = ctx->free_timers; + ctx->free_timers = timer->next; + } + } else { + timer = (app_timer_t*) bh_malloc(sizeof(app_timer_t)); + if (timer == NULL) + return -1; + } + + memset(timer, 0, sizeof(*timer)); + + ctx->g_max_id++; + if (ctx->g_max_id == -1) + ctx->g_max_id++; + timer->id = ctx->g_max_id; + timer->interval = interval; + timer->is_periodic = is_period; + + if (auto_start) + reschedule_timer(ctx, timer); + else + add_idle_timer(ctx, timer); + + return timer->id; +} + +bool sys_timer_cancel(timer_ctx_t ctx, uint32 timer_id) +{ + bool from_active; + app_timer_t * t = remove_timer(ctx, timer_id, &from_active); + if (t == NULL) + return false; + + add_idle_timer(ctx, t); + + PRINT("sys_timer_stop called\n"); + return from_active; +} + +bool sys_timer_destory(timer_ctx_t ctx, uint32 timer_id) +{ + bool from_active; + app_timer_t * t = remove_timer(ctx, timer_id, &from_active); + if (t == NULL) + return false; + + release_timer(ctx, t); + + PRINT("sys_timer_destory called\n"); + return true; +} + +bool sys_timer_restart(timer_ctx_t ctx, uint32 timer_id, int interval) +{ + app_timer_t * t = remove_timer(ctx, timer_id, NULL); + if (t == NULL) + return false; + + if (interval > 0) + t->interval = interval; + + reschedule_timer(ctx, t); + + PRINT("sys_timer_restart called\n"); + return true; +} + +/* + * + * + * API called by the timer manager from another thread or the kernel timer handler + * + * + */ + +// lookup the app queue by the module name +//post a timeout message to the app queue +// +static void handle_expired_timers(timer_ctx_t ctx, app_timer_t * expired) +{ + while (expired) { + app_timer_t * t = expired; + ctx->timer_callback(t->id, ctx->owner); + + expired = expired->next; + if (t->is_periodic) { + // if it is repeating, then reschedule it; + reschedule_timer(ctx, t); + + } else { + // else move it to idle list + add_idle_timer(ctx, t); + } + } +} + +int get_expiry_ms(timer_ctx_t ctx) +{ + int ms_to_next_expiry; + uint64 now = bh_get_tick_ms(); + + vm_mutex_lock(&ctx->mutex); + if (ctx->g_app_timers == NULL) + ms_to_next_expiry = 7 * 24 * 60 * 60 * 1000; // 1 week + else if (ctx->g_app_timers->expiry >= now) + ms_to_next_expiry = ctx->g_app_timers->expiry - now; + else + ms_to_next_expiry = 0; + vm_mutex_unlock(&ctx->mutex); + + return ms_to_next_expiry; +} + +int check_app_timers(timer_ctx_t ctx) +{ + vm_mutex_lock(&ctx->mutex); + + app_timer_t * t = ctx->g_app_timers; + app_timer_t * prev = NULL; + app_timer_t * expired = NULL; + + uint64 now = bh_get_tick_ms(); + + while (t) { + if (now >= t->expiry) { + ctx->g_app_timers = t->next; + + t->next = expired; + expired = t; + + t = ctx->g_app_timers; + } else { + break; + } + } + vm_mutex_unlock(&ctx->mutex); + + handle_expired_timers(ctx, expired); + + return get_expiry_ms(ctx); +} + +void cleanup_app_timers(timer_ctx_t ctx) +{ + app_timer_t *t; + + vm_mutex_lock(&ctx->mutex); + + release_timer_list(&ctx->g_app_timers); + release_timer_list(&ctx->idle_timers); + + vm_mutex_unlock(&ctx->mutex); +} + +/* + * + * One reference implementation for timer manager + * + * + */ + +void * thread_timer_check(void * arg) +{ + timer_ctx_t ctx = (timer_ctx_t) arg; + while (1) { + int ms_to_expiry = check_app_timers(ctx); + vm_mutex_lock(&ctx->mutex); + vm_cond_reltimedwait(&ctx->cond, &ctx->mutex, ms_to_expiry); + vm_mutex_unlock(&ctx->mutex); + } +} + +void wakeup_timer_thread(timer_ctx_t ctx) +{ + vm_cond_signal(&ctx->cond); +} + diff --git a/core/shared-lib/utils/runtime_timer.h b/core/shared-lib/utils/runtime_timer.h new file mode 100644 index 000000000..1f0aaa063 --- /dev/null +++ b/core/shared-lib/utils/runtime_timer.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2019 Intel Corporation. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LIB_BASE_RUNTIME_TIMER_H_ +#define LIB_BASE_RUNTIME_TIMER_H_ + +#include "bh_platform.h" + +#ifdef __cplusplus +extern "C" { +#endif + +uint32 bh_get_elpased_ms(uint32 * last_system_clock); + +struct _timer_ctx; +typedef struct _timer_ctx * timer_ctx_t; +typedef void (*timer_callback_f)(uint32 id, unsigned int owner); +typedef void (*check_timer_expiry_f)(timer_ctx_t ctx); + +timer_ctx_t create_timer_ctx(timer_callback_f timer_handler, + check_timer_expiry_f, int prealloc_num, unsigned int owner); +void destroy_timer_ctx(timer_ctx_t); +void timer_ctx_set_lock(timer_ctx_t ctx, bool lock); +void * timer_ctx_get_lock(timer_ctx_t ctx); +unsigned int timer_ctx_get_owner(timer_ctx_t ctx); + +uint32 sys_create_timer(timer_ctx_t ctx, int interval, bool is_period, + bool auto_start); +bool sys_timer_destory(timer_ctx_t ctx, uint32 timer_id); +bool sys_timer_cancel(timer_ctx_t ctx, uint32 timer_id); +bool sys_timer_restart(timer_ctx_t ctx, uint32 timer_id, int interval); +void cleanup_app_timers(timer_ctx_t ctx); +int check_app_timers(timer_ctx_t ctx); +int get_expiry_ms(timer_ctx_t ctx); + +void wakeup_timer_thread(timer_ctx_t ctx); +void * thread_timer_check(void * arg); + +#ifdef __cplusplus +} +#endif +#endif /* LIB_BASE_RUNTIME_TIMER_H_ */ diff --git a/core/shared-lib/utils/shared_utils.cmake b/core/shared-lib/utils/shared_utils.cmake new file mode 100644 index 000000000..910ea8711 --- /dev/null +++ b/core/shared-lib/utils/shared_utils.cmake @@ -0,0 +1,24 @@ +# Copyright (C) 2019 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set (UTILS_SHARED_DIR ${CMAKE_CURRENT_LIST_DIR}) + +include_directories(${UTILS_SHARED_DIR}) +include_directories(${UTILS_SHARED_DIR}/../include) + + +file (GLOB_RECURSE source_all ${UTILS_SHARED_DIR}/*.c) + +set (UTILS_SHARED_SOURCE ${source_all}) + diff --git a/projects/README.md b/projects/README.md new file mode 100644 index 000000000..792d60054 --- /dev/null +++ b/projects/README.md @@ -0,0 +1 @@ +#