Mainline Ada bootstrap is currently broken on Solaris 8 and 9/x86 with
Sun as:

Assembler: a-strunb.adb
        "/var/tmp//cc6ZxWWa.s", line 2395 : Syntax error
        "/var/tmp//cc6ZxWWa.s", line 2591 : Syntax error
make[7]: *** [a-strunb.o] Error 1

The problem is that s-atocou-x86.adb uses lock incl resp. lock decl,
where older Sun as requires lock; incl.  This is exactly what %; was
introduced for, which is already used in i386/sync.md.

The following patch uses it and allowed i386-pc-solaris2.[89] bootstraps
to complete.  Testing is currently running, and I'll also bootstrap with
gas instead of as once that's finished.

Ok for mainline if those tests pass?

Thanks.
        Rainer


2011-09-23  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        * s-atocou-x86.adb (Decrement): Use %;.
        (Increment): Likewise.

# HG changeset patch
# Parent 66b8372f5970a73e9957914fae8bfbeced71a512
Restore Ada bootstrap on Solaris 8, 9/x86

diff --git a/gcc/ada/s-atocou-x86.adb b/gcc/ada/s-atocou-x86.adb
--- a/gcc/ada/s-atocou-x86.adb
+++ b/gcc/ada/s-atocou-x86.adb
@@ -50,7 +50,7 @@ package body System.Atomic_Counters is
    begin
       System.Machine_Code.Asm
         (Template =>
-           "lock decl" & ASCII.HT & "%0" & ASCII.LF & ASCII.HT
+           "lock%; decl" & ASCII.HT & "%0" & ASCII.LF & ASCII.HT
              & "sete %1",
          Outputs  =>
            (Unsigned_32'Asm_Output ("=m", Item.Value),
@@ -68,7 +68,7 @@ package body System.Atomic_Counters is
    procedure Increment (Item : in out Atomic_Counter) is
    begin
       System.Machine_Code.Asm
-        (Template => "lock incl" & ASCII.HT & "%0",
+        (Template => "lock%; incl" & ASCII.HT & "%0",
          Outputs  => Unsigned_32'Asm_Output ("=m", Item.Value),
          Inputs   => Unsigned_32'Asm_Input ("m", Item.Value),
          Volatile => True);
-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to