aboutsummaryrefslogtreecommitdiff
path: root/compiler/elymasGlobalSysOpt.ey
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/elymasGlobalSysOpt.ey')
-rw-r--r--compiler/elymasGlobalSysOpt.ey16
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler/elymasGlobalSysOpt.ey b/compiler/elymasGlobalSysOpt.ey
index b3128bf..49d9282 100644
--- a/compiler/elymasGlobalSysOpt.ey
+++ b/compiler/elymasGlobalSysOpt.ey
@@ -104,6 +104,22 @@
:retn
]] /eyreplace defv
+ # returns internalAllocateInteger into userspace
+ # 0 <- ::internalAllocateInteger as integer
+ [[
+ /rbx :popqReg
+
+ ::internalAllocateInteger /rax :movqImmReg
+ /rax :callqReg
+ /rax :pushqReg
+
+ ::internalAllocateInteger /rdx :movqImmReg
+ /rdx 8 /rax :movqRegMemDisp8
+
+ /rbx :pushqReg
+ :retn
+ ]] /eyinternalAllocateInteger defv
+
# returns internalAllocateScope into userspace
# 0 <- ::internalAllocateScope as integer
[[