diff mbox series

[FFmpeg-devel,1/5] aarch64: Explicitly forbid using the x18 register

Message ID 20200514131412.27655-1-martin@martin.st
State Accepted
Commit 07948f3d384e383915f5f466e8493fb16f71c219
Headers show
Series [FFmpeg-devel,1/5] aarch64: Explicitly forbid using the x18 register | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Martin Storsjö May 14, 2020, 1:14 p.m. UTC
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.
---
 libavutil/aarch64/asm.S | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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