* src/vm/jit/codegen-common.cpp (codegen_emit): New generic version of the
[cacao.git] / src / vm / jit / s390 / md.h
index cbb7f9b6df26dd1609b9144d02f7a4548aa306be..7f6c131d78771993c9586883c97bb0b8265839c4 100644 (file)
 #include "vm/jit/methodtree.h"
 
 
+/**
+ * Returns the size (in bytes) of the current stackframe, specified by
+ * the passed codeinfo structure.
+ */
+inline static int32_t md_stacktrace_get_framesize(codeinfo* code)
+{
+       // Check for the asm_vm_call_method special case.
+       if (code == NULL)
+               return 0;
+
+       // On S390 we use 8-byte stackslots.
+       return code->stackframesize * 8;
+}
+
+
 /* md_stacktrace_get_returnaddress *********************************************
 
    Returns the return address of the current stackframe, specified by