From d2f33fe305f6a2a4ad2a18f1eafc4e1e4741bd8c Mon Sep 17 00:00:00 2001 From: Drahflow Date: Mon, 21 Aug 2017 07:52:18 +0200 Subject: Added _' for indexed access to stack --- compiler/elymasGlobal.ey | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'compiler') diff --git a/compiler/elymasGlobal.ey b/compiler/elymasGlobal.ey index cfa58cf..66ab27f 100644 --- a/compiler/elymasGlobal.ey +++ b/compiler/elymasGlobal.ey @@ -2056,6 +2056,24 @@ :retn ] /ey_ defv + # top stack element is an integer index into the stack, + # starting with 0 at the one below this index + # duplicates the indicated stack element to the top + [[ + /rbx :popqReg + /rdx :popqReg + 63 /rdx :btrqImm8Reg + /unboxed :jcLbl8 + 8 /rdx /rdx :movqMemDisp8Reg + @unboxed + + 8 /rdx /rsp /rdx :movqMemIndexScaleReg + /rdx :pushqReg + + /rbx :pushqReg + :retn + ]] /ey_' defv + # top stack element is a string defining a stack shuffle # 0-9: push the thusly numbered element # *: execute top element -- cgit v1.2.3