Commit 1a679679 by Kazu Hirata Committed by Kazu Hirata

lib1funcs.asm (udivsi3): Don't save/restore unused registers.

	* config/h8300/lib1funcs.asm (udivsi3): Don't save/restore
	unused registers.  Don't jump to exitdiv.
	(umodsi3): Likewise.

From-SVN: r73555
parent 49012f5c
2003-11-13 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/lib1funcs.asm (udivsi3): Don't save/restore
unused registers. Don't jump to exitdiv.
(umodsi3): Likewise.
2003-11-13 Mark Mitchell <mark@codesourcery.com>
Kean Johnston <jkj@sco.com>
......
......@@ -448,27 +448,40 @@ ___modsi3:
.global ___udivsi3
___udivsi3:
#ifdef __H8300__
PUSHP S2P
PUSHP S0P
PUSHP S1P
mov.b #0,S2L ; keep sign low
bsr divmodsi4
bra exitdiv
#else
;; H8/300H and H8S version of divmodsi4 does not clobber S1P or S2P.
PUSHP S0P
bsr divmodsi4
POPP S0P
rts
#endif
.global ___umodsi3
___umodsi3:
#ifdef __H8300__
PUSHP S2P
PUSHP S0P
PUSHP S1P
mov.b #0,S2L ; keep sign low
bsr divmodsi4
#ifdef __H8300__
mov S0,A0
mov S1,A1
bra exitdiv
#else
;; H8/300H and H8S version of divmodsi4 does not clobber S1P or S2P.
PUSHP S0P
bsr divmodsi4
mov.l S0P,A0P
POPP S0P
rts
#endif
bra exitdiv
.global ___divsi3
___divsi3:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment