thumb: Extend the regexp for handling negative register indexing
authorMartin Storsjo <martin@martin.st>
Thu, 19 Sep 2013 11:18:18 +0000 (14:18 +0300)
committerMartin Storsjo <martin@martin.st>
Thu, 19 Sep 2013 11:43:38 +0000 (14:43 +0300)
Now the same regexp that previously handled cases such as
"ldr r1, [r2, -r3]" also can handle the first operand being omitted
as in "pld [r2, -r3]".

This fixes building vp9_convolve8*neon.asm in thumb mode (and thus,
for Windows Phone as well).

Change-Id: I20c1c3f2bfb2587fb5fa523b863972a7fe30d8ff

build/make/thumb.pm

index f347287..545f59f 100644 (file)
@@ -47,7 +47,7 @@ sub FixThumbInstructions($$)
     # this is used, it's used for two subsequent load instructions,
     # where a hand-written version of it could merge two subsequent
     # add and sub instructions.
-    s/^(\s*)((ldr|str)(ne)?)(\s+)(r\d+),\s*\[(\w+), -([^\]]+)\]/$1sub$4$5$7, $7, $8\n$1$2$5$6, [$7]\n$1add$4$5$7, $7, $8/g;
+    s/^(\s*)((ldr|str|pld)(ne)?)(\s+)(r\d+,)?\s*\[(\w+), -([^\]]+)\]/$1sub$4$5$7, $7, $8\n$1$2$5$6\[$7\]\n$1add$4$5$7, $7, $8/g;
 
     # Convert register post indexing to a separate add instruction.
     # This converts "ldrneb r9, [r0], r2" into "ldrneb r9, [r0]",