Hi,

you can run d8 with --no-wasm-tier-up, then no tier-up to TurboFan will
happen. There is also the chance that Liftoff cannot compile your function
because it contains unsupported opcodes. You could check that with
--trace-liftoff. Note that --trace-liftoff only works in a debug build of
d8.

Cheers, Andreas

On Thu, Jan 14, 2021 at 10:18 AM luy...@qq.com <luya...@qq.com> wrote:

> Hi all,
>     I write a simple code to test wasm.
> ```
> #include <wasm_simd128.h>
> #include <iostream>
> int fun(v128_t a,v128_t b) {
>     v128_t prod = wasm_i8x16_add(a, b);
>     return prod[0];
> }
> int main() {
>     v128_t a = {1};
>     v128_t b = {5};
>     return fun(a,b);
> }
> ````
> test.wasm:      file format wasm 0x1
>
> Code Disassembly:
>
> 0000ea func[0] <__wasm_call_ctors>:
>  0000eb: 0b                         | end
> 0000ed func[1]:
>  0000ee: 20 01                      | local.get 1
>  0000f0: 20 00                      | local.get 0
>  0000f2: fd 6e                      | i8x16.add
>  0000f4: fd 1b 00                   | i32x4.extract_lane 0
>  0000f7: 0b                         | end
> ````
> --- WebAssembly code ---
> index: 1
> kind: wasm function
> compiler: TurboFan
> Body (size = 288 = 264 + 24 padding)
> Instructions (size = 256)
> 0x377a710d80     0  00a00e13       li        t3, 10
> 0x377a710d84     4  fe810113       addi      sp, sp, -24
> 0x377a710d88     8  00113823       sd        ra, 16(sp)
> 0x377a710d8c     c  00813423       sd        fp, 8(sp)
> 0x377a710d90    10  01c13023       sd        t3, 0(sp)
> 0x377a710d94    14  00810413       addi      fp, sp, 8
> 0x377a710d98    18  ff810113       addi      sp, sp, -8
> ```
>
> When i run it by d8, i find wasm func[1] be compiled by TurboFan.
> Is it possible to compile only with liftoff?
>
> --
> --
> v8-dev mailing list
> v8-dev@googlegroups.com
> http://groups.google.com/group/v8-dev
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-dev+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-dev/219c754a-b8a5-404e-aac0-41cbfb8db6e6n%40googlegroups.com
> <https://groups.google.com/d/msgid/v8-dev/219c754a-b8a5-404e-aac0-41cbfb8db6e6n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 

Andreas Haas

Software Engineer

ah...@google.com


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.



This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAELSTvd5J%2BP9J5TtufVkqmmqi7%2BfYwu8utb8ZGcxJUbH_J6Nbg%40mail.gmail.com.

Reply via email to