Rev 859 |
Go to most recent revision |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
#include <stdio.h>
typedef unsigned int __u32;
typedef __u32 ipl_t;
typedef __u32 __address;
#define __ppc32_TYPES_H__
#include "../../arch/ppc32/include/context.h"
#define FILENAME "../../arch/ppc32/include/context_offset.h"
int main(void)
{
FILE *f;
struct context *pctx = NULL;
if (!f) {
return 1;
}
fprintf(f
, "/* This file is automatically generated by %s. */\n", __FILE__
);
fprintf(f
,"/* struct context */\n");
fprintf(f
,"#define OFFSET_SP 0x%x\n", ((int) &pctx
->sp
) - (int) pctx
);
fprintf(f
,"#define OFFSET_PC 0x%x\n", ((int) &pctx
->pc
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R2 0x%x\n", ((int) &pctx
->r2
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R13 0x%x\n", ((int) &pctx
->r13
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R14 0x%x\n", ((int) &pctx
->r14
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R15 0x%x\n", ((int) &pctx
->r15
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R16 0x%x\n", ((int) &pctx
->r16
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R17 0x%x\n", ((int) &pctx
->r17
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R18 0x%x\n", ((int) &pctx
->r18
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R19 0x%x\n", ((int) &pctx
->r19
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R20 0x%x\n", ((int) &pctx
->r20
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R21 0x%x\n", ((int) &pctx
->r21
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R22 0x%x\n", ((int) &pctx
->r22
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R23 0x%x\n", ((int) &pctx
->r23
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R24 0x%x\n", ((int) &pctx
->r24
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R25 0x%x\n", ((int) &pctx
->r25
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R26 0x%x\n", ((int) &pctx
->r26
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R27 0x%x\n", ((int) &pctx
->r27
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R28 0x%x\n", ((int) &pctx
->r28
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R29 0x%x\n", ((int) &pctx
->r29
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R30 0x%x\n", ((int) &pctx
->r30
) - (int) pctx
);
fprintf(f
,"#define OFFSET_R31 0x%x\n", ((int) &pctx
->r31
) - (int) pctx
);
fprintf(f
,"#define OFFSET_CR 0x%x\n", ((int) &pctx
->cr
) - (int) pctx
);
return 0;
}