A question about Word32PairShr on arm

15 views
Skip to first unread message

Yahan Lu

unread,
Aug 10, 2022, 11:34:12 PM8/10/22
to v8-dev

On the arm, before Word32PairShr, v8 outputs Word32And arg 63.

```
 #19:Word32And(#4:Parameter, #17:Int32Constant) [type: Wasm:i32] #11:Word32PairShr(#3:Parameter, #15:Parameter, #19:Word32And) [type: Wasm:i64] #21:Projection[0](#11:Word32PairShr, #0:Start) [Type: Wasm:i32] 
#22:Projection[1](#11:Word32PairShr, #0:Start) [Type: Wasm:i32] 
```
But on riscv , it don't emit Word32And.
```
#4:Parameter[3](#0:Start)  [Type: Wasm:i32]
#9:Word32PairShr(#3:Parameter, #13:Parameter, #4:Parameter)  [Type: Wasm:i64]
#15:Projection[0](#9:Word32PairShr, #0:Start)  [Type: Wasm:i32]
#16:Projection[1](#9:Word32PairShr, #0:Start)  [Type: Wasm:i32]
```

Is there flag to control this behavior?

cmd :

out/arm.release/d8 --test test/wasm-spec-tests/tests/i64.js --random-seed=-989691571 --nohard-abort --testing-d8-test-runner --stress-opt --no-liftoff --stress-lazy-source-positions --no-wasm-generic-wrapper  --print-wasm-code --code-comments --trace-turbo --trace-turbo-graph












Clemens Backes

unread,
Aug 11, 2022, 5:33:47 AM8/11/22
to v8-...@googlegroups.com
On some platforms we need to mask the shift amount to make sure that it's within [0,31]. Other platforms don't care, and do this masking implicitly.

--
--
v8-dev mailing list
v8-...@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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/109ce47d-7964-4fc6-8c1e-b4d9da19dd0en%40googlegroups.com.


--

Clemens Backes

Software Engineer

clem...@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Liana Sebastian   

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.


Reply all
Reply to author
Forward
0 new messages