summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2020-05-12 13:28:44 +0300
committerMartin Storsjö <martin@martin.st>2020-05-15 21:22:22 +0300
commit07948f3d384e383915f5f466e8493fb16f71c219 (patch)
tree1b530ec612d29ee9dd20899294ce3711e1dcbb8a /libavutil
parentb4bcae4e0e9afee734b7d9d80fd350bc27d88cea (diff)
aarch64: Explicitly forbid using the x18 register
On windows and darwin (and modern android), the x18 register is reserved and shouldn't be modified by user code, while it is freely available on linux. Strictly avoid it, to keep the assembly code portable. This would have helped catch the issue fixed in 872790b1f9be6 immediately. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/aarch64/asm.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
index 3ac2ba0d52..d1fa72b3c6 100644
--- a/libavutil/aarch64/asm.S
+++ b/libavutil/aarch64/asm.S
@@ -112,3 +112,6 @@ ELF .size \name, . - \name
#define GLUE(a, b) a ## b
#define JOIN(a, b) GLUE(a, b)
#define X(s) JOIN(EXTERN_ASM, s)
+
+#define x18 do_not_use_x18
+#define w18 do_not_use_w18