Commit 771bef14 by Nick Clifton Committed by Nick Clifton

fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case rounding up the fraction.

	* config/rl78/fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case
	rounding up the fraction.

	* config/rl78/rl78.c (rl78_note_reg_set): Note the use of REGs
	inside a MEM.

From-SVN: r220410
parent f435bff3
2015-02-04 Nick Clifton <nickc@redhat.com>
* config/rl78/rl78.c (rl78_note_reg_set): Note the use of REGs
inside a MEM.
2015-02-04 Jakub Jelinek <jakub@redhat.com> 2015-02-04 Jakub Jelinek <jakub@redhat.com>
* builtins.def (DEF_BUILTIN_CHKP): Define if not defined. * builtins.def (DEF_BUILTIN_CHKP): Define if not defined.
......
2015-02-02 Nick Clifton <nickc@redhat.com>
* config/rl78/fpmath-sf.S (__rl78_int_pack_a_r8): Fix edge case
rounding up the fraction.
2015-01-31 John David Anglin <danglin@gcc.gnu.org> 2015-01-31 John David Anglin <danglin@gcc.gnu.org>
* config/pa/linux-atomic.c (__kernel_cmpxchg2): Change declaration of * config/pa/linux-atomic.c (__kernel_cmpxchg2): Change declaration of
......
...@@ -49,9 +49,6 @@ START_FUNC __int_isinf ...@@ -49,9 +49,6 @@ START_FUNC __int_isinf
END_FUNC __int_isinf END_FUNC __int_isinf
START_FUNC _int_unpack_sf
;; convert 32-bit SFmode [DE] to 6-byte struct [HL] ("A")
#define A_SIGN [hl+0] /* byte */ #define A_SIGN [hl+0] /* byte */
#define A_EXP [hl+2] /* word */ #define A_EXP [hl+2] /* word */
#define A_FRAC_L [hl+4] /* word */ #define A_FRAC_L [hl+4] /* word */
...@@ -66,6 +63,9 @@ START_FUNC _int_unpack_sf ...@@ -66,6 +63,9 @@ START_FUNC _int_unpack_sf
#define B_FRAC_H [hl+14] #define B_FRAC_H [hl+14]
#define B_FRAC_HH [hl+15] #define B_FRAC_HH [hl+15]
START_FUNC _int_unpack_sf
;; convert 32-bit SFmode [DE] to 6-byte struct [HL] ("A")
mov a, [de+3] mov a, [de+3]
sar a, 7 sar a, 7
mov A_SIGN, a mov A_SIGN, a
...@@ -517,8 +517,14 @@ START_FUNC __rl78_int_pack_a_r8 ...@@ -517,8 +517,14 @@ START_FUNC __rl78_int_pack_a_r8
movw ax, A_FRAC_L movw ax, A_FRAC_L
addw ax, #1 addw ax, #1
movw A_FRAC_L, ax movw A_FRAC_L, ax
sknc bnc $1f
incw A_FRAC_H incw A_FRAC_H
;; If the rounding set the bit beyond the end of the fraction, increment the exponent.
mov a, A_FRAC_HH
bf a.1, $1f
incw A_EXP
1: 1:
movw ax, A_FRAC_H movw ax, A_FRAC_H
shrw ax, 1 shrw ax, 1
......
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