diff mbox

ARM: Emit conditions in push_multi

Message ID 4E5F71A1.4050207@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Sept. 1, 2011, 11:50 a.m. UTC
Shrink-wrapping tests on ARM had one additional failure, which I could
track down to a stmfd instruction being emitted where an stmhifd was
intended. The following patch fixes the testcase; full tests running
now. Ok?


Bernd
* config/arm/arm.md (push_multi): Emit predicates.

Comments

Ramana Radhakrishnan Sept. 2, 2011, 10:35 a.m. UTC | #1
On 1 September 2011 12:50, Bernd Schmidt <bernds@codesourcery.com> wrote:
> Shrink-wrapping tests on ARM had one additional failure, which I could
> track down to a stmfd instruction being emitted where an stmhifd was
> intended. The following patch fixes the testcase; full tests running
> now. Ok?

IIUC this should have been a result of conditionalizing the prologue
saves by the CCFSM state machine in ARM state given that the push
instruction below doesn't have the conditional markers.  In which case
the routines to emit the asm for the VFP registers( vfp_output_fstmfd?
) should also be checked for this issue.

cheers
Ramana
diff mbox

Patch

Index: gcc/config/arm/arm.md
===================================================================
--- gcc/config/arm/arm.md	(revision 178135)
+++ gcc/config/arm/arm.md	(working copy)
@@ -10581,14 +10581,14 @@  (define_insn "*push_multi"
        In Thumb mode always use push, and the assembler will pick
        something appropriate.  */
     if (num_saves == 1 && TARGET_ARM)
-      output_asm_insn (\"str\\t%1, [%m0, #-4]!\", operands);
+      output_asm_insn (\"str%?\\t%1, [%m0, #-4]!\", operands);
     else
       {
 	int i;
 	char pattern[100];
 
 	if (TARGET_ARM)
-	    strcpy (pattern, \"stmfd\\t%m0!, {%1\");
+	    strcpy (pattern, \"stm%(fd%)\\t%m0!, {%1\");
 	else
 	    strcpy (pattern, \"push\\t{%1\");