public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Dimitar Dimitrov <dimitar@dinux.eu>
To: gcc-patches@gcc.gnu.org
Cc: Dimitar Dimitrov <dimitar@dinux.eu>
Subject: [PATCH v4 04/10] testsuite: Add check for overflowed IMEM region to testsuite
Date: Thu, 06 Sep 2018 11:12:00 -0000	[thread overview]
Message-ID: <20180906111217.24365-5-dimitar@dinux.eu> (raw)
In-Reply-To: <20180906111217.24365-1-dimitar@dinux.eu>

PRU architecture supports maximum 256k program memory (IMEM). Some GCC
test cases manage to produce executables bigger than that.

gcc/testsuite/ChangeLog:

2018-08-29  Dimitar Dimitrov  <dimitar@dinux.eu>

	* lib/gcc-dg.exp: Bail on region overflow for tiny targets.
	* lib/target-utils.exp: Ditto.
	* lib/target-supports.exp: Declare PRU target as tiny.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 gcc/testsuite/lib/gcc-dg.exp          | 5 +++++
 gcc/testsuite/lib/target-supports.exp | 5 +++++
 gcc/testsuite/lib/target-utils.exp    | 4 ++++
 3 files changed, 14 insertions(+)

diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 24d0b00d25d..7ef9de59dc2 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -394,6 +394,11 @@ proc gcc-dg-prune { system text } {
         return "::unsupported::memory full"
     }
 
+    if { [regexp "(^|\n)\[^\n\]*: region \[^\n\]* overflowed" $text] 
+          && [check_effective_target_tiny] } {
+	return "::unsupported::memory full"
+    }
+
     # Likewise, if we see ".text exceeds local store range" or
     # similar.
     if {[string match "spu-*" $system] && \
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index ce89f618349..7d4ea35babb 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -8843,6 +8843,11 @@ proc check_effective_target_tiny {} {
              && [check_effective_target_avr_tiny] } {
          set et_target_tiny_saved 1
        }
+       # PRU Program Counter is 16-bits, and trampolines are not supported.
+       # Hence directly declare as a tiny target.
+       if [istarget pru-*-*] {
+         set et_target_tiny_saved 1
+       }
     }
 
     return $et_target_tiny_saved
diff --git a/gcc/testsuite/lib/target-utils.exp b/gcc/testsuite/lib/target-utils.exp
index bd39cc5bc79..732a1827a02 100644
--- a/gcc/testsuite/lib/target-utils.exp
+++ b/gcc/testsuite/lib/target-utils.exp
@@ -35,6 +35,10 @@ proc ${tool}_check_unsupported_p { output } {
           && [check_effective_target_tiny] } {
         return "memory full"
      }
+    if { [regexp "(^|\n)\[^\n\]*: region \[^\n\]* overflowed" $output]
+          && [check_effective_target_tiny] } {
+	return "memory full"
+    }
 
     if { [istarget spu-*-*] && \
 	     [string match "*exceeds local store*" $output] } {
-- 
2.11.0

  reply	other threads:[~2018-09-06 11:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-06 11:12 [PATCH v4 00/10] New backend for the TI PRU processor Dimitar Dimitrov
2018-09-06 11:12 ` Dimitar Dimitrov [this message]
2018-09-06 11:13 ` [PATCH v4 05/10] testsuite: Add check for unsupported TI ABI PRU features to testsuite Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 08/10] testsuite: Mark that PRU has one-cycle jumps Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 10/10] testsuite: Mark testsuite that PRU has different calling convention Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 03/10] testsuite: Add PRU tests Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 06/10] testsuite: Remove PRU from test cases requiring hosted environment Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 09/10] testsuite: Mark that PRU uses all function pointer bits Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 01/10] Initial TI PRU GCC port Dimitar Dimitrov
2018-09-13 13:13   ` Richard Sandiford
2018-09-22 10:23     ` Dimitar Dimitrov
2018-09-24 10:49       ` Richard Sandiford
2018-09-24 17:49         ` Jeff Law
2018-09-25  5:16         ` Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 07/10] testsuite: Define PRU stack usage Dimitar Dimitrov
2018-09-06 11:13 ` [PATCH v4 02/10] Initial TI PRU libgcc port Dimitar Dimitrov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180906111217.24365-5-dimitar@dinux.eu \
    --to=dimitar@dinux.eu \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).