aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-01-14 17:37:24 +0100
committerDrahflow <drahflow@gmx.de>2013-01-14 17:37:24 +0100
commit5c731a7d38d77561c7014a58092632b406d48ca8 (patch)
treee494ceadcbcd3643e073d0aaebca5ad2819db622
parent18d4e35ad91a10f171212b505e217da445fc5df8 (diff)
Some more primitives
-rw-r--r--compiler/elymasAsmLib.ey17
1 files changed, 17 insertions, 0 deletions
diff --git a/compiler/elymasAsmLib.ey b/compiler/elymasAsmLib.ey
index 60ea53d..91cad72 100644
--- a/compiler/elymasAsmLib.ey
+++ b/compiler/elymasAsmLib.ey
@@ -405,6 +405,23 @@
8 /r15 :addqImm8Reg
:retn
] :labelResolve /ey* defv
+
+ # drop top stack element
+ [
+ /rax :popqReg
+ /rcx :popqReg
+ /rax :pushqReg
+ :retn
+ ] /ey-- defv
+
+ # dump top stack element (actually drop it for now)
+ # FIXME: this belongs in the standard library
+ [
+ /rax :popqReg
+ /rcx :popqReg
+ /rax :pushqReg
+ :retn
+ ] /eydump defv
> _ ==globalFunctions { defv }' allocateOffsetStruct
{ strToUTF8Bytes _ =*v len _ ==exactLength