Commit 3abc01f2 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr][arm64] Implementing SmiUntagField which loads a field

containing smi value and untags it.

This CL finishes up the parity with x64 with regards to
(https://chromium-review.googlesource.com/c/v8/v8/+/1382740)

Bug: v8:7703
Change-Id: I3c88fbbfd3e47e944a6891171d6555f330cd5fd2
Reviewed-on: https://chromium-review.googlesource.com/c/1463523Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59521}
parent a4669ba1
......@@ -2762,6 +2762,10 @@ void TurboAssembler::LoadAnyTaggedField(const Register& destination,
#endif
}
void TurboAssembler::SmiUntagField(Register dst, const MemOperand& src) {
SmiUntag(dst, src);
}
void TurboAssembler::StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand) {
Str(value, dst_field_operand);
......
......@@ -1187,6 +1187,9 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadAnyTaggedField(const Register& destination,
const MemOperand& field_operand);
// Loads a field containing smi value and untags it.
void SmiUntagField(Register dst, const MemOperand& src);
// Compresses and stores tagged value to given on-heap location.
void StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand);
......
......@@ -1780,8 +1780,8 @@ void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
// Load the OSR entrypoint offset from the deoptimization data.
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
__ SmiUntag(x1,
FieldMemOperand(x1, FixedArray::OffsetOfElementAt(
__ SmiUntagField(
x1, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(
DeoptimizationData::kOsrPcOffsetIndex)));
// Compute the target address = code_obj + header_size + osr_offset
......@@ -2467,7 +2467,7 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
Label no_bound_arguments;
__ LoadTaggedPointerField(
bound_argv, FieldMemOperand(x1, JSBoundFunction::kBoundArgumentsOffset));
__ SmiUntag(bound_argc,
__ SmiUntagField(bound_argc,
FieldMemOperand(bound_argv, FixedArray::kLengthOffset));
__ Cbz(bound_argc, &no_bound_arguments);
{
......
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