Skip to content
Commit c26846ab authored by Maciej W. Rozycki's avatar Maciej W. Rozycki
Browse files

MIPS/GAS: Discard redundant instruction from DDIV/DREM macros

A sequence such as:

	li	at,-1
	bne	xx,at,0f
	 li	at,1
	dsll32	at,at,0x1f

is produced in the expansion of the DDIV and DREM assembly macros, where
a redundant `li at,1' instruction is used to load an intermediate value
of 1 into $at, which is then left-shifted by 63 with `dsll32 at,at,0x1f'
yielding 0x8000000000000000.  However this value likewise results from
left-shifting the value of -1, already present in $at at this point.

Remove the extraneous instruction then, shortening the sequence emitted.
Adjust dumps in the testsuite accordingly.
parent 248f96fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment