opnsense-src/gnu/usr.bin/cc/cc_tools/arm.md.diff
Warner Losh a817992dfc Add additional support for generating code for the arm. There's still
a few issues in other parts of the tree, but those will be resolved
separately.

Submitted by: cogenet@
Reviewed by: kan@, obrien@
MFC After: 5 days
2006-09-18 17:08:32 +00:00

48 lines
1.4 KiB
Diff

$FreeBSD$
Index: arm.md
===================================================================
RCS file: /cognet/ncvs/src/contrib/gcc/config/arm/arm.md,v
retrieving revision 1.1.1.7
diff -u -p -r1.1.1.7 arm.md
--- arm.md 3 Jun 2005 03:28:42 -0000 1.1.1.7
+++ arm.md 29 Aug 2005 12:39:39 -0000
@@ -8836,12 +8836,12 @@
ldm[2] = operands[4];
}
if (GET_CODE (XEXP (operands[2], 0)) != REG)
- val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1));
+ val1 = INTVAL (XEXP (XEXP (operands[2], 0), 1));
if (GET_CODE (XEXP (operands[3], 0)) != REG)
- val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1));
+ val2 = INTVAL (XEXP (XEXP (operands[3], 0), 1));
arith[0] = operands[0];
arith[3] = operands[1];
- if (val1 < val2)
+ if (val1 <= val2)
{
arith[1] = ldm[1];
arith[2] = ldm[2];
@@ -8871,7 +8871,7 @@
else
output_asm_insn (\"ldm%?ia\\t%0, {%1, %2}\", ldm);
}
- else
+ else if (val2)
{
ldm[0] = XEXP (operands[2], 0);
if (val1 < val2)
@@ -8879,6 +8879,14 @@
else
output_asm_insn (\"ldm%?da\\t%0, {%1, %2}\", ldm);
}
+ else {
+ ldm[0] = operands[0];
+ ldm[1] = XEXP(operands[2], 0);
+ output_asm_insn(\"ldr\\t%0, [%1]\", ldm);
+ ldm[0] = operands[4];
+ ldm[1] = XEXP(operands[3], 0);
+ output_asm_insn(\"ldr\\t%0, [%1]\", ldm);
+ }
output_asm_insn (\"%I3%?\\t%0, %1, %2\", arith);
return \"\";
}"