Skip to content

Commit

Permalink
Updated naming for confusing lastb helper
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephMoore25 committed Dec 18, 2024
1 parent d1cb296 commit 62561bc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/include/simeng/arch/aarch64/helpers/sve.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1086,12 +1086,12 @@ RegisterValue sveIndex(
return {out, 256};
}

/** Helper function for SVE instructions with the format `lastb rd, pg, zn`.
/** Helper function for SVE instructions with the format `lastb zd, pg, zn`.
* T represents the vector register type (e.g. zd.d would be uint64_t).
* Returns correctly formatted RegisterValue. */
template <typename T>
RegisterValue sveLastBScalar(srcValContainer& sourceValues,
const uint16_t VL_bits) {
RegisterValue sveLastBSimdScalar(srcValContainer& sourceValues,
const uint16_t VL_bits) {
const uint64_t* p = sourceValues[0].getAsVector<uint64_t>();
const T* n = sourceValues[1].getAsVector<T>();

Expand Down
8 changes: 4 additions & 4 deletions src/lib/arch/aarch64/Instruction_execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2649,19 +2649,19 @@ void Instruction::execute() {
break;
}
case Opcode::AArch64_LASTB_VPZ_D: { // lastb dd, pg, zn.d
results_[0] = sveLastBScalar<uint64_t>(sourceValues_, VL_bits);
results_[0] = sveLastBSimdScalar<uint64_t>(sourceValues_, VL_bits);
break;
}
case Opcode::AArch64_LASTB_VPZ_S: { // lastb sd, pg, zn.s
results_[0] = sveLastBScalar<uint32_t>(sourceValues_, VL_bits);
results_[0] = sveLastBSimdScalar<uint32_t>(sourceValues_, VL_bits);
break;
}
case Opcode::AArch64_LASTB_VPZ_H: { // lastb hd, pg, zn.h
results_[0] = sveLastBScalar<uint16_t>(sourceValues_, VL_bits);
results_[0] = sveLastBSimdScalar<uint16_t>(sourceValues_, VL_bits);
break;
}
case Opcode::AArch64_LASTB_VPZ_B: { // lastb bd, pg, zn.b
results_[0] = sveLastBScalar<uint8_t>(sourceValues_, VL_bits);
results_[0] = sveLastBSimdScalar<uint8_t>(sourceValues_, VL_bits);
break;
}
case Opcode::AArch64_CLASTB_VPZ_D: { // clastb dd, pg, dn, zn.d
Expand Down

0 comments on commit 62561bc

Please sign in to comment.