public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/11821] New: SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames
@ 2010-07-16 11:44 fche at redhat dot com
  2010-07-20  1:30 ` [Bug translator/11821] " fche at redhat dot com
  2010-07-20 11:43 ` fche at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: fche at redhat dot com @ 2010-07-16 11:44 UTC (permalink / raw)
  To: systemtap

On powerpc, the default assembly generation is -mno-regnames, which yields
SDT_V2 operand strings such as ....

extern int i;
void foo(int j) {
  asm volatile ("/* %0 %1 %2 %3 */" :: "g"(0), "g"(i), "g"("yo"), "g"(j));
}

 # 3 "foo.c" 1
        /* 0 i@l(9) .LC0 3 */
 # 0 "" 2

Note how the literal 0 looks like 0, and register 3 looks like 3.  No
punctuation like on x86 ($0 and %ecx respectively).

This ambiguity is not easy to get rid of.  SDT_V2 could use a single
constraint code such as "r", but that would lead to a lot of reload
instructions as everything's reloaded into a register.

Or SDT_V2 programs could be compiled with -mregnames, in which case we get 
        /* 0 i@l(%r9) .LC0 %r3 */        #, i,, j
with the "g" constraint.  This is great, except that sdt.h itself can't
know whether -mregnames is in effect (since there is no macro), so it can't
back down to "g".

Or SDT_V2 on powerpc could be doomed to debuginfo-only operation (in most
cases).

-- 
           Summary: SDT_V2 dwarfless ambiguities with powerpc // -mno-
                    regnames
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap at sources dot redhat dot com
        ReportedBy: fche at redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=11821

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/11821] SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames
  2010-07-16 11:44 [Bug translator/11821] New: SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames fche at redhat dot com
@ 2010-07-20  1:30 ` fche at redhat dot com
  2010-07-20 11:43 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2010-07-20  1:30 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2010-07-20 01:30 -------
This is worked around in commit 6f4e8c1 by rejecting
ambiguous cases (unadorned register numbers vs. literals),
but accepting unambiguous ones (displacement(reg) and %reg).


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11821

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

* [Bug translator/11821] SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames
  2010-07-16 11:44 [Bug translator/11821] New: SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames fche at redhat dot com
  2010-07-20  1:30 ` [Bug translator/11821] " fche at redhat dot com
@ 2010-07-20 11:43 ` fche at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fche at redhat dot com @ 2010-07-20 11:43 UTC (permalink / raw)
  To: systemtap


------- Additional Comments From fche at redhat dot com  2010-07-20 11:43 -------
When/if gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44995 is
fixed, then we can adjust sdt.h so that if -mregnames was given, we
could annotate the operand strings with a magic value that allows
the translator to recognize and accept literals.  (It will automatically
recognize the %rNN register names.)


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11821

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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

end of thread, other threads:[~2010-07-20 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-16 11:44 [Bug translator/11821] New: SDT_V2 dwarfless ambiguities with powerpc // -mno-regnames fche at redhat dot com
2010-07-20  1:30 ` [Bug translator/11821] " fche at redhat dot com
2010-07-20 11:43 ` fche at redhat dot com

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).