Skip to content

Commit

Permalink
libgcc, testsuite : add DFP rules for Darwin, adjust tests.
Browse files Browse the repository at this point in the history
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libgcc/ChangeLog:

	* config.host: Add DFP rules.

gcc/testsuite/ChangeLog:

	* gcc.dg/torture/convert-dfp-2.c: Adjust scan asms for Darwin.
	* gcc.dg/torture/convert-dfp.c: Likewise.
  • Loading branch information
iains committed Dec 3, 2022
1 parent 086b485 commit d679055
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
19 changes: 13 additions & 6 deletions gcc/testsuite/gcc.dg/torture/convert-dfp-2.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,16 @@ int main ()
return 0;
}

/* { dg-final { scan-assembler-times {\t__bid_truncsdhf} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_truncddhf} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_truncddsd2} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctdhf} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctdsd2} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctddd2} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_truncsdhf} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_truncddhf} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_truncddsd2} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctdhf} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctdsd2} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_trunctddd2} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */

/* { dg-final { scan-assembler-times {\t___bid_truncsdhf} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_truncddhf} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_truncddsd2} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_trunctdhf} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_trunctdsd2} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_trunctddd2} 1 { target { dfp_bid && *-*-darwin* } } } } */
19 changes: 13 additions & 6 deletions gcc/testsuite/gcc.dg/torture/convert-dfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ int main()
return 0;
}

/* { dg-final { scan-assembler-times {\t__bid_extendsddd2} 3 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendsdtd2} 3 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendddtd2} 3 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhfsd} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhfdd} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhftd} 2 { target { dfp_bid } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendsddd2} 3 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendsdtd2} 3 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendddtd2} 3 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhfsd} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhfdd} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */
/* { dg-final { scan-assembler-times {\t__bid_extendhftd} 2 { target { dfp_bid && { ! *-*-darwin* } } } } } */

/* { dg-final { scan-assembler-times {\t___bid_extendsddd2} 2 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_extendsdtd2} 2 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_extendddtd2} 2 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_extendhfsd} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_extendhfdd} 1 { target { dfp_bid && *-*-darwin* } } } } */
/* { dg-final { scan-assembler-times {\t___bid_extendhftd} 1 { target { dfp_bid && *-*-darwin* } } } } */
2 changes: 1 addition & 1 deletion libgcc/config.host
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ aarch64*-*-darwin*)
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
tmake_file="${tmake_file} ${cpu_type}/t-lse "
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp "
tmake_file="${tmake_file} t-crtfm"
tmake_file="${tmake_file} t-crtfm t-dfprules"
md_unwind_header=aarch64/aarch64-unwind.h
if test x$off_stack_trampolines = xyes; then
tmake_file="${tmake_file} ${cpu_type}/t-heap-trampoline"
Expand Down

0 comments on commit d679055

Please sign in to comment.