mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
divmodqi.S: Return 0x00 by default for div by 0.
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0. * config/rl78/divmodsi.S: Update return register to r8. * config/rl78/divmodhi.S: Update return register to r8,r9. Branch to main_loop_done_himode to pop registers before return. From-SVN: r228926
This commit is contained in:
parent
0d3a9fe776
commit
793aa938bd
@ -1,3 +1,10 @@
|
||||
2015-10-16 Kaushik Phatak <kaushik.phatak@kpit.com>
|
||||
|
||||
* config/rl78/divmodqi.S: Return 0x00 by default for div by 0.
|
||||
* config/rl78/divmodsi.S: Update return register to r8.
|
||||
* config/rl78/divmodhi.S: Update return register to r8,r9.
|
||||
Branch to main_loop_done_himode to pop registers before return.
|
||||
|
||||
2015-10-09 Venkataramanan kumar <venkataramanan.kumar@amd.com>
|
||||
|
||||
* config/i386/cpuinfo.c (get_amd_cpu): Detect bdver4.
|
||||
|
@ -454,7 +454,11 @@ __generic_himod:
|
||||
movw ax, den
|
||||
cmpw ax, #0
|
||||
bnz $den_not_zero\which
|
||||
.if \need_result
|
||||
movw quot, #0
|
||||
.else
|
||||
movw num, #0
|
||||
.endif
|
||||
ret
|
||||
|
||||
den_not_zero\which:
|
||||
|
@ -63,7 +63,7 @@ num_eq_den\which:
|
||||
ret
|
||||
|
||||
den_is_zero\which:
|
||||
mov r8, #0xff
|
||||
mov r8, #0x00
|
||||
ret
|
||||
|
||||
;; These routines leave DE alone - the signed functions use DE
|
||||
|
@ -688,9 +688,14 @@ __generic_simod:
|
||||
or a, denB3 ; not x
|
||||
cmpw ax, #0
|
||||
bnz $den_not_zero\which
|
||||
.if \need_result
|
||||
movw quotL, #0
|
||||
movw quotH, #0
|
||||
.else
|
||||
movw numL, #0
|
||||
movw numH, #0
|
||||
ret
|
||||
.endif
|
||||
br $!main_loop_done_himode\which
|
||||
|
||||
den_not_zero\which:
|
||||
.if \need_result
|
||||
|
Loading…
Reference in New Issue
Block a user