Commit dac4a1e3 authored by Junliang Yan's avatar Junliang Yan Committed by V8 LUCI CQ

ppc: rename LoadHalfWorld to LoadU/S16

Change-Id: Iedb0bb641a83fd897c92baca4f58c7d689135e33
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2904271Reviewed-by: 's avatarMilad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74660}
parent 1d0719c7
...@@ -396,7 +396,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ...@@ -396,7 +396,7 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
// Copy the function arguments from the generator object's register file. // Copy the function arguments from the generator object's register file.
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); r6, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset));
__ LoadHalfWord( __ LoadU16(
r6, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset)); r6, FieldMemOperand(r6, SharedFunctionInfo::kFormalParameterCountOffset));
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
r5, r5,
...@@ -436,9 +436,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) { ...@@ -436,9 +436,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
{ {
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
r3, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset)); r3, FieldMemOperand(r7, JSFunction::kSharedFunctionInfoOffset));
__ LoadHalfWord( __ LoadU16(r3, FieldMemOperand(
r3, r3, SharedFunctionInfo::kFormalParameterCountOffset));
FieldMemOperand(r3, SharedFunctionInfo::kFormalParameterCountOffset));
// We abuse new.target both to indicate that this is a resume call and to // We abuse new.target both to indicate that this is a resume call and to
// pass in the generator object. In ordinary calls, new.target is always // pass in the generator object. In ordinary calls, new.target is always
// undefined because generator functions are non-constructable. // undefined because generator functions are non-constructable.
...@@ -1073,7 +1072,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) { ...@@ -1073,7 +1072,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// and update invocation count. Otherwise, setup the stack frame. // and update invocation count. Otherwise, setup the stack frame.
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
r7, FieldMemOperand(feedback_vector, HeapObject::kMapOffset)); r7, FieldMemOperand(feedback_vector, HeapObject::kMapOffset));
__ LoadHalfWord(r7, FieldMemOperand(r7, Map::kInstanceTypeOffset)); __ LoadU16(r7, FieldMemOperand(r7, Map::kInstanceTypeOffset));
__ cmpi(r7, Operand(FEEDBACK_VECTOR_TYPE)); __ cmpi(r7, Operand(FEEDBACK_VECTOR_TYPE));
__ bne(&push_stack_frame); __ bne(&push_stack_frame);
...@@ -1864,8 +1863,7 @@ void Builtins::Generate_CallOrConstructVarargs(MacroAssembler* masm, ...@@ -1864,8 +1863,7 @@ void Builtins::Generate_CallOrConstructVarargs(MacroAssembler* masm,
__ AssertNotSmi(r5); __ AssertNotSmi(r5);
__ LoadTaggedPointerField(scratch, __ LoadTaggedPointerField(scratch,
FieldMemOperand(r5, HeapObject::kMapOffset)); FieldMemOperand(r5, HeapObject::kMapOffset));
__ LoadHalfWord(scratch, __ LoadU16(scratch, FieldMemOperand(scratch, Map::kInstanceTypeOffset));
FieldMemOperand(scratch, Map::kInstanceTypeOffset));
__ cmpi(scratch, Operand(FIXED_ARRAY_TYPE)); __ cmpi(scratch, Operand(FIXED_ARRAY_TYPE));
__ beq(&ok); __ beq(&ok);
__ cmpi(scratch, Operand(FIXED_DOUBLE_ARRAY_TYPE)); __ cmpi(scratch, Operand(FIXED_DOUBLE_ARRAY_TYPE));
...@@ -2122,7 +2120,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm, ...@@ -2122,7 +2120,7 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
// -- cp : the function context. // -- cp : the function context.
// ----------------------------------- // -----------------------------------
__ LoadHalfWord( __ LoadU16(
r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset)); r5, FieldMemOperand(r5, SharedFunctionInfo::kFormalParameterCountOffset));
__ InvokeFunctionCode(r4, no_reg, r5, r3, InvokeType::kJump); __ InvokeFunctionCode(r4, no_reg, r5, r3, InvokeType::kJump);
......
...@@ -1581,9 +1581,9 @@ void MacroAssembler::InvokeFunctionWithNewTarget( ...@@ -1581,9 +1581,9 @@ void MacroAssembler::InvokeFunctionWithNewTarget(
LoadTaggedPointerField( LoadTaggedPointerField(
temp_reg, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset)); temp_reg, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
LoadTaggedPointerField(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); LoadTaggedPointerField(cp, FieldMemOperand(r4, JSFunction::kContextOffset));
LoadHalfWord(expected_reg, LoadU16(expected_reg,
FieldMemOperand( FieldMemOperand(temp_reg,
temp_reg, SharedFunctionInfo::kFormalParameterCountOffset)); SharedFunctionInfo::kFormalParameterCountOffset));
InvokeFunctionCode(fun, new_target, expected_reg, actual_parameter_count, InvokeFunctionCode(fun, new_target, expected_reg, actual_parameter_count,
type); type);
...@@ -1658,7 +1658,7 @@ void MacroAssembler::CompareInstanceTypeRange(Register map, Register type_reg, ...@@ -1658,7 +1658,7 @@ void MacroAssembler::CompareInstanceTypeRange(Register map, Register type_reg,
DCHECK_LT(lower_limit, higher_limit); DCHECK_LT(lower_limit, higher_limit);
UseScratchRegisterScope temps(this); UseScratchRegisterScope temps(this);
Register scratch = temps.Acquire(); Register scratch = temps.Acquire();
LoadHalfWord(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset)); LoadU16(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
mov(scratch, Operand(lower_limit)); mov(scratch, Operand(lower_limit));
sub(scratch, type_reg, scratch); sub(scratch, type_reg, scratch);
cmpli(scratch, Operand(higher_limit - lower_limit)); cmpli(scratch, Operand(higher_limit - lower_limit));
...@@ -2843,8 +2843,8 @@ void TurboAssembler::StoreWord(Register src, const MemOperand& mem, ...@@ -2843,8 +2843,8 @@ void TurboAssembler::StoreWord(Register src, const MemOperand& mem,
} }
} }
void MacroAssembler::LoadHalfWordArith(Register dst, const MemOperand& mem, void MacroAssembler::LoadS16(Register dst, const MemOperand& mem,
Register scratch) { Register scratch) {
int offset = mem.offset(); int offset = mem.offset();
if (!is_int16(offset)) { if (!is_int16(offset)) {
...@@ -2858,14 +2858,14 @@ void MacroAssembler::LoadHalfWordArith(Register dst, const MemOperand& mem, ...@@ -2858,14 +2858,14 @@ void MacroAssembler::LoadHalfWordArith(Register dst, const MemOperand& mem,
// Variable length depending on whether offset fits into immediate field // Variable length depending on whether offset fits into immediate field
// MemOperand currently only supports d-form // MemOperand currently only supports d-form
void MacroAssembler::LoadHalfWord(Register dst, const MemOperand& mem, void MacroAssembler::LoadU16(Register dst, const MemOperand& mem,
Register scratch) { Register scratch) {
Register base = mem.ra(); Register base = mem.ra();
int offset = mem.offset(); int offset = mem.offset();
if (!is_int16(offset)) { if (!is_int16(offset)) {
DCHECK_NE(scratch, no_reg); DCHECK_NE(scratch, no_reg);
LoadIntLiteral(scratch, offset); mov(scratch, Operand(offset));
lhzx(dst, MemOperand(base, scratch)); lhzx(dst, MemOperand(base, scratch));
} else { } else {
lhz(dst, mem); lhz(dst, mem);
......
...@@ -793,10 +793,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { ...@@ -793,10 +793,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler {
// load a literal double value <value> to FPR <result> // load a literal double value <value> to FPR <result>
void LoadHalfWord(Register dst, const MemOperand& mem, void LoadU16(Register dst, const MemOperand& mem, Register scratch = no_reg);
Register scratch = no_reg); void LoadS16(Register dst, const MemOperand& mem, Register scratch = no_reg);
void LoadHalfWordArith(Register dst, const MemOperand& mem,
Register scratch = no_reg);
void StoreHalfWord(Register src, const MemOperand& mem, Register scratch); void StoreHalfWord(Register src, const MemOperand& mem, Register scratch);
void LoadByte(Register dst, const MemOperand& mem, Register scratch); void LoadByte(Register dst, const MemOperand& mem, Register scratch);
......
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