summaryrefslogtreecommitdiff
path: root/build/make/thumb.pm
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2013-05-15 15:42:18 +0300
committerMartin Storsjo <martin@martin.st>2013-05-21 09:57:24 +0300
commit5d2f6baac3f3f1ed34d75cdcebcd1daaf86b3fb3 (patch)
tree211102a6fa9059afe6487ee885d0314c4a00abbb /build/make/thumb.pm
parenta83db43632ba99c4232a059d2b1c9266c99886d2 (diff)
downloadlibvpx-5d2f6baac3f3f1ed34d75cdcebcd1daaf86b3fb3.tar
libvpx-5d2f6baac3f3f1ed34d75cdcebcd1daaf86b3fb3.tar.gz
libvpx-5d2f6baac3f3f1ed34d75cdcebcd1daaf86b3fb3.tar.bz2
libvpx-5d2f6baac3f3f1ed34d75cdcebcd1daaf86b3fb3.zip
thumb: Adjust the conversion of the position independent switch
This is required since the microsoft assembler claims that add.w r12, pc, #10 generated unpredictable behaviour. Change-Id: Ia8e1830def965c88ca4e2f48a24107bac6a4cb9d
Diffstat (limited to 'build/make/thumb.pm')
-rw-r--r--build/make/thumb.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/build/make/thumb.pm b/build/make/thumb.pm
index 51308a3a7..d04dffe85 100644
--- a/build/make/thumb.pm
+++ b/build/make/thumb.pm
@@ -53,9 +53,10 @@ sub FixThumbInstructions($)
# Convert a conditional addition to the pc register into a series of
# instructions. This converts "addlt pc, pc, r3, lsl #2" into
- # "ittt lt", "addlt.w r12, pc, #10", "addlt.w r12, r12, r3, lsl #2",
- # "movlt.n pc, r12". This assumes that r12 is free at this point.
- s/^(\s*)addlt(\s+)pc,\s*pc,\s*(\w+),\s*lsl\s*#(\d+)/$1ittt$2lt\n$1addlt.w$2r12, pc, #10\n$1addlt.w$2r12, r12, $3, lsl #$4\n$1movlt.n$2pc, r12/g;
+ # "itttt lt", "movlt.n r12, pc", "addlt.w r12, #12",
+ # "addlt.w r12, r12, r3, lsl #2", "movlt.n pc, r12".
+ # This assumes that r12 is free at this point.
+ s/^(\s*)addlt(\s+)pc,\s*pc,\s*(\w+),\s*lsl\s*#(\d+)/$1itttt$2lt\n$1movlt.n$2r12, pc\n$1addlt.w$2r12, #12\n$1addlt.w$2r12, r12, $3, lsl #$4\n$1movlt.n$2pc, r12/g;
# Convert "mov pc, lr" into "bx lr", since the former only works
# for switching from arm to thumb (and only in armv7), but not