diff mbox

[MIPS,committed] Fix handling of small-data asm operands

Message ID 877h0fy56s.fsf@firetop.home
State New
Headers show

Commit Message

Richard Sandiford Jan. 25, 2012, 7:04 p.m. UTC
The testcase for PR 51933 was failing on mipsisa64-elf because md_reorg
changed a symbolic small-data asm operand into a LO_SUM.

Tested on mipsisa64-elf and applied.

Richard


gcc/
	* config/mips/mips.c: Don't process ASM_OPERANDS.

Comments

Richard Sandiford Jan. 25, 2012, 8:14 p.m. UTC | #1
Richard Sandiford <rdsandiford@googlemail.com> writes:
> The testcase for PR 51933 was failing on mipsisa64-elf because md_reorg
> changed a symbolic small-data asm operand into a LO_SUM.
>
> Tested on mipsisa64-elf and applied.
>
> Richard
>
>
> gcc/
> 	* config/mips/mips.c: Don't process ASM_OPERANDS.

...now with added function name.

Richard
diff mbox

Patch

Index: gcc/config/mips/mips.c
===================================================================
--- gcc/config/mips/mips.c	2012-01-25 18:53:22.000000000 +0000
+++ gcc/config/mips/mips.c	2012-01-25 18:53:59.000000000 +0000
@@ -3101,7 +3101,10 @@  mips_small_data_pattern_1 (rtx *loc, voi
 {
   enum mips_symbol_context context;
 
-  if (GET_CODE (*loc) == LO_SUM)
+  /* Ignore things like "g" constraints in asms.  We make no particular
+     guarantee about which symbolic constants are acceptable as asm operands
+     versus which must be forced into a GPR.  */
+  if (GET_CODE (*loc) == LO_SUM || GET_CODE (*loc) == ASM_OPERANDS)
     return -1;
 
   if (MEM_P (*loc))