Changeset 54f440d in rtems


Ignore:
Timestamp:
07/26/99 22:11:02 (24 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
c32555c
Parents:
220ad7d
Message:

Patch from Charles-Antoine Gauthier <charles.gauthier@…>.
to address m68k-rtemself for the MVME167.

Here is the rtems patch I promissed you a long time ago to enable ELF
with m68k. The target name I selected is m68k-rtemself. It preserves the
m68k-rtems COFF target, and is parterned after the other ELF/COFF dual
targets.

The mvme167.cfg file causes the -qelf flag to be used during compilation
if the name of the compiler contains rtemself. This flag is used in the
bsp_specs file to select the elflinkcmds file rather than the linkcmds
file. The former is for ELF, the latter for COFF.

Some patches are required to the mc68040 FPSP code. Some of the
assembler files contain instructions that were rejected by the
m68k-rtemself-as assembler. This is a minor bug in the m68k ELF
assembler, I think.

Location:
c/src/lib
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mvme167/bsp_specs

    r220ad7d r54f440d  
    88%(old_cpp) %{qrtems: -D__embedded__} -Asystem(embedded)
    99
     10*endfile:
     11crtend.o%s crtn.o%s
     12
    1013*lib:
    1114%{!qrtems: %(old_lib)} %{qrtems: --start-group \
    1215%{!qrtems_debug: -lrtemsall} %{qrtems_debug: -lrtemsall_g} \
    1316-lc -lgcc --end-group \
    14 %{!qnolinkcmds: -T linkcmds%s}}
     17%{!qelf: %{!qnolinkcmds: -T linkcmds%s}} %{qelf: %{!qnolinkcmd: -T
     18elflinkcmds%s}}}
    1519
    1620*startfile:
    1721%{!qrtems: %(old_startfile)} %{qrtems: \
    1822%{!qrtems_debug: start.o%s} \
    19 %{qrtems_debug: start_g.o%s}}
     23%{qrtems_debug: start_g.o%s} crti.o%s crtbegin.o%s}
    2024
    2125*link:
  • c/src/lib/libbsp/m68k/mvme167/startup/Makefile.in

    r220ad7d r54f440d  
    2424H_FILES =
    2525
    26 SRCS = $(srcdir)/linkcmds $(C_FILES) $(H_FILES)
     26SRCS = $(srcdir)/linkcmds $(srcdir)/elflinkcmds $(C_FILES) $(H_FILES)
    2727OBJS = $(C_O_FILES)
    2828
     
    4242#
    4343
    44 DEFINES +=
     44# USE_INIT_FINI tells main.c what C++ help we need.
     45
     46DEFINES += -DUSE_INIT_FINI
    4547CPPFLAGS +=
    4648CFLAGS +=
     
    6567all: ${ARCH} $(SRCS) $(PGM)
    6668        $(INSTALL_CHANGE) $(srcdir)/linkcmds $(PROJECT_RELEASE)/lib
     69        $(INSTALL_CHANGE) $(srcdir)/elflinkcmds $(PROJECT_RELEASE)/lib
    6770
    6871Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
  • c/src/lib/libbsp/shared/bootcard.c

    r220ad7d r54f440d  
    2828
    2929/* Initialize C++ global Ctor/Dtor and initializes exception handling. */
    30 #ifdef USE_INIT_FINI
     30#if defined(USE_INIT_FINI)
    3131extern void _fini( void );
    3232extern void _init( void );
  • c/src/lib/libcpu/m68k/m68040/fpsp/bindec.S

    r220ad7d r54f440d  
    487487        fabsx   %fp0            //use abs(X)
    488488        tstw    %d5             //LAMBDA is in lower word of d5
    489         bnes    sc_mul          //if neg (LAMBDA = 1), scale by mul
     489        bne     sc_mul          //if neg (LAMBDA = 1), scale by mul
    490490        fdivx   %fp1,%fp0               //calculate X / SCALE -> Y to fp0
    491491        bras    A10_st          //branch to A10
  • c/src/lib/libcpu/m68k/m68040/fpsp/decbin.S

    r220ad7d r54f440d  
    233233m_sign:
    234234        btst    #31,(%a0)       //test sign of the mantissa
    235         beqs    ap_st_z         //if clear, go to append/strip zeros
     235        beq     ap_st_z         //if clear, go to append/strip zeros
    236236        fnegx   %fp0            //if set, negate fp0
    237237       
     
    291291        ble     pwrten          //if abs(expA) <28, skip ap/st zeros
    292292        btst    #30,(%a0)       //check sign of exp
    293         bnes    ap_st_n         //if neg, go to neg side
     293        bne     ap_st_n         //if neg, go to neg side
    294294        clrl    %d1             //zero count reg
    295295        movel   (%a0),%d4               //load lword 1 to d4
     
    339339        bnes    ap_p_el         //if not, get next bit
    340340        fmulx   %fp1,%fp0               //mul mantissa by 10**(no_bits_shifted)
    341         bras    pwrten          //go calc pwrten
     341        bra     pwrten          //go calc pwrten
    342342//
    343343// This section handles a negative adjusted exponent.
  • c/src/lib/libcpu/m68k/m68040/fpsp/do_func.S

    r220ad7d r54f440d  
    8080        andl    #0x7F,%d0
    8181        cmpil   #0x38,%d0               //if the extension is >= $38,
    82         bges    serror          //it is illegal
     82        bge     serror          //it is illegal
    8383        bfextu  STAG(%a6){#0:#3},%d1
    8484        lsll    #3,%d0          //make room for STAG
  • c/src/lib/libcpu/m68k/m68040/fpsp/get_op.S

    r220ad7d r54f440d  
    174174        clrb    DY_MO_FLG(%a6)
    175175        tstb    UFLG_TMP(%a6)   //test flag for unsupp/unimp state
    176         beqs    uni_getop
     176        beq     uni_getop
    177177
    178178uns_getop:
  • c/src/lib/libcpu/m68k/m68040/fpsp/util.S

    r220ad7d r54f440d  
    141141ovf_fsgl:
    142142        clrl    %d0
    143         bras    ovf_res
     143        bra     ovf_res
    144144
    145145ovff_sgl:
    146146        movel   #0x00000001,%d0         //set single
    147         bras    ovf_res
     147        bra     ovf_res
    148148ovff_dbl:
    149149        movel   #0x00000002,%d0         //set double
    150         bras    ovf_res
     150        bra     ovf_res
    151151//
    152152// The precision is in the fpcr.
     
    154154ovf_fpcr:
    155155        bfextu  FPCR_MODE(%a6){#0:#2},%d0 //set round precision
    156         bras    ovf_res
     156        bra     ovf_res
    157157       
    158158//
  • c/src/lib/libcpu/m68k/m68040/fpsp/x_store.S

    r220ad7d r54f440d  
    9595        beq     dest_ext        //then branch
    9696        cmpil   #1,%d0          //if dest format is single
    97         beqs    dest_sgl        //then branch
     97        beq     dest_sgl        //then branch
    9898//
    9999//      fall through to dest_dbl
Note: See TracChangeset for help on using the changeset viewer.