Re: [PATCH 05/11] testsuite: Add check for unsupported TI ABI PRU features to testsuite

2018-06-22 Thread Jeff Law
On 06/13/2018 12:57 PM, Dimitar Dimitrov wrote:
> Not all C language features are supported when -mabi=ti option is
> used for PRU target.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-06-13  Dimitar Dimitrov  
> 
>   * lib/gcc-dg.exp: Filter unsupported features in PRU's TI ABI mode.
>   * lib/target-utils.exp: Ditto.
I think a level of indirection would be better here.  ie, define a new
routines that indicate if the target has function pointers and large
return values and call that routine from within gcc-dg-prune and
*_check_supported_p.

Those routines would obviously return true for pru :-)

With that change this will be OK once the rest of the kit is approved.

jeff


[PATCH 05/11] testsuite: Add check for unsupported TI ABI PRU features to testsuite

2018-06-13 Thread Dimitar Dimitrov
Not all C language features are supported when -mabi=ti option is
used for PRU target.

gcc/testsuite/ChangeLog:

2018-06-13  Dimitar Dimitrov  

* lib/gcc-dg.exp: Filter unsupported features in PRU's TI ABI mode.
* lib/target-utils.exp: Ditto.

Signed-off-by: Dimitar Dimitrov 
---
 gcc/testsuite/lib/gcc-dg.exp   | 11 +++
 gcc/testsuite/lib/target-utils.exp |  8 
 2 files changed, 19 insertions(+)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index c5ab850c840..f4976520282 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -388,6 +388,17 @@ proc gcc-dg-prune { system text } {
return "::unsupported::memory full"
 }
 
+if {[string match "pru-*" $system] && \
+   [string match "*error: function pointers not supported with 
-mabi=ti option*" $text]} {
+   # The format here is important.  See dg.exp.
+   return "::unsupported::abi"
+}
+if {[string match "pru-*" $system] && \
+   [string match "*error: large return values not supported with 
-mabi=ti option*" $text]} {
+   # The format here is important.  See dg.exp.
+   return "::unsupported::abi"
+}
+
 return $text
 }
 
diff --git a/gcc/testsuite/lib/target-utils.exp 
b/gcc/testsuite/lib/target-utils.exp
index 732a1827a02..e288447ef1d 100644
--- a/gcc/testsuite/lib/target-utils.exp
+++ b/gcc/testsuite/lib/target-utils.exp
@@ -44,5 +44,13 @@ proc ${tool}_check_unsupported_p { output } {
 [string match "*exceeds local store*" $output] } {
return "memory full"
 }
+if {[istarget pru-*] && \
+   [string match "*error: large return values not supported with 
-mabi=ti option*" $output]} {
+   return "abi not supported"
+}
+if {[istarget pru-*] && \
+   [string match "*error: function pointers not supported with 
-mabi=ti option*" $output]} {
+   return "abi not supported"
+}
 return ""
 }
-- 
2.11.0