Changeset 7d7b2a3 in rtems


Ignore:
Timestamp:
02/24/99 15:46:25 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
32a98d2
Parents:
4e4e691
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • make/custom/mvme167.cfg

    r4e4e691 r7d7b2a3  
    55#
    66
    7 include $(RTEMS_ROOT)/make/custom/default.cfg
    8 
    97RTEMS_CPU=m68k
    108RTEMS_CPU_MODEL=m68040
     9
     10include $(RTEMS_ROOT)/make/custom/default.cfg
    1111
    1212# This is the actual bsp directory used during the build process.
     
    2424CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
    2525
    26 # This target does NOT support the TCP/IP stack so ignore requests
     26# This target does NOT support the TCP/IP stack (yet) so ignore requests
    2727# to enable it.
    2828HAS_NETWORKING=no
     
    5757
    5858ifeq ($(RTEMS_USE_GCC272),yes)
     59
     60# The MC68040 does not implement all MC68881/MC68882 instructions, so use
     61# either the gcc floating-point software support (msoft-float libraries), or
     62# use the Motorola FPSP floating-point emulator in
     63#   rtems/c/src/lib/libcpu/m68k/m68040/fpsp
     64# The default is to use the FPSP.
     65# To use the msoft-float libraries, uncomment the three lines below.
     66# You then should comment the M68KFPSPInstallExceptionHandlers() statement
     67# in rtems/c/src/lib/libbsp/m68k/mvme167/startup/bststart.c in bsp_start().
     68# Floating-point support will then be limited. See the mvme167 README file
     69# for more details.
     70
     71# LIBC_LIBC = $(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a
     72# LIBC_LIBM = $(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a
     73# LIBGCC = $(shell $(CC) -msoft-float -print-libgcc-file-name)
     74
    5975define make-exe
    6076        $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
Note: See TracChangeset for help on using the changeset viewer.