Commit Graph

10 Commits

Author SHA1 Message Date
ahaas
90080f2a6b [wasm] Move test-signatures.h from test/cctest to test/common
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2395743003
Cr-Commit-Position: refs/heads/master@{#39988}
2016-10-05 12:00:03 +00:00
ahaas
685d488288 [wasm] Do not support grow_memory for asmjs modules.
With this CL the AstDecoder produces an error if it encounters a
grow_memory instruction in an asmjs module. Additionally asmjs
instructions are not allowed anymore in wasm modules.

BUG=chromium:644674
R=titzer@chromium.org

Review-Url: https://codereview.chromium.org/2324733002
Cr-Commit-Position: refs/heads/master@{#39339}
2016-09-12 10:16:46 +00:00
mtrofin
c5e3c9bf56 [wasm] Support for memory size relocation for asm-wasm.
Only Intel needed changes, arm and mips work as expected.

BUG=

Review-Url: https://codereview.chromium.org/2061833003
Cr-Commit-Position: refs/heads/master@{#37011}
2016-06-15 16:43:34 +00:00
zhengxing.li
60df7abc28 Use float and double for test cases in test-run-wasm-asmjs.cc
The last 4 test cases in test/cctest/wasm/test-run-wasm-asmjs.cc added by the CL 36911 (https://codereview.chromium.org/2061583002) use float_t and double_t type for WasmRunner.
  For examples: At line 249: WasmRunner<float_t> r(&module, MachineType::Uint32());

  But float_t and double_t depends on FLT_EVAL_METHOD macro of compiler. FLT_EVAL_METHOD is variant on different platform, if the FLT_EVAL_METHOD is 2,  both float_t and double_t will be long
  double and gcc or clang will met error when compiling   WasmRunner<long double> r(&module,MachineType::Uint32());

  For more details, please refer:
  float_t: http://www.cplusplus.com/reference/cmath/float_t/
  FLT_EVAL_METHOD: https://en.wikipedia.org/wiki/C99 check the IEEE 754 floating point support section directly.

  This CL used float and double to replace float_t and double_t to avoid this issue.

BUG=

Review-Url: https://codereview.chromium.org/2066703003
Cr-Commit-Position: refs/heads/master@{#36982}
2016-06-15 01:39:14 +00:00
mtrofin
8c1ba59aee RelocInfo modes were not propagated when computing
MemoryOperands, on IA32. This needed to be fixed so that we can
compile wasm code before creating instances, since the compiled code
needs to be patched up for memory and globals references.

This surfaces in asm-to-wasm scenarios.

Added testing (rather, enhanced existing tests).
Note patch#1 where we fail on ia32, and patch#2 with the fix.

BUG=v8:5072

Review-Url: https://codereview.chromium.org/2061583002
Cr-Commit-Position: refs/heads/master@{#36911}
2016-06-13 04:21:16 +00:00
titzer
e4bb7ff96c [wasm] Implement an interpreter for WASM.
This interpreter directly decodes and executes WASM binary code for
the purpose of supporting low-level debugging. It is not currently
integrated into the main WASM implementation.

R=ahaas@chromium.org,clemensh@chromium.org,rossberg@chromium.org,binji@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1972153002
Cr-Commit-Position: refs/heads/master@{#36497}
2016-05-25 08:33:10 +00:00
titzer
3fef34e023 [wasm] Refactor WASM run tests to allow them to run in the interpreter too.
R=mstarzinger@chromium.org,ahaas@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1990923002
Cr-Commit-Position: refs/heads/master@{#36332}
2016-05-18 15:57:00 +00:00
titzer
f00efdaed5 [wasm] Introduce custom asm.js bytecodes for loads and stores.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1968943002
Cr-Commit-Position: refs/heads/master@{#36169}
2016-05-11 11:50:55 +00:00
titzer
2973730190 [wasm] Introduce custom asm.js bytecodes for double->int conversions.
R=ahaas@chromium.org,bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1971693002
Cr-Commit-Position: refs/heads/master@{#36164}
2016-05-11 09:31:50 +00:00
titzer
067a0d6c61 [wasm] Introduce special bytecodes for asm.js division/remainder instead of relying on module state.
R=ahaas@chromium.org, bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1968493002
Cr-Commit-Position: refs/heads/master@{#36148}
2016-05-10 17:58:35 +00:00