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, ...@@ -2762,6 +2762,10 @@ void TurboAssembler::LoadAnyTaggedField(const Register& destination,
#endif #endif
} }
void TurboAssembler::SmiUntagField(Register dst, const MemOperand& src) {
SmiUntag(dst, src);
}
void TurboAssembler::StoreTaggedField(const Register& value, void TurboAssembler::StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand) { const MemOperand& dst_field_operand) {
Str(value, dst_field_operand); Str(value, dst_field_operand);
......
...@@ -1187,6 +1187,9 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { ...@@ -1187,6 +1187,9 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadAnyTaggedField(const Register& destination, void LoadAnyTaggedField(const Register& destination,
const MemOperand& field_operand); 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. // Compresses and stores tagged value to given on-heap location.
void StoreTaggedField(const Register& value, void StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand); const MemOperand& dst_field_operand);
......
...@@ -1780,9 +1780,9 @@ void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { ...@@ -1780,9 +1780,9 @@ void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) {
// Load the OSR entrypoint offset from the deoptimization data. // Load the OSR entrypoint offset from the deoptimization data.
// <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset] // <osr_offset> = <deopt_data>[#header_size + #osr_pc_offset]
__ SmiUntag(x1, __ SmiUntagField(
FieldMemOperand(x1, FixedArray::OffsetOfElementAt( x1, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(
DeoptimizationData::kOsrPcOffsetIndex))); DeoptimizationData::kOsrPcOffsetIndex)));
// Compute the target address = code_obj + header_size + osr_offset // Compute the target address = code_obj + header_size + osr_offset
// <entry_addr> = <code_obj> + #header_size + <osr_offset> // <entry_addr> = <code_obj> + #header_size + <osr_offset>
...@@ -2467,8 +2467,8 @@ void Generate_PushBoundArguments(MacroAssembler* masm) { ...@@ -2467,8 +2467,8 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
Label no_bound_arguments; Label no_bound_arguments;
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
bound_argv, FieldMemOperand(x1, JSBoundFunction::kBoundArgumentsOffset)); bound_argv, FieldMemOperand(x1, JSBoundFunction::kBoundArgumentsOffset));
__ SmiUntag(bound_argc, __ SmiUntagField(bound_argc,
FieldMemOperand(bound_argv, FixedArray::kLengthOffset)); FieldMemOperand(bound_argv, FixedArray::kLengthOffset));
__ Cbz(bound_argc, &no_bound_arguments); __ Cbz(bound_argc, &no_bound_arguments);
{ {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
......
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