Commit Graph

7 Commits

Author SHA1 Message Date
Stafford Horne da8a9d695b or1k: Use cmodel=large when building crtstuff
When linking gcc runtime objects into large binaries the link may fail
with the below errors.  This will happen even if we are building with
-mcmodel=large.

    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `deregister_tm_clones':
    crtstuff.c:(.text+0x3c): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_deregisterTMCloneTable'
    /home/shorne/work/openrisc/output/host/lib/gcc/or1k-buildroot-linux-uclibc/10.3.0/crtbeginS.o: in function `register_tm_clones':
    crtstuff.c:(.text+0xc0): relocation truncated to fit: R_OR1K_GOT16 against undefined symbol `_ITM_registerTMCloneTable'

This patch builds the gcc crtstuff binaries always with the
-mcmodel=large option to ensure they can be linked into large binaries.

libgcc/ChangeLog:

	PR target/99783
	* config.host (or1k-*, tmake_file): Add or1k/t-crtstuff.
	* config/or1k/t-crtstuff: New file.
2021-08-15 07:23:12 +09:00
Stafford Horne b77f6d2fa8 or1k: Support for softfloat to emulate hw exceptions
This allows the openrisc softfloat implementation to set exceptions.
This also sets the correct tininess after rounding value to be
consistent with hardware and simulator implementations.

libgcc/ChangeLog:

	* config/or1k/sfp-machine.h (FP_RND_NEAREST, FP_RND_ZERO,
	FP_RND_PINF, FP_RND_MINF, FP_RND_MASK, FP_EX_OVERFLOW,
	FP_EX_UNDERFLOW, FP_EX_INEXACT, FP_EX_INVALID, FP_EX_DIVZERO,
	FP_EX_ALL): New constant macros.
	(_FP_DECL_EX, FP_ROUNDMODE, FP_INIT_ROUNDMODE,
	FP_HANDLE_EXCEPTIONS): New macros.
	(_FP_TININESS_AFTER_ROUNDING): Change to 1.
2021-01-14 08:45:01 +09:00
Jakub Jelinek 99dee82307 Update copyright years. 2021-01-04 10:26:59 +01:00
Jakub Jelinek 8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Stafford Horne 9c0dba7c45 or1k: Fix issues with msoft-div
Fixes bad assembly logic with software divide as reported by Richard Selvaggi.
Also, add a basic test to verify the soft math works when enabled.

gcc/testsuite/ChangeLog:

	PR target/90362
	* gcc.target/or1k/div-mul-3.c: New test.

libgcc/ChangeLog:

	PR target/90362
	* config/or1k/lib1funcs.S (__udivsi3): Change l.sfeqi
	to l.sfeq and l.sfltsi to l.sflts equivalents as the immediate
	instructions are not available on every processor.  Change a
	l.bnf to l.bf to fix logic issue.

From-SVN: r273648
2019-07-21 20:59:50 +00:00
Jakub Jelinek a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Stafford Horne d929e137f8 or1k: libgcc: initial support for openrisc
libgcc/ChangeLog:

2018-11-09  Stafford Horne  <shorne@gmail.com>
	    Richard Henderson  <rth@twiddle.net>

	* config.host: Add OpenRISC support.
	* config/or1k/*: New.


Co-Authored-By: Richard Henderson <rth@twiddle.net>

From-SVN: r265961
2018-11-09 12:09:15 +00:00