From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: Jie Zhang <jie@codesourcery.com>
Subject: [PATCH] sim: tests: support .S files
Date: Sun, 14 Mar 2010 22:02:00 -0000 [thread overview]
Message-ID: <1268604229-26466-1-git-send-email-vapier@gentoo.org> (raw)
From: Jie Zhang <jie@codesourcery.com>
Rather than requiring all sim tests to be preprocessed .s files, add
support for .S files so we can easily write code using normal CPP
defines/macros.
Signed-off-by: Jie Zhang <jie@codesourcery.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
2010-03-14 Jie Zhang <jie@codesourcery.com>
* lib/sim-defs.exp (run_sim_test): Run source file through preprocessor
when it matches "*.S".
sim/testsuite/lib/sim-defs.exp | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 3cef394..9314f2f 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -301,7 +301,18 @@ proc run_sim_test { name requested_machs } {
if [info exists cpu_option] {
set as_options "$as_options $cpu_option=$mach"
}
- set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"]
+ if [string match "*.S" $sourcefile] {
+ set comp_output [target_compile $sourcefile ${name}.s "preprocess" "incdir=$srcdir/$subdir"]
+ if ![string match "" $comp_output] {
+ verbose -log "$comp_output" 3
+ fail "$mach $testname (preprocessing)"
+ continue
+ }
+ set comp_output [target_assemble ${name}.s ${name}.o "$as_options $global_as_options"]
+ file delete ${name}.s
+ } else {
+ set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"]
+ }
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
--
1.7.0
next reply other threads:[~2010-03-14 22:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-14 22:02 Mike Frysinger [this message]
2010-03-15 0:43 ` Matt Rice
2010-03-15 1:46 ` Jie Zhang
2010-03-15 7:09 ` Mike Frysinger
2010-03-15 10:54 ` Matt Rice
2010-03-19 20:12 ` Mike Frysinger
2010-03-15 20:17 ` DJ Delorie
2011-03-14 8:20 Mike Frysinger
2011-03-14 12:32 ` Pedro Alves
2011-03-14 21:06 ` Mike Frysinger
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=1268604229-26466-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=jie@codesourcery.com \
/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