diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-03-03 04:53:16 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-03-03 04:53:16 +0000 |
commit | cb36ddbac11b060630d83fd15d45823951180fec (patch) | |
tree | 158fc10972c66de2fb94b1cff421519fc1d3212c /gcc | |
parent | 66c87bae65e8af3695061a38c3719b2082e50440 (diff) | |
download | gcc-cb36ddbac11b060630d83fd15d45823951180fec.zip gcc-cb36ddbac11b060630d83fd15d45823951180fec.tar.gz gcc-cb36ddbac11b060630d83fd15d45823951180fec.tar.bz2 |
lib1funcs.asm (___fixunssfsi): Change the threshold to 0x4f.
* config/h8300/lib1funcs.asm (___fixunssfsi): Change the
threshold to 0x4f.
Revert:
2004-02-27 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/fixunssfsi.c (__fixunssfsi): Enable on H8/300
as well.
* config/h8300/lib1funcs.asm (___fixunssfsi): Remove.
* config/h8300/t-h8300 (LIB1ASMFUNCS): Remove _fixunssfsi_asm.
From-SVN: r78818
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/config/h8300/fixunssfsi.c | 5 | ||||
-rw-r--r-- | gcc/config/h8300/lib1funcs.asm | 28 | ||||
-rw-r--r-- | gcc/config/h8300/t-h8300 | 3 |
4 files changed, 46 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8dc0903..98c43fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,17 @@ 2004-03-02 Kazu Hirata <kazu@cs.umass.edu> + * config/h8300/lib1funcs.asm (___fixunssfsi): Change the + threshold to 0x4f. + + Revert: + 2004-02-27 Kazu Hirata <kazu@cs.umass.edu> + * config/h8300/fixunssfsi.c (__fixunssfsi): Enable on H8/300 + as well. + * config/h8300/lib1funcs.asm (___fixunssfsi): Remove. + * config/h8300/t-h8300 (LIB1ASMFUNCS): Remove _fixunssfsi_asm. + +2004-03-02 Kazu Hirata <kazu@cs.umass.edu> + * doc/md.texi (cbranchmode4): New. 2004-03-02 Eric Christopher <echristo@redhat.com> diff --git a/gcc/config/h8300/fixunssfsi.c b/gcc/config/h8300/fixunssfsi.c index 0cd72de..06120ba 100644 --- a/gcc/config/h8300/fixunssfsi.c +++ b/gcc/config/h8300/fixunssfsi.c @@ -29,8 +29,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* The libgcc2.c implementation gets confused by our type setup and creates - a directly recursive call, so we do our own implementation. */ + a directly recursive call, so we do our own implementation. For + the H8/300, that's in lib1funcs.asm, for H8/300H and H8S, it's here. */ +#ifndef __H8300__ long __fixunssfsi (float a); long @@ -40,3 +42,4 @@ __fixunssfsi (float a) return (long) (a - 32768L) + 32768L; return (long) a; } +#endif diff --git a/gcc/config/h8300/lib1funcs.asm b/gcc/config/h8300/lib1funcs.asm index bf981e0..8a7e505 100644 --- a/gcc/config/h8300/lib1funcs.asm +++ b/gcc/config/h8300/lib1funcs.asm @@ -806,3 +806,31 @@ L_skip2: #endif #endif /* L_mulsi3 */ +#ifdef L_fixunssfsi_asm +/* For the h8300 we use asm to save some bytes, to + allow more programs to fit into the tiny address + space. For the H8/300H and H8S, the C version is good enough. */ +#ifdef __H8300__ +/* We still treat NANs different than libgcc2.c, but then, the + behavior is undefined anyways. */ + .global ___fixunssfsi +___fixunssfsi: + cmp.b #0x4f,r0h + bge Large_num + jmp @___fixsfsi +Large_num: + bhi L_huge_num + xor.b #0x80,A0L + bmi L_shift8 +L_huge_num: + mov.w #65535,A0 + mov.w A0,A1 + rts +L_shift8: + mov.b A0L,A0H + mov.b A1H,A0L + mov.b A1L,A1H + mov.b #0,A1L + rts +#endif +#endif /* L_fixunssfsi_asm */ diff --git a/gcc/config/h8300/t-h8300 b/gcc/config/h8300/t-h8300 index 476dc18..28ea2cf 100644 --- a/gcc/config/h8300/t-h8300 +++ b/gcc/config/h8300/t-h8300 @@ -1,5 +1,6 @@ LIB1ASMSRC = h8300/lib1funcs.asm -LIB1ASMFUNCS = _cmpsi2 _ucmpsi2 _divhi3 _divsi3 _mulhi3 _mulsi3 +LIB1ASMFUNCS = _cmpsi2 _ucmpsi2 _divhi3 _divsi3 _mulhi3 _mulsi3 \ + _fixunssfsi_asm LIB2FUNCS_EXTRA = \ $(srcdir)/config/h8300/clzhi2.c \ |