]> gitweb.factorcode.org Git - factor.git/blobdiff - vm/os-linux-ppc.h
Initial import
[factor.git] / vm / os-linux-ppc.h
index 4dae4c62cf154c125d71b6e0498eaf0d95128586..d90524095b226132e62ca65f70a49f12d191b0d8 100644 (file)
@@ -1,4 +1,29 @@
-typedef struct _F_STACK_FRAME {
+typedef struct _F_STACK_FRAME
+{
        struct _F_STACK_FRAME *previous;
-       CELL return_address;
+
+       /* Callee stores our LR here */
+       XT return_address;
+
+       /* ===== 32 bytes saved register area ===== */
+       CELL padding5[8];
+
+       /* ===== 16 byte local variable area ===== */
+
+       /* In compiled quotation frames, the quot->array slot.
+       In compiled word frames, unused. */
+       CELL array;
+
+       /* In compiled quotation frames, position within the array.
+       In compiled word frames, unused. */
+       CELL scan;
+
+       /* In all compiled frames, the XT on entry. */
+       XT xt;
+
+       /* ===== 12 byte padding to make it 16 byte aligned ===== */
+       CELL padding6[3];
 } F_STACK_FRAME;
+
+#define UAP_PROGRAM_COUNTER(ucontext) \
+       (((ucontext_t *)(ucontext))->uc_mcontext.uc_regs->gregs[PT_NIP])