Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review SharedArrayBuffer after atomics are implemented #423

Open
ghost opened this issue Feb 5, 2021 · 2 comments
Open

Review SharedArrayBuffer after atomics are implemented #423

ghost opened this issue Feb 5, 2021 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@ghost
Copy link

ghost commented Feb 5, 2021

The RISC-V specific code in TF_BUILTIN(AtomicsExchange, SharedArrayBufferBuiltinsAssembler) should be reviewed once atomics are properly implemented.

#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_RISCV64
  USE(array_buffer);
  TNode<Number> index_number = ChangeUintPtrToTagged(index_word);
  Return(CallRuntime(Runtime::kAtomicsExchange, context, array, index_number,
                     value));
#else
@ghost ghost added the question Further information is requested label Feb 5, 2021
@ghost
Copy link
Author

ghost commented Feb 5, 2021

See also TF_BUILTIN(AtomicsCompareExchange, SharedArrayBufferBuiltinsAssembler):

#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || \
    V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X ||    \
    V8_TARGET_ARCH_RISCV64
  USE(array_buffer);
  TNode<Number> index_number = ChangeUintPtrToTagged(index_word);
  Return(CallRuntime(Runtime::kAtomicsCompareExchange, context, array,
                     index_number, old_value, new_value));
#else

@ghost
Copy link
Author

ghost commented Feb 5, 2021

And SharedArrayBufferBuiltinsAssembler::AtomicBinopBuiltinCommon:

#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || \
    V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X ||    \
    V8_TARGET_ARCH_RISCV64
  USE(array_buffer);
  TNode<Number> index_number = ChangeUintPtrToTagged(index_word);
  Return(CallRuntime(runtime_function, context, array, index_number, value));
#else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant