| 73 | } |
| 74 | |
| 75 | WasmEdge_Value convFromVal(const ValVariant &Val, const ValType &Type) { |
| 76 | WasmEdge_Value CVal; |
| 77 | std::copy_n(Type.getRawData().cbegin(), 8, CVal.Type.Data); |
| 78 | #if defined(__x86_64__) || defined(__aarch64__) || defined(__s390x__) || \ |
| 79 | (defined(__riscv) && __riscv_xlen == 64) |
| 80 | CVal.Value = Val.get<WasmEdge::uint128_t>(); |
| 81 | #else |
| 82 | WasmEdge::uint128_t U128 = Val.get<WasmEdge::uint128_t>(); |
| 83 | CVal.Value.Low = U128.low(); |
| 84 | CVal.Value.High = static_cast<uint64_t>(U128.high()); |
| 85 | #endif |
| 86 | return CVal; |
| 87 | } |
| 88 | |
| 89 | std::vector<std::pair<ValVariant, ValType>> |
| 90 | convToValVec(const std::vector<WasmEdge_Value> &CVals) { |
no test coverage detected