App-jit and core-jit snapshots generated on one machine can be copied to
another machine with different CPU family/model, so it is incorrect to
use CPU features of the host machine to generate code for snapshots.
This change adds --target-unknown-cpu option and enables it when
generating app-jit and core-jit snapshots in standalone Dart VM and
gen_snapshot.
Currently, this flag disables SSE4.1, popcnt and ABM on ia32 and x64,
and integer division instruction on ARM. Also, new flag enables
testing of roundsd instruction availability at run time on x64
(similarly to AOT).
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47907
Fixes https://github.com/flutter/flutter/issues/94181
Change-Id: Id28448052a21df4bae30b39e62b8532e55d4c901
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This change enables use of roundsd instruction on x64 if SSE4.1 is
detected (in JIT mode).
Also, XMM register is cleared before roundsd to avoid false dependency
due to partial register access in roundsd.
Microbenchmark results on JIT/x64:
Before: BenchFloor(RunTime): 303.81512987999395 us.
After: BenchFloor(RunTime): 135.00067499156262 us.
Custom floor implementation in Dart:
BenchFastFloor(RunTime): 147.609889298893 us.
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/46650
Change-Id: I13502f5d40edf32916edec14cfab027758a22457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209764
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Rationale:
We are adding library support for bit operations:
lowZeroBitCount/highZeroBitCount/nonZeroBitCount
The added features will enable very efficient direct
native implementations of these operations in the
DartVM codegen.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: Id734a7590666c6abdc2a683a240094c6bf6cd46a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117768
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Change-Id: I6dc02b3d9de16cc176eb97613bc0c7f0bb9b16eb
Reviewed-on: https://dart-review.googlesource.com/77013
Commit-Queue: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Ben Konyi <bkonyi@google.com>
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER
This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.
R=asiva@google.com, rmacnak@google.com
Review URL: https://codereview.chromium.org/2450713004 .
This change rewrites the code from the ARM assembler for parsing /proc/cpuinfo on Linux and Android, and collects it into a CpuInfo class that can be used for other architectures as well. This code is in cpuinfo_*.cc. /proc/cpuinfo equivalents are used for Mac and Windows. CpuInfo is used by the VM service to report on the hardware dart is running on. In the future CpuInfo can also be used here to provide more information.
R=iposva@google.com, johnmccutchan@google.com
Review URL: https://codereview.chromium.org//120723003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32468 260f80e4-7a28-3924-810f-c04153c831b5