summaryrefslogtreecommitdiff
path: root/src/arch/i386/gdt/farjump.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/i386/gdt/farjump.s')
-rw-r--r--src/arch/i386/gdt/farjump.s9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/arch/i386/gdt/farjump.s b/src/arch/i386/gdt/farjump.s
new file mode 100644
index 0000000..85d8ba5
--- /dev/null
+++ b/src/arch/i386/gdt/farjump.s
@@ -0,0 +1,9 @@
+.section .text
+.global gdt_farjump
+.type gdt_farjump, @function
+gdt_farjump:
+ /* retf pops off the return address and code segment off the stack.
+ * it turns out that in the i386 cdecl calling convention they're in
+ * the correct place already.
+ */
+ retf