Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 24961
Product:  
Component:  
Status: NEW
Resolution:
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Andreas Schwab <schwab@linux-m68k.org>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 24961 depends on: 25008 Show dependency tree
Show dependency graph
Bug 24961 blocks:

Additional Comments:





Mark bug as waiting for feedback
Mark bug as suspended




View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-02-20 18:48 Opened: 2005-11-20 17:00
There is no way to specify a constraint for an operand of an asm statement that
may only be a destination operand (ie. the first operand of the st insn).  If
you try to use the "m" constraint together with the %P operand modifier you can
get invalid asm code when %P expands to a register instead of a number.  For
example, the Linux kernel uses this asm statement:

asm volatile ("\n[1:]\tst"#n" %1=%r2%P1\t// %0 gets overwritten by exception
handler\n"
              "\t.xdata4 \"__ex_table\", 1b-., 1f-.\n"
              "[1:]"
              : "=r"(__pu_r8) : "m"(__m(addr)), "rO"(val), "0"(__pu_r8));

Occassionally you'll get an assembler error because the POST_MODIFY is expanded
into a register.

------- Comment #1 From Jim Wilson 2005-11-23 22:05 -------
Confirmed.

I believe 25008 will have to be fixed before we can add a working constraint
letter for this.  It should be possible to generate a testcase for this by
taking the example from 25008, changing the "S" to an "m", and then changing
foo to a valid store instruction syntax so as to get the desired assembler
error.  I'll worry about that later when I need a testcase.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug