[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/1463523
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59521}
This commit is contained in:
Santiago Aboy Solanes 2019-02-11 15:27:50 +00:00 committed by Commit Bot
parent a4669ba16c
commit 3abc01f284
3 changed files with 12 additions and 5 deletions

View File

@ -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);

View File

@ -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);

View File

@ -1780,9 +1780,9 @@ 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(
DeoptimizationData::kOsrPcOffsetIndex)));
__ SmiUntagField(
x1, FieldMemOperand(x1, FixedArray::OffsetOfElementAt(
DeoptimizationData::kOsrPcOffsetIndex)));
// Compute the target address = code_obj + header_size + osr_offset
// <entry_addr> = <code_obj> + #header_size + <osr_offset>
@ -2467,8 +2467,8 @@ void Generate_PushBoundArguments(MacroAssembler* masm) {
Label no_bound_arguments;
__ LoadTaggedPointerField(
bound_argv, FieldMemOperand(x1, JSBoundFunction::kBoundArgumentsOffset));
__ SmiUntag(bound_argc,
FieldMemOperand(bound_argv, FixedArray::kLengthOffset));
__ SmiUntagField(bound_argc,
FieldMemOperand(bound_argv, FixedArray::kLengthOffset));
__ Cbz(bound_argc, &no_bound_arguments);
{
// ----------- S t a t e -------------