gcc/libgcc
Georg-Johann Lay 51526856a1 re PR target/54222 ([avr] Implement fixed-point support)
gcc/
	PR target/54222
	* config/avr/avr-fixed.md (ALL2S, ALL4S, ALL24S, ALL124S,
	ALL124U): New mode iterators.
	(<code_stdname><mode>3): New insns for SS_PLUS, SS_MINUS.
	(<code_stdname><mode>3): New insns for US_PLUS, US_MINUS.
	(usneg<mode>2): New insns.
	(<code_stdname><mode>2): New expanders for SS_NEG, SS_ABS.
	(*<code_stdname><mode>2): New insns for SS_NEG, SS_ABS.
	* config/avr/avr-dimode.md (ALL8U, ALL8S): New mode iterators.
	(avr_out_plus64, avr_out_minus64): Use avr_out_plus instead.
	(<code_stdname><mode>3): New expanders for SS_PLUS, SS_MINUS.
	(<code_stdname><mode>3): New expanders for US_PLUS, US_MINUS.
	(<code_stdname><mode>3_insn): New insns.
	(<code_stdname><mode>3_const_insn): New insns.
	* config/avr/avr.md (cc): Add: plus. Remove: out_plus,
	out_plus_noclobber, minus.
	(length): Add: plus.  Remove: out_plus, out_plus_noclobber,
	plus64, minus, minus64.
	(abelian): New code_attr.
	(code_stdname): Handle: ss_plus, ss_minus, ss_neg, ss_abs,
	us_plus, us_minus, us_neg.
	(*add<mode>3, add<mode>3_clobber, add<mode>3, addpsi3, sub<mode>3):
	Use avr_out_plus to output.
	* config/avr/avr-protos.h (avr_out_plus): Change prototype.
	(avr_out_plus_noclobber, avr_out_minus): Remove.
	(avr_out_plus64, avr_out_minus64): Remove.
	* config/avr/avr.c (avr_out_plus_1): Add new default arguments
	code_sat, sign.  Saturate after operation if code_sat != UNKNOWN.
	(avr_out_plus_symbol): New static function.
	(avr_out_plus): Rewrite.
	(adjust_insn_length): Handle: ADJUST_LEN_PLUS.  Remove handling
	of: ADJUST_LEN_OUT_PLUS, ADJUST_LEN_PLUS64, ADJUST_LEN_MINUS, 
	ADJUST_LEN_MINUS64, ADJUST_LEN_OUT_PLUS_NOCLOBBER.
	(notice_update_cc): Handle: CC_PLUS.  Remove handling of: CC_MINUS,
	CC_OUT_PLUS, CC_OUT_PLUS_NOCLOBBER
	(avr_out_plus_noclobber, avr_out_minus): Remove.
	(avr_out_plus64, avr_out_minus64): Remove.
	(avr_print_operand): Print raw REGNO if 'r' is used with REG.

libgcc/
	PR target/54222
	* config/avr/lib1funcs-fixed.S (__ssneg_2, __ssabs_2, __ssneg_4,
	__ssabs_4, __clr_8, __ssneg_8, __ssabs_8,
	__usadd_8, __ussub_8, __ssadd_8, __sssub_8): New functions.
	(__divsa3): Use __negsi2 to negate r_quoL.
	* config/avr/lib1funcs.S (FALIAS): New macro.
	(__divmodsi4): Break out and use __divmodsi4_neg1 as...
	(__negsi2): ...this new function.
	* config/avr/t-avr (LIB1ASMFUNCS): Add _negsi2, _clr_8,
	_ssneg_2, _ssneg_4, _ssneg_8, _ssabs_2, _ssabs_4,
	_ssabs_8, _ssadd_8, _sssub_8, _usadd_8, _ussub_8.
	(LIB2FUNCS_EXCLUDE): Fix typo for _add _sub.
	Add: _ssadd*, _sssub*, _ssneg*, _ssabs* for signed fixed modes.
	Add: _usadd*, _ussub*, _usneg* for unsigned fixed modes.

gcc/testsuite/
	PR target/54222
	* gcc.target/avr/torture/fix-types.h: New.
	* gcc.target/avr/torture/vals-hr.def: New.
	* gcc.target/avr/torture/vals-r.def: New.
	* gcc.target/avr/torture/vals-k.def: New.
	* gcc.target/avr/torture/vals-ur.def: New.
	* gcc.target/avr/torture/vals-uk.def: New.
	* gcc.target/avr/torture/vals-uhr.def: New.
	* gcc.target/avr/torture/vals-llk.def: New.
	* gcc.target/avr/torture/vals-ullk.def: New.
	* gcc.target/avr/torture/sat-hr-plus-minus.c: New.
	* gcc.target/avr/torture/sat-r-plus-minus.c: New.
	* gcc.target/avr/torture/sat-k-plus-minus.c: New.
	* gcc.target/avr/torture/sat-ur-plus-minus.c: New.
	* gcc.target/avr/torture/sat-uk-plus-minus.c: New.
	* gcc.target/avr/torture/sat-uhr-plus-minus.c: New.
	* gcc.target/avr/torture/sat-llk-plus-minus.c: New.
	* gcc.target/avr/torture/sat-ullk-plus-minus.c: New.

From-SVN: r191345
2012-09-15 15:52:28 +00:00
..
config re PR target/54222 ([avr] Implement fixed-point support) 2012-09-15 15:52:28 +00:00
soft-fp soft-fp: Imported from glibc upstream. 2012-03-01 21:50:26 +01:00
ChangeLog re PR target/54222 ([avr] Implement fixed-point support) 2012-09-15 15:52:28 +00:00
Makefile.in re PR target/54461 ([avr] add configure option for better AVR-Libc integration) 2012-09-05 08:47:50 +00:00
config.host re PR target/54461 ([avr] add configure option for better AVR-Libc integration) 2012-09-05 08:47:50 +00:00
config.in Use i386-cpuinfo.c on all i386 targets 2012-05-10 08:51:39 +00:00
configure ieee754-df.S: Fix typos. 2012-05-29 15:54:22 +01:00
configure.ac ieee754-df.S: Fix typos. 2012-05-29 15:54:22 +01:00
crtstuff.c crtstuff.c (USE_PT_GNU_EH_FRAME): Define for systems using glibc even if inhibit_libc. 2012-08-19 16:11:40 +01:00
dfp-bit.c dfp-bit.c, dfp-bit.h: Move to ../libgcc. 2011-07-11 14:40:56 +00:00
dfp-bit.h Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
divmod.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
empty.mk Makefile.def (target_modules): Add libgcc. 2007-01-04 04:22:37 +00:00
emutls.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
enable-execute-stack-empty.c enable-execute-stack-empty.c (__enable_execute_stack): Add prototype. 2011-06-22 13:20:07 +02:00
enable-execute-stack-mprotect.c re PR bootstrap/51006 (bootstrap fails on NetBSD 5.1) 2012-01-03 21:39:46 +00:00
fixed-bit.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
fixed-bit.h Makefile.in (LIBGCC_VER_FIXEDPOINT_GNU_PREFIX): New. 2011-08-01 12:02:45 +00:00
fixed-obj.mk Makefile.in (fixed-funcs,fixed-conv-funcs): filter-out LIB2FUNCS_EXCLUDE before adding them to libgcc-objects, libgcc-s-objects. 2012-08-23 15:41:03 +00:00
floatunsidf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsisf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsitf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
floatunsixf.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
fp-bit.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
fp-bit.h Makefile.in (FPBIT_FUNCS, [...]): Remove. 2011-08-05 14:53:09 +00:00
gbl-ctors.h Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
gen-fixed.sh fixed-obj.mk: New file to support fine-grain fixed-point functions. 2007-09-17 22:18:13 +00:00
generic-morestack-thread.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
generic-morestack.c generic-morestack.c (__splitstack_releasecontext): Correct call to __morestack_release_segments. 2012-02-28 17:43:43 +00:00
generic-morestack.h common.opt (fsplit-stack): New option. 2010-09-27 19:48:20 +00:00
gstdint.h dfp.c (WORDS_BIGENDIAN): Define to 0 if not defined. 2008-06-11 00:43:09 +01:00
gthr-posix.h gthr-posix.h [...] (__gthread_active_p): If __GLIBC__ is defined, refer to __pthread_key_create instead of pthread_cancel. 2012-06-11 14:15:38 -07:00
gthr-single.h gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Fix definition. 2012-03-13 09:39:01 +00:00
gthr.h re PR gcov-profile/49484 (gcov crash if two(or more) forks happen at the same time) 2012-03-12 14:23:27 +00:00
libgcc-std.ver.in generic-morestack.c (__splitstack_find): Check for NULL old stack value. 2011-11-28 05:44:31 +00:00
libgcc2.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
libgcc2.h Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
libgcov.c This fixes part of the issue described in PR gcov-profile/54487 where there... 2012-09-07 13:49:47 +00:00
longlong.h longlong.h: (powerpc): Delete _ARCH_PWR and _ARCH_COM handling. 2012-08-16 03:49:57 +02:00
memcmp.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memcpy.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memmove.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
memset.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
mkheader.sh Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
mkmap-flat.awk Remove obsolete Tru64 UNIX V5.1B support 2012-03-12 15:35:56 +00:00
mkmap-symver.awk Move shlib support to toplevel libgcc 2011-11-02 10:49:46 +00:00
shared-object.mk shared-object.mk (c_flags-$o): Save c_flags. 2011-06-21 14:26:13 +00:00
siditi-object.mk Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
static-object.mk Makefile.in (vis_hide, [...]): Do not make definitions depend on --enable-shared. 2012-08-22 09:36:23 +01:00
sync.c sync.c: Move to ../libgcc. 2011-08-09 15:40:30 +00:00
udivmod.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
udivmodsi4.c Move libgcc2 to toplevel libgcc 2011-11-02 15:23:48 +00:00
unwind-arm-common.inc unwind-arm-common.inc: Include `tconfig.h', `tsystem.h' and `sys/sdt.h'. 2011-12-20 20:54:25 +00:00
unwind-c.c eh_personality.cc (__gxx_personality_seh0): New function. 2012-07-19 07:29:24 +00:00
unwind-compat.c Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-compat.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2-fde-compat.c Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2-fde-dip.c unwind-dw2-fde-dip.c: Define USE_PT_GNU_EH_FRAME for BIONIC. 2012-04-24 22:41:33 +00:00
unwind-dw2-fde.c re PR bootstrap/52569 (bootstrap fails on x86_64-apple-darwin10 at revision 185261) 2012-03-13 10:00:48 +00:00
unwind-dw2-fde.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-dw2.c Assert DWARF register size <= saved reg size 2012-03-13 10:07:50 -07:00
unwind-dw2.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-generic.h eh_personality.cc (__gxx_personality_seh0): New function. 2012-07-19 07:29:24 +00:00
unwind-pe.h Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00
unwind-seh.c eh_personality.cc (__gxx_personality_seh0): New function. 2012-07-19 07:29:24 +00:00
unwind-sjlj.c Move libgcc_tm_file to toplevel libgcc 2011-11-02 15:26:35 +00:00
unwind.inc Makefile.in (UNWIND_H): Remove. 2011-08-05 14:37:48 +00:00