Update vm_s390x.dasc

Added definitions to macros savereg and restreg
used Store and Load instructions 
to store and load register contents to n from memory
This commit is contained in:
ketank-new 2016-11-22 10:20:56 +05:30 committed by GitHub
parent e90d985d08
commit 31c0e6016a

View File

@ -15,15 +15,15 @@
| |
|// Fixed register assignments for the interpreter. |// Fixed register assignments for the interpreter.
|// This is very fragile and has many dependencies. Caveat emptor. |// This is very fragile and has many dependencies. Caveat emptor.
|.define BASE, gr0 // Base of current Lua stack frame. |.define BASE, gr0
|.define KBASE, gr1 // Constants of current Lua function. |.define KBASE, gr1
|.define PC, gr14 // Next PC. |.define PC, gr14
|.define GLREG, gr2 // Global state. |.define GLREG, gr2
|.define LREG, gr3 // Register holding lua_State (also in SAVE_L). |.define LREG, gr3
|.define TISNUM, gr4 // Constant LJ_TISNUM << 47. |.define TISNUM, gr4
|.define TISNUMhi, gr5 // Constant LJ_TISNUM << 15. |.define TISNUMhi, gr5
|.define TISNIL, gr6 // Constant -1LL. |.define TISNIL, gr6
|.define fp, gr7 // Yes, we have to maintain a frame pointer. |.define fp, gr7
| |
|// The following temporaries are not saved across C calls, except for RA/RC. |// The following temporaries are not saved across C calls, except for RA/RC.
|.define RA, |.define RA,
@ -82,18 +82,16 @@
| |
|.define TMPDofs, |.define TMPDofs,
| |
|.macro save_, gpr1, gpr2, fpr1, fpr2 |.macro savereg arg1 arg2 arg3
] | STG arg1; // Store 64bit content
|.endmacro | STG arg2; // Store 64bit content
|.macro rest_, gpr1, gpr2, fpr1, fpr2 | STG arg3; // Store 64bit content
]
|.endmacro |.endmacro
| |
|.macro saveregs |.macro restreg arg1 arg2 arg3
| LG arg1; // Load 64 bit content
|.endmacro | LG arg2; // Load 64 bit content
|.macro restoreregs | LG arg3; // Load 64 bit content
|.endmacro |.endmacro
| |
|// Type definitions. Some of these are only used for documentation. |// Type definitions. Some of these are only used for documentation.