Skip to content

Commit 8f78190

Browse files
DinoVmeta-codesync[bot]
authored andcommitted
Loads need to avoid getGp too
Summary: storeFromReg got the right treatment here of avoiding `getGp` but apparently I missed doing the fully right thing in loadFromReg :( Reviewed By: yoney Differential Revision: D93544179 fbshipit-source-id: 35119e108ab9a8ef5c8a1bdf8ef7718874e5af98
1 parent aec8867 commit 8f78190

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

cinderx/Jit/codegen/autogen.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,16 +1870,17 @@ void loadToReg(
18701870
if (output->isVecD()) {
18711871
as->ldr(AT::getVecD(output), input);
18721872
} else {
1873-
auto reg = AT::getGp(output);
18741873
switch (output->dataType()) {
18751874
case OperandBase::k8bit:
1876-
as->ldrb(reg, input);
1875+
as->ldrb(
1876+
AT::getGp(DataType::k32bit, output->getPhyRegister().loc), input);
18771877
break;
18781878
case OperandBase::k16bit:
1879-
as->ldrh(reg, input);
1879+
as->ldrh(
1880+
AT::getGp(DataType::k32bit, output->getPhyRegister().loc), input);
18801881
break;
18811882
default:
1882-
as->ldr(reg, input);
1883+
as->ldr(AT::getGp(output), input);
18831884
break;
18841885
}
18851886
}

0 commit comments

Comments
 (0)