[Bug target/92846] [ARC] gloating point compares not generating Invalid Operand
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92846 --- Comment #3 from claziss at gcc dot gnu.org --- Author: claziss Date: Thu Dec 12 08:42:21 2019 New Revision: 279274 URL: https://gcc.gnu.org/viewcvs?rev=279274&root=gcc&view=rev Log: [ARC] generate signaling FDCMPF for hard float comparisons PR 92846: ARC gcc generates FDCMP instructions which raises Invalid operation for signaling NaN only. This causes glibc iseqsig() primitives to fail (in the current ongoing glibc port to ARC) So break up the hard float compares into tw categories and for unordered compares generate the FDCMPF instructions which raised exception for either NaNs. With this fix testsuite/gcc.dg/torture/pr52451.c passes for ARC. Also no regressions for the glibc math testsuite, only 6 additional passes for test*iseqsig gcc/ -xx-xx Vineet Gupta * config/arc/arc-modes.def (CC_FPUE): New Mode CC_FPUE which helps codegen generate exceptions even for quiet NaN. * config/arc/arc.c (arc_init_reg_tables): Handle New CC_FPUE mode. (get_arc_condition_code): Likewise. (arc_select_cc_mode): LT, LE, GT, GE to use the New CC_FPUE mode. * config/arc/arc.h (REVERSE_CONDITION): Handle New CC_FPUE mode. * config/arc/predicates.md (proper_comparison_operator): Likewise. * config/arc/fpu.md (cmpsf_fpu_trap): New Pattern for CC_FPUE. (cmpdf_fpu_trap): Likewise. Signed-off-by: Vineet Gupta Modified: trunk/gcc/ChangeLog trunk/gcc/config/arc/arc-modes.def trunk/gcc/config/arc/arc.c trunk/gcc/config/arc/arc.h trunk/gcc/config/arc/fpu.md trunk/gcc/config/arc/predicates.md
[Bug target/89877] [ARC] miscompilation due to missing cc clobber in longlong.h: add_ssaaaa()/sub_ddmmss()
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89877 --- Comment #2 from claziss at gcc dot gnu.org --- Author: claziss Date: Wed Apr 3 09:53:03 2019 New Revision: 270118 URL: https://gcc.gnu.org/viewcvs?rev=270118&root=gcc&view=rev Log: [ARC]PR 88409: miscompilation due to missing cc clobber in longlong.h macros simple test such as below was failing. | void main(int argc, char *argv[]) | { |size_t total_time = 115424; // expected 115.424 |double secs = (double)total_time/(double)1000; |printf("%s %d %lf\n", "secs", total_time, secs); // prints 113.504 |printf("%d\n", (size_t)secs); | } The printf eventually called into glibc stdlib/divrem.c:__mpn_divrem() which uses the __arc__ specific inline asm macros from longlong.h which were causing miscompilation. include/ 2019-03-28 Vineet Gupta PR 89877 * longlong.h [__arc__] (add_ss): Add cc clobber (sub_ddmmss): Likewise. Signed-off-by: Claudiu Zissulescu Modified: trunk/include/ChangeLog trunk/include/longlong.h
[Bug target/85968] gcc/config/arc/arc.c:9805: bad test ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85968 --- Comment #2 from claziss at gcc dot gnu.org --- Author: claziss Date: Wed Nov 14 11:31:12 2018 New Revision: 266107 URL: https://gcc.gnu.org/viewcvs?rev=266107&root=gcc&view=rev Log: [ARC] Backport form mainline PR target/85968 * config/arc/arc.c (arc_return_address_register): Fix if-condition. Modified: branches/gcc-8-branch/gcc/ChangeLog branches/gcc-8-branch/gcc/config/arc/arc.c