Skip to content

Commit 710fca8

Browse files
committed
fixup! fix remaining architectures
1 parent 0a33f2f commit 710fca8

File tree

7 files changed

+14
-23
lines changed

7 files changed

+14
-23
lines changed

lldb/source/Plugins/ABI/LoongArch/ABISysV_loongarch.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,11 +510,10 @@ ValueObjectSP ABISysV_loongarch::GetReturnValueObjectSimple(
510510
value, ConstString(""));
511511
}
512512
if (type_flags & eTypeIsFloat) {
513-
uint32_t float_count = 0;
514513
bool is_complex = false;
515514

516-
if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
517-
float_count == 1 && !is_complex) {
515+
if (compiler_type.IsFloatingPointType(is_complex) &&
516+
!(type_flags & eTypeIsVector) && !is_complex) {
518517
return_valobj_sp =
519518
GetValObjFromFPRegs(thread, reg_ctx, machine, type_flags, byte_size);
520519
return return_valobj_sp;

lldb/source/Plugins/ABI/Mips/ABISysV_mips.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,6 @@ Status ABISysV_mips::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
708708
Thread *thread = frame_sp->GetThread().get();
709709

710710
bool is_signed;
711-
uint32_t count;
712711
bool is_complex;
713712

714713
RegisterContext *reg_ctx = thread->GetRegisterContext().get();
@@ -750,7 +749,7 @@ Status ABISysV_mips::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
750749
"We don't support returning longer than 64 bit "
751750
"integer values at present.");
752751
}
753-
} else if (compiler_type.IsFloatingPointType(count, is_complex)) {
752+
} else if (compiler_type.IsFloatingPointType(is_complex)) {
754753
if (is_complex)
755754
error = Status::FromErrorString(
756755
"We don't support returning complex values at present");
@@ -797,7 +796,6 @@ ValueObjectSP ABISysV_mips::GetReturnValueObjectImpl(
797796

798797
bool is_signed = false;
799798
bool is_complex = false;
800-
uint32_t count = 0;
801799

802800
// In MIPS register "r2" (v0) holds the integer function return values
803801
const RegisterInfo *r2_reg_info = reg_ctx->GetRegisterInfoByName("r2", 0);
@@ -860,10 +858,10 @@ ValueObjectSP ABISysV_mips::GetReturnValueObjectImpl(
860858
return_valobj_sp = ValueObjectMemory::Create(
861859
&thread, "", Address(mem_address, nullptr), return_compiler_type);
862860
return return_valobj_sp;
863-
} else if (return_compiler_type.IsFloatingPointType(count, is_complex)) {
861+
} else if (return_compiler_type.IsFloatingPointType(is_complex)) {
864862
if (IsSoftFloat(fp_flag)) {
865863
uint64_t raw_value = reg_ctx->ReadRegisterAsUnsigned(r2_reg_info, 0);
866-
if (count != 1 && is_complex)
864+
if (!return_compiler_type.IsVectorType() || is_complex)
867865
return return_valobj_sp;
868866
switch (*bit_width) {
869867
default:
@@ -896,7 +894,7 @@ ValueObjectSP ABISysV_mips::GetReturnValueObjectImpl(
896894
f0_value.GetData(f0_data);
897895
lldb::offset_t offset = 0;
898896

899-
if (count == 1 && !is_complex) {
897+
if (!return_compiler_type.IsVectorType() && !is_complex) {
900898
switch (*bit_width) {
901899
default:
902900
return return_valobj_sp;

lldb/source/Plugins/ABI/Mips/ABISysV_mips64.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,6 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
923923
bool sucess = false;
924924
std::string name;
925925
bool is_complex;
926-
uint32_t count;
927926
const uint32_t num_children = return_compiler_type.GetNumFields();
928927

929928
// A structure consisting of one or two FP values (and nothing else) will
@@ -937,7 +936,7 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
937936
return_compiler_type.GetFieldAtIndex(idx, name, &field_bit_offset,
938937
nullptr, nullptr);
939938

940-
if (field_compiler_type.IsFloatingPointType(count, is_complex))
939+
if (field_compiler_type.IsFloatingPointType(is_complex))
941940
use_fp_regs = true;
942941
else
943942
found_non_fp_field = true;
@@ -1044,7 +1043,7 @@ ValueObjectSP ABISysV_mips64::GetReturnValueObjectImpl(
10441043

10451044
if (field_compiler_type.IsIntegerOrEnumerationType(is_signed) ||
10461045
field_compiler_type.IsPointerType() ||
1047-
field_compiler_type.IsFloatingPointType(count, is_complex)) {
1046+
field_compiler_type.IsFloatingPointType(is_complex)) {
10481047
padding = field_byte_offset - integer_bytes;
10491048

10501049
if (integer_bytes < 8) {

lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,6 @@ Status ABISysV_ppc::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
426426
Thread *thread = frame_sp->GetThread().get();
427427

428428
bool is_signed;
429-
uint32_t count;
430429
bool is_complex;
431430

432431
RegisterContext *reg_ctx = thread->GetRegisterContext().get();
@@ -454,7 +453,7 @@ Status ABISysV_ppc::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
454453
"We don't support returning longer than 64 bit "
455454
"integer values at present.");
456455
}
457-
} else if (compiler_type.IsFloatingPointType(count, is_complex)) {
456+
} else if (compiler_type.IsFloatingPointType(is_complex)) {
458457
if (is_complex)
459458
error = Status::FromErrorString(
460459
"We don't support returning complex values at present");
@@ -695,7 +694,6 @@ ValueObjectSP ABISysV_ppc::GetReturnValueObjectImpl(
695694
uint64_t field_bit_offset = 0;
696695
bool is_signed;
697696
bool is_complex;
698-
uint32_t count;
699697

700698
CompilerType field_compiler_type = return_compiler_type.GetFieldAtIndex(
701699
idx, name, &field_bit_offset, nullptr, nullptr);
@@ -741,7 +739,7 @@ ValueObjectSP ABISysV_ppc::GetReturnValueObjectImpl(
741739
// return a nullptr return value object.
742740
return return_valobj_sp;
743741
}
744-
} else if (field_compiler_type.IsFloatingPointType(count, is_complex)) {
742+
} else if (field_compiler_type.IsFloatingPointType(is_complex)) {
745743
// Structs with long doubles are always passed in memory.
746744
if (*field_bit_width == 128) {
747745
is_memory = true;

lldb/source/Plugins/ABI/PowerPC/ABISysV_ppc64.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ Status ABISysV_ppc64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
309309
Thread *thread = frame_sp->GetThread().get();
310310

311311
bool is_signed;
312-
uint32_t count;
313312
bool is_complex;
314313

315314
RegisterContext *reg_ctx = thread->GetRegisterContext().get();
@@ -339,7 +338,7 @@ Status ABISysV_ppc64::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
339338
"We don't support returning longer than 64 bit "
340339
"integer values at present.");
341340
}
342-
} else if (compiler_type.IsFloatingPointType(count, is_complex)) {
341+
} else if (compiler_type.IsFloatingPointType(is_complex)) {
343342
if (is_complex)
344343
error = Status::FromErrorString(
345344
"We don't support returning complex values at present");

lldb/source/Plugins/ABI/RISCV/ABISysV_riscv.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,11 +643,10 @@ ABISysV_riscv::GetReturnValueObjectSimple(Thread &thread,
643643
}
644644
// Floating point return type.
645645
else if (type_flags & eTypeIsFloat) {
646-
uint32_t float_count = 0;
647646
bool is_complex = false;
648647

649-
if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
650-
float_count == 1 && !is_complex) {
648+
if (compiler_type.IsFloatingPointType(is_complex) &&
649+
!(type_flags & eTypeIsVector) && !is_complex) {
651650
const uint32_t arch_fp_flags =
652651
arch.GetFlags() & ArchSpec::eRISCV_float_abi_mask;
653652
return_valobj_sp = GetValObjFromFPRegs(

lldb/source/Plugins/ABI/SystemZ/ABISysV_s390x.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ Status ABISysV_s390x::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
393393
Thread *thread = frame_sp->GetThread().get();
394394

395395
bool is_signed;
396-
uint32_t count;
397396
bool is_complex;
398397

399398
RegisterContext *reg_ctx = thread->GetRegisterContext().get();
@@ -423,7 +422,7 @@ Status ABISysV_s390x::SetReturnValueObject(lldb::StackFrameSP &frame_sp,
423422
"We don't support returning longer than 64 bit "
424423
"integer values at present.");
425424
}
426-
} else if (compiler_type.IsFloatingPointType(count, is_complex)) {
425+
} else if (compiler_type.IsFloatingPointType(is_complex)) {
427426
if (is_complex)
428427
error = Status::FromErrorString(
429428
"We don't support returning complex values at present");

0 commit comments

Comments
 (0)