`clang` does not understand the `rflags` register name, so the build
will fail. On the other hand, `gcc` does not understand `flags`, so the
register naming needs to be placed inside `#ifdef` guards.
Signed-off-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #877
.cfi_offset rip, -8
/* Description of the stack with active IST */
.cfi_offset cs, 0
+
+#ifdef __clang__
+ .cfi_offset flags, 8
+#elif __GNUC__
.cfi_offset rflags, 8
+#else
+#error "Unsupported Compiler"
+#endif
+
.cfi_offset rsp, 16
.cfi_offset ss, 24
cld
/* Description of the stack with active IST */
.cfi_offset cs, 0
+
+#ifdef __clang__
+ .cfi_offset flags, 8
+#elif __GNUC__
.cfi_offset rflags, 8
+#else
+#error "Unsupported Compiler"
+#endif
+
.cfi_offset rsp, 16
.cfi_offset ss, 24
cld