summaryrefslogtreecommitdiff
path: root/scripts/gen-as-const.awk
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /scripts/gen-as-const.awk
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'scripts/gen-as-const.awk')
-rw-r--r--scripts/gen-as-const.awk28
1 files changed, 4 insertions, 24 deletions
diff --git a/scripts/gen-as-const.awk b/scripts/gen-as-const.awk
index c529fa42c8..a315066422 100644
--- a/scripts/gen-as-const.awk
+++ b/scripts/gen-as-const.awk
@@ -13,17 +13,7 @@ BEGIN { started = 0 }
/^#/ { print; next }
NF >= 1 && !started {
- if (test) {
- print "\n#include <stdio.h>";
- print "\nstatic int do_test (void)\n{\n int bad = 0, good = 0;\n";
- print "#define TEST(name, source, expr) \\\n" \
- " if (asconst_##name != (expr)) { ++bad;" \
- " fprintf (stderr, \"%s: %s is %ld but %s is %ld\\n\"," \
- " source, #name, (long int) asconst_##name, #expr, (long int) (expr));" \
- " } else ++good;\n";
- }
- else
- print "void dummy(void) {";
+ print "void dummy(void) {";
started = 1;
}
@@ -35,18 +25,8 @@ NF == 1 { sub(/^.*$/, "& &"); }
NF > 1 {
name = $1;
sub(/^[^ ]+[ ]+/, "");
- if (test)
- print " TEST (" name ", \"" FILENAME ":" FNR "\", " $0 ")";
- else
- printf "asm (\"@@@name@@@%s@@@value@@@%%0@@@end@@@\" : : \"i\" (%s));\n",
- name, $0;
+ printf "asm (\"@@@name@@@%s@@@value@@@%%0@@@end@@@\" : : \"i\" (%s));\n",
+ name, $0;
}
-END {
- if (test) {
- print " printf (\"%d errors in %d tests\\n\", bad, good + bad);"
- print " return bad != 0 || good == 0;\n}\n";
- print "#define TEST_FUNCTION do_test ()";
- }
- else if (started) print "}";
-}
+END { if (started) print "}" }