* src/vm/jit/codegen-common.cpp (codegen_emit): New generic version of the
[cacao.git] / src / vm / jit / powerpc / md.h
index dbf367765b12b5bab33d59c36610af40d070f948..e4f8052814af004e502daa5acebf984687d78cee 100644 (file)
 #include "vm/vm.hpp"
 
 #include "vm/jit/asmpart.h"
-#include "vm/jit/codegen-common.h"
+#include "vm/jit/codegen-common.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 PowerPC we use 8-byte stackslots.
+       return code->stackframesize * 8;
+}
 
 
 /* md_stacktrace_get_returnaddress *********************************************