Skip to content

Commit 657b2b4

Browse files
lakor64jmalak
authored andcommitted
Fix registry on/off for longlong on MIPS 32-bit
1 parent 40212d6 commit 657b2b4

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

bld/cg/risc/mps/c/mpsdfsup.c

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,25 @@ static dw_regs DFRegMapN( name *reg )
7777
void DFOutReg( dw_loc_id locid, name *reg )
7878
/********************************************/
7979
{
80-
dw_regs regnum;
81-
82-
regnum = DFRegMapN( reg );
83-
DWLocReg( Client, locid, regnum );
80+
hw_reg_set hw_reg;
81+
hw_reg_set hw_low;
82+
dw_regs dw_reg;
83+
84+
hw_reg = reg->r.reg;
85+
86+
hw_low = Low64Reg( hw_reg );
87+
if( HW_CEqual( hw_low, HW_EMPTY ) ) {
88+
dw_reg = DFRegMap( hw_reg );
89+
DWLocReg( Client, locid, dw_reg );
90+
} else {
91+
dw_reg = DFRegMap( hw_low );
92+
DWLocReg( Client, locid, dw_reg );
93+
DWLocPiece( Client, locid, WD );
94+
HW_TurnOff( hw_reg, hw_low );
95+
dw_reg = DFRegMap( hw_reg );
96+
DWLocReg( Client, locid, dw_reg );
97+
DWLocPiece( Client, locid, WD );
98+
}
8499
}
85100

86101

0 commit comments

Comments
 (0)