* src/vm/jit/codegen-common.cpp (codegen_emit): New generic version of the
[cacao.git] / src / vm / jit / mips / md.h
index 100be5e306f3b2fa006624ca76270654f7d09028..67bb24cdc8100045f0c891c2028abf2dc3ddacd5 100644 (file)
 #include "vm/vm.hpp"
 
 
+/**
+ * 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 MIPS we use 8-byte stackslots.
+       return code->stackframesize * 8;
+}
+
+
 /* md_stacktrace_get_returnaddress *********************************************
 
    Returns the return address of the current stackframe, specified by