summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-24 15:37:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1999-02-24 15:37:49 +0000
commit4e4e6911e5911b77aa9b264f2a428873c20d49b7 (patch)
tree707755e6d4505f78e4270b6e81c8ad2d96c43231 /c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
parentSwitch to using standard compile rule for assembly. (diff)
downloadrtems-4e4e6911e5911b77aa9b264f2a428873c20d49b7.tar.bz2
Patch from Charles Gauthier <Charles.Gauthier@iit.nrc.ca> to address
FP issues on this target: The default variants of libc, libm and libgcc assume that a 68881 coprocessor is present. Without the FPSP, any floating point operation, including printf() with a "%f" format specifier, is likely to cause an unimplemented instruction exception. The FPSP works with the default variants of libc, libm and libgcc. It does not work in conjunction with the msoft-float variants. The paranoia test goes into an infinite loop at milestone 40. I am guessing that floor() is returning an incorrect value. The msoft-float variants of libc, libm and libgcc appear to do floating point I/O properly. They only failed in paranoia. Offhand, I can't think of why they would conflict with the FPSP, so I think that there is something wrong with the msoft-float code. It might be my installation. Given my experiences, I decided to install the FPSP in bsp_start(), and to link against the default variants of libc, libm and libgcc. This causes the executables to increase in size by about 60 KB. The README file and the mvme167.cfg specify how to remove the FPSP, and how to link against the msoft-float variants of the libraries. This is not what Eric Norum had done: on my host, his gen68360_040 port links RTEMS code with the msoft-float variants of libc and libm, and the default variant of libgcc. In this configuration, the output of printf() with "%f" is garbage on my target.
Diffstat (limited to 'c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c')
-rw-r--r--c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
index e4630e808e..beb7f8f7ee 100644
--- a/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
+++ b/c/src/lib/libbsp/m68k/mvme167/startup/bspstart.c
@@ -124,6 +124,8 @@ void bsp_start( void )
extern void *_WorkspaceBase;
extern m68k_isr_entry M68Kvec[];
+ void M68KFPSPInstallExceptionHandlers (void);
+
m68k_isr_entry *rom_monitor_vector_table;
int index;
@@ -146,6 +148,9 @@ void bsp_start( void )
/* Any exceptions during initialization should be trapped by 167Bug */
m68k_set_vbr( &M68Kvec );
+
+ /* Install the 68040 FPSP here */
+ M68KFPSPInstallExceptionHandlers();
/*
* You may wish to make the VME arbitration round-robin here, currently