This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][3.4][Ada] fix ACATS 64 bit tests handling
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Arnaud Charlet <charlet at ACT-Europe dot FR>, Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 06 Jan 2005 21:27:30 +0100
- Subject: [PATCH][3.4][Ada] fix ACATS 64 bit tests handling
Hi, Richard Kenner suggested I backport ACATS harness changes made
for supporting 64 bits targets from mainline to the 3.4 branch,
here is the patch, tested on x86 (no change) and x86_64 where two
ACATS "failures" are fixed:
before: http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg00239.html
after: http://gcc.gnu.org/ml/gcc-testresults/2005-01/msg00254.html
Ok to commit? 3.4 ACATS stuff becomes exactly the same as mainline but
for "" instead of "-O2" as compilation flag.
Laurent
PS: includes an update for my email address on the branch.
Index: MAINTAINERS
===================================================================
RCS file: /cvs/gcc/gcc/MAINTAINERS,v
retrieving revision 1.332.2.7
diff -u -r1.332.2.7 MAINTAINERS
--- MAINTAINERS 6 Oct 2004 12:00:26 -0000 1.332.2.7
+++ MAINTAINERS 6 Jan 2005 20:14:00 -0000
@@ -209,7 +209,7 @@
Kaveh Ghazi ghazi@caip.rutgers.edu
Matthew Gingell gingell@gnat.com
Anthony Green green@redhat.com
-Laurent Guerby guerby@acm.org
+Laurent Guerby laurent@guerby.net
Olivier Hainque hainque@act-europe.fr
Stuart Hastings stuart@apple.com
Matthew Hiller hiller@redhat.com
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/ChangeLog,v
retrieving revision 1.856.2.25
diff -u -r1.856.2.25 ChangeLog
--- ChangeLog 5 Nov 2004 03:33:10 -0000 1.856.2.25
+++ ChangeLog 6 Jan 2005 20:14:10 -0000
@@ -1,1 +1,5 @@
+2005-01-06 Laurent GUERBY <laurent@guerby.net>
+
+ * MAINTAINERS: Update my email address.
+
2004-11-04 Release Manager
* GCC 3.4.3 released.
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ChangeLog,v
retrieving revision 1.3389.2.341
diff -u -r1.3389.2.341 ChangeLog
--- ChangeLog 5 Jan 2005 23:46:54 -0000 1.3389.2.341
+++ ChangeLog 6 Jan 2005 20:18:55 -0000
@@ -1,3 +1,24 @@
+2005-01-06 Laurent GUERBY <laurent@guerby.net>
+
+ Backport from mainline:
+
+ 2004-11-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * ada/acats/run_acats (LD_LIBRARY_PATH): Add previous LD_LIBRARY_PATH
+ to LD_LIBRARY_PATH. Export LD_LIBRARY_PATH.
+
+ 2004-04-24 Laurent GUERBY <laurent@guerby.net>
+ Ulrich Weigand <uweigand@de.ibm.com>
+
+ * ada/acats/run_all.sh: Define $target variable.
+
+ 2004-04-24 Laurent GUERBY <laurent@guerby.net>
+
+ * ada/acats/run_all.sh: Handle cd2a83c, cd2a91c (target_bit)
+ and ad8011a (target_insn).
+ * ada/acats/support/macro.dfs: Likewise.
+ * ada/acats/support/impbit.adb: New file.
+
2005-01-06 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20050105-1.c: New test.
Index: ada/acats/run_acats
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ada/acats/run_acats,v
retrieving revision 1.5
diff -u -r1.5 run_acats
--- ada/acats/run_acats 8 Jan 2004 15:19:36 -0000 1.5
+++ ada/acats/run_acats 6 Jan 2005 20:18:55 -0000
@@ -14,6 +14,7 @@
PATH=$BASE:$ROOT:$PATH
ADA_INCLUDE_PATH=$BASE/ada/rts
+LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$LD_LIBRARY_PATH
ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH
if [ ! -d $ADA_INCLUDE_PATH ]; then
@@ -33,7 +34,7 @@
GCC_DRIVER="$BASE/xgcc"
GCC="$BASE/xgcc -B$BASE/"
-export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC
+export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC LD_LIBRARY_PATH
echo '#!/bin/sh' > host_gnatchop
echo PATH=`dirname $host_gnatchop`:'$PATH' >> host_gnatchop
Index: ada/acats/run_all.sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ada/acats/run_all.sh,v
retrieving revision 1.14
diff -u -r1.14 run_all.sh
--- ada/acats/run_all.sh 13 Jan 2004 11:48:46 -0000 1.14
+++ ada/acats/run_all.sh 6 Jan 2005 20:18:56 -0000
@@ -71,10 +71,12 @@
display " === acats configuration ==="
+target=`$GCC -dumpmachine`
+
display target gcc is $GCC
display `$GCC -v 2>&1`
display host=`gcc -dumpmachine`
-display target=`$GCC -dumpmachine`
+display target=$target
display `type gnatmake`
gnatls -v >> $dir/acats.log
display ""
@@ -88,9 +90,32 @@
cp $testdir/support/*.ada $testdir/support/*.a $testdir/support/*.tst $dir/support
+# Find out the size in bit of an address on the target
+target_gnatmake $testdir/support/impbit.adb >> $dir/acats.log 2>&1
+target_run $dir/support/impbit > $dir/support/impbit.out 2>&1
+target_bit=`cat $dir/support/impbit.out`
+echo target_bit="$target_bit" >> $dir/acats.log
+
+# Find out a suitable asm statement
+# Adapted from configure.ac gcc_cv_as_dwarf2_debug_line
+case "$target" in
+ ia64*-*-* | s390*-*-*)
+ target_insn="nop 0"
+ ;;
+ mmix-*-*)
+ target_insn="swym 0"
+ ;;
+ *)
+ target_insn="nop"
+ ;;
+esac
+echo target_insn="$target_insn" >> $dir/acats.log
+
sed -e "s,ACATS4GNATDIR,$dir,g" \
< $testdir/support/impdef.a > $dir/support/impdef.a
sed -e "s,ACATS4GNATDIR,$dir,g" \
+ -e "s,ACATS4GNATBIT,$target_bit,g" \
+ -e "s,ACATS4GNATINSN,$target_insn,g" \
< $testdir/support/macro.dfs > $dir/support/MACRO.DFS
sed -e "s,ACATS4GNATDIR,$dir,g" \
< $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
Index: ada/acats/support/impbit.adb
===================================================================
RCS file: ada/acats/support/impbit.adb
diff -N ada/acats/support/impbit.adb
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ada/acats/support/impbit.adb 6 Jan 2005 20:18:56 -0000
@@ -0,0 +1,6 @@
+with System;
+with Ada.Text_IO;
+procedure Impbit is
+begin
+ Ada.Text_IO.Put_Line (System.Address'Size'Img);
+end Impbit;
Index: ada/acats/support/macro.dfs
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ada/acats/support/macro.dfs,v
retrieving revision 1.1
diff -u -r1.1 macro.dfs
--- ada/acats/support/macro.dfs 27 Oct 2003 11:28:49 -0000 1.1
+++ ada/acats/support/macro.dfs 6 Jan 2005 20:18:56 -0000
@@ -99,7 +99,7 @@
-- AN INTEGER LITERAL WHOSE VALUE IS THE MINIMUM NUMBER OF BITS
-- SUFFICIENT TO HOLD ANY VALUE OF AN ACCESS TYPE.
-- USED IN: CD2A83C BD2A02A
-ACC_SIZE 32
+ACC_SIZE ACATS4GNATBIT
-- $ALIGNMENT
-- A VALUE THAT IS LEGITIMATE FOR USE IN A RECORD ALIGNMENT CLAUSE.
@@ -220,7 +220,7 @@
-- MACHINE_CODE. IF THE IMPLEMENTATION DOES NOT SUPPORT MACHINE
-- CODE THEN USE THE ADA NULL STATEMENT (I.E. NULL; ).
-- USED IN: AD8011A BD8001A BD8002A BD8004A BD8004B
-MACHINE_CODE_STATEMENT Asm_Insn'(Asm ("nop"));
+MACHINE_CODE_STATEMENT Asm_Insn'(Asm ("ACATS4GNATINSN"));
-- $MAX_INT
-- AN INTEGER LITERAL WHOSE VALUE IS SYSTEM.MAX_INT.
@@ -271,7 +271,7 @@
-- AN INTEGER LITERAL WHOSE VALUE IS THE NUMBER OF BITS REQUIRED TO
-- HOLD A TASK OBJECT.
-- USED IN: CD2A91C
-TASK_SIZE 32
+TASK_SIZE ACATS4GNATBIT
-- $TASK_STORAGE_SIZE
-- THE NUMBER OF STORAGE UNITS REQUIRED FOR A TASK ACTIVATION.