Commit e81a3ede authored by Martin Storsjö's avatar Martin Storsjö
Browse files

thumb: Keep whitespace between arguments as before

Include the whitespace after the first argument's comma in the
optional first argument group.

This fixes a minor style regression in the converted output
since 2a233dd3.

Change-Id: I254f4aaff175e2d728d9b6f3c12ede03846adcf1
parent 6903efa9
...@@ -47,7 +47,7 @@ sub FixThumbInstructions($$) ...@@ -47,7 +47,7 @@ sub FixThumbInstructions($$)
# this is used, it's used for two subsequent load instructions, # this is used, it's used for two subsequent load instructions,
# where a hand-written version of it could merge two subsequent # where a hand-written version of it could merge two subsequent
# add and sub instructions. # add and sub instructions.
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; 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. # Convert register post indexing to a separate add instruction.
# This converts "ldrneb r9, [r0], r2" into "ldrneb r9, [r0]", # This converts "ldrneb r9, [r0], r2" into "ldrneb r9, [r0]",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment