public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register
@ 2003-06-03 12:46 graham.hanson@nats.co.uk
  2003-06-03 12:50 ` [Bug ada/11079] " graham.hanson@nats.co.uk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: graham.hanson@nats.co.uk @ 2003-06-03 12:46 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079

           Summary: Ada: Inline-Assembler - Outputs => only stores last
                    mentioned register
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: graham.hanson@nats.co.uk
                CC: gcc-bugs@gcc.gnu.org

I am using the Mingw distribution: gcc-3.2-Ada-20020817-1.tar.gz. on both 
Windows NT 4 Sp6a and Windows XP Home.

Because I am new to Ada, and as a test, I copied the inline assembler example 
from section 24.7 of the GNAT Users' Guide for Unix Platforms. The example 
compiled Ok but the Vendor_ID function was producing odd results. In 
particular, instead of "GenuineIntel", it was returning "xxxxineIxxxx" where 
the "x"s are random(ish) characters. 
When I compiled using -S the listing showed that only register edx (the one 
containing "ineI"!) was being stored into the Ada variable, ebx and ecx were 
being ignored. This is despite the fact that the code contains:

    Outputs => (Unsigned_Register'Asm_output ("=b", Ebx),
                Unsigned_Register'Asm_output ("=c", Ecx),
                Unsigned_Register'Asm_output ("=d", Edx)) );

By swapping the order around, I was able to demonstrate, that code was only 
being generated to store the last mentioned register (edx in the example). The 
other registers were being ignored!

I have generated a cut down unit asm_bug.adb (and asm_bug.S) demonstrating the 
problem that I can send if required. This unit includes a function Vendor_ID_OK 
that uses CPUID three times storing ebx, ecx and edx separately and returns the 
correct result of "GenuineIntel".


Regards

Graham



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ada/11079] Ada: Inline-Assembler - Outputs => only stores last mentioned register
  2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
@ 2003-06-03 12:50 ` graham.hanson@nats.co.uk
  2003-06-03 12:51 ` graham.hanson@nats.co.uk
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: graham.hanson@nats.co.uk @ 2003-06-03 12:50 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079



------- Additional Comments From graham.hanson@nats.co.uk  2003-06-03 12:50 -------
Created an attachment (id=4153)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4153&action=view)
Ada unit demonstrating the problem




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ada/11079] Ada: Inline-Assembler - Outputs => only stores last mentioned register
  2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
  2003-06-03 12:50 ` [Bug ada/11079] " graham.hanson@nats.co.uk
@ 2003-06-03 12:51 ` graham.hanson@nats.co.uk
  2003-06-03 12:53 ` graham.hanson@nats.co.uk
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: graham.hanson@nats.co.uk @ 2003-06-03 12:51 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079


graham.hanson@nats.co.uk changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4153|application/octet-stream    |text/plain
          mime type|                            |





------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ada/11079] Ada: Inline-Assembler - Outputs => only stores last mentioned register
  2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
  2003-06-03 12:50 ` [Bug ada/11079] " graham.hanson@nats.co.uk
  2003-06-03 12:51 ` graham.hanson@nats.co.uk
@ 2003-06-03 12:53 ` graham.hanson@nats.co.uk
  2003-06-22 13:10 ` pinskia at physics dot uc dot edu
  2003-10-22 11:58 ` charlet at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: graham.hanson@nats.co.uk @ 2003-06-03 12:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079



------- Additional Comments From graham.hanson@nats.co.uk  2003-06-03 12:53 -------
Created an attachment (id=4154)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4154&action=view)
Result of "gnat compile -S adm_bug.adb"




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ada/11079] Ada: Inline-Assembler - Outputs => only stores last mentioned register
  2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
                   ` (2 preceding siblings ...)
  2003-06-03 12:53 ` graham.hanson@nats.co.uk
@ 2003-06-22 13:10 ` pinskia at physics dot uc dot edu
  2003-10-22 11:58 ` charlet at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-06-22 13:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug ada/11079] Ada: Inline-Assembler - Outputs => only stores last mentioned register
  2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
                   ` (3 preceding siblings ...)
  2003-06-22 13:10 ` pinskia at physics dot uc dot edu
@ 2003-10-22 11:58 ` charlet at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: charlet at gcc dot gnu dot org @ 2003-10-22 11:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11079


charlet at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |3.4


------- Additional Comments From charlet at gcc dot gnu dot org  2003-10-22 11:36 -------
Fixed in mainline.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-10-22 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-03 12:46 [Bug ada/11079] New: Ada: Inline-Assembler - Outputs => only stores last mentioned register graham.hanson@nats.co.uk
2003-06-03 12:50 ` [Bug ada/11079] " graham.hanson@nats.co.uk
2003-06-03 12:51 ` graham.hanson@nats.co.uk
2003-06-03 12:53 ` graham.hanson@nats.co.uk
2003-06-22 13:10 ` pinskia at physics dot uc dot edu
2003-10-22 11:58 ` charlet at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).