mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
GCC: Remedy NRVO Fails
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
This commit is contained in:
@ -57,11 +57,10 @@ VertexLoaderX64::VertexLoaderX64(const TVtxDesc& vtx_desc, const VAT& vtx_att)
|
||||
|
||||
OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attribute)
|
||||
{
|
||||
OpArg data = MDisp(src_reg, m_src_ofs);
|
||||
if (IsIndexed(attribute))
|
||||
{
|
||||
int bits = attribute == VertexComponentFormat::Index8 ? 8 : 16;
|
||||
LoadAndSwap(bits, scratch1, data);
|
||||
LoadAndSwap(bits, scratch1, MDisp(src_reg, m_src_ofs));
|
||||
m_src_ofs += bits / 8;
|
||||
if (array == CPArray::Position)
|
||||
{
|
||||
@ -74,7 +73,7 @@ OpArg VertexLoaderX64::GetVertexAddr(CPArray array, VertexComponentFormat attrib
|
||||
}
|
||||
else
|
||||
{
|
||||
return data;
|
||||
return MDisp(src_reg, m_src_ofs);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user