summaryrefslogtreecommitdiffstats
path: root/src/arch/arm64/include/setjmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm64/include/setjmp.h')
-rw-r--r--src/arch/arm64/include/setjmp.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/arch/arm64/include/setjmp.h b/src/arch/arm64/include/setjmp.h
new file mode 100644
index 000000000..85a7a9cad
--- /dev/null
+++ b/src/arch/arm64/include/setjmp.h
@@ -0,0 +1,44 @@
+#ifndef _SETJMP_H
+#define _SETJMP_H
+
+FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
+
+#include <stdint.h>
+
+/** A jump buffer */
+typedef struct {
+ /** Saved x19 */
+ uint64_t x19;
+ /** Saved x20 */
+ uint64_t x20;
+ /** Saved x21 */
+ uint64_t x21;
+ /** Saved x22 */
+ uint64_t x22;
+ /** Saved x23 */
+ uint64_t x23;
+ /** Saved x24 */
+ uint64_t x24;
+ /** Saved x25 */
+ uint64_t x25;
+ /** Saved x26 */
+ uint64_t x26;
+ /** Saved x27 */
+ uint64_t x27;
+ /** Saved x28 */
+ uint64_t x28;
+ /** Saved frame pointer (x29) */
+ uint64_t x29;
+ /** Saved link register (x30) */
+ uint64_t x30;
+ /** Saved stack pointer (x31) */
+ uint64_t sp;
+} jmp_buf[1];
+
+extern int __asmcall __attribute__ (( returns_twice ))
+setjmp ( jmp_buf env );
+
+extern void __asmcall __attribute__ (( noreturn ))
+longjmp ( jmp_buf env, int val );
+
+#endif /* _SETJMP_H */