This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, Ada testsuite] Handle cd2a83c, cd2a91c, ad8011a


cd2a83c, cd2a91c fail on 64 bit systems (amd64, ia64 and s390x)
because of an hardcoded 32 in ada/acats/support/macro.dfs, fixed
by some machinery (thanks to Richard Kenner for noticing it).

ad8011a fails on ia64,s390,s390x because of an hardcoded "nop"
as valid asm statement, fixed by some machinery (thanks
to Ulrich Weigand for the hint on where to look).

No regression on x86-linux, ok to commit?

Laurent

PS: libada/Makefile.in needs reverting to revision 1.5
in order to get a working Ada build from mainline.

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.
	
Index: run_all.sh
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/ada/acats/run_all.sh,v
retrieving revision 1.15
diff -u -r1.15 run_all.sh
--- run_all.sh	17 Apr 2004 17:14:18 -0000	1.15
+++ run_all.sh	24 Apr 2004 19:48:30 -0000
@@ -88,10 +88,34 @@
 
 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`
+display target_bit="$target_bit"
+
+# 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
+display target_insn="$target_insn"
+
 sed -e "s,ACATS4GNATDIR,$dir,g" \
   < $testdir/support/impdef.a > $dir/support/impdef.a
-sed -e "s,ACATS4GNATDIR,$dir,g" \
-  < $testdir/support/macro.dfs > $dir/support/MACRO.DFS
+cat $testdir/support/macro.dfs | \
+  sed -e "s,ACATS4GNATDIR,$dir,g" \
+      -e "s,ACATS4GNATBIT,$target_bit,g" \
+      -e "s,ACATS4GNATINSN,$target_insn,g" \
+  > $dir/support/MACRO.DFS
 sed -e "s,ACATS4GNATDIR,$dir,g" \
   < $testdir/support/tsttests.dat > $dir/support/TSTTESTS.DAT
 
Index: 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
--- support/macro.dfs	27 Oct 2003 11:28:49 -0000	1.1
+++ support/macro.dfs	24 Apr 2004 19:48:31 -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.
Index: support/impbit.adb
===================================================================
RCS file: support/impbit.adb
diff -N support/impbit.adb
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ support/impbit.adb	24 Apr 2004 19:48:31 -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 Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]