diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-17 15:36:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-11-17 15:36:57 +0000 |
commit | 0d523caf976507445c97d8bc5bebf860056dc790 (patch) | |
tree | 6bb7e22ee343d9060ea9689317794b7341f74b8e /tools/cpu/sh/sci.c | |
parent | Conditionally take out the offensive pragma pack when on RTEMS in addition (diff) | |
download | rtems-0d523caf976507445c97d8bc5bebf860056dc790.tar.bz2 |
Patch rtems-rc-19991105-2.diff from Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
His comments follow:
This is a minor enhancement to shgen, which should not have any
side-effects.
Diffstat (limited to 'tools/cpu/sh/sci.c')
-rw-r--r-- | tools/cpu/sh/sci.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/cpu/sh/sci.c b/tools/cpu/sh/sci.c index 3310e7e791..2b0cbd758f 100644 --- a/tools/cpu/sh/sci.c +++ b/tools/cpu/sh/sci.c @@ -67,7 +67,11 @@ static void Compute( entry->err = ( ( Phi / ( (entry->N + 1) * a ) - 1.0 ) * 100.0 ); else + { entry->err = 100.0 ; + entry->n = 255 ; + entry->N = 0 ; + } } static sci_tab_t *SelectN( @@ -127,11 +131,14 @@ int shgen_gensci( if ( i > 0 ) fprintf( file, ",\n" ); - fprintf( file, " { %1d, %3d } /* %+7.2f%% ; B%d */", + fprintf( file, " { %1d, %3d } /* %+7.2f%% ; B%d ", best->n, best->N, best->err, best->B ); + if ( best->n > 3 ) + fprintf( file, "(unusable) " ); + fprintf( file, "*/" ); } fprintf( file, "\n};\n\n" ); @@ -147,6 +154,7 @@ int shgen_gensci( " + ( ( cflag & CBAUDEX ) ? B38400 : 0 );\n" " if ( offset == 0 ) return -1 ;\n" " offset-- ;\n\n" + " if ( _sci_bitrates[offset].n > 3 ) return -1;\n\n" " *smr &= ~0x03;\n" " *smr |= _sci_bitrates[offset].n;\n" " *brr = _sci_bitrates[offset].N;\n\n" |