Commit df0ea973 authored by Dan Elphick's avatar Dan Elphick Committed by Commit Bot

[torque] Fix TestBitFieldStore reading wrong parameter

Fixes test-torque/TestBitFieldStore to read the Smi parameter passed in
rather than the receiver which was always the global object.

Change-Id: Ie6b343ad7ef9393c211b0e7c8e1b7c1427e0aeb4
Bug: v8:10933
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2434327
Auto-Submit: Dan Elphick <delphick@chromium.org>
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70154}
parent be45cd8e
......@@ -673,12 +673,12 @@ TEST(TestBitFieldStore) {
Isolate* isolate(CcTest::i_isolate());
i::HandleScope scope(isolate);
const int kNumParams = 1;
CodeAssemblerTester asm_tester(isolate, kNumParams);
CodeAssemblerTester asm_tester(isolate, kNumParams + 1); // Include receiver.
TestTorqueAssembler m(asm_tester.state());
{
// Untag the parameters to get a plain integer value.
TNode<Uint8T> val =
m.UncheckedCast<Uint8T>(m.Unsigned(m.SmiToInt32(m.Parameter(0))));
TNode<Uint8T> val = m.UncheckedCast<Uint8T>(
m.Unsigned(m.SmiToInt32(m.CAST(m.Parameter(1)))));
m.TestBitFieldStore(val);
m.Return(m.UndefinedConstant());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment