lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since 74813216 was 74813216, checked in by Jakub Jermar <jakub@…>, 20 years ago |
sparc64 work.
No need to save/restore local registers.
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[437ee6a4] | 1 | #include <stdio.h>
|
---|
| 2 |
|
---|
| 3 | typedef long long __u64;
|
---|
| 4 | typedef __u64 ipl_t;
|
---|
| 5 | typedef __u64 __address;
|
---|
| 6 |
|
---|
| 7 | #define __sparc64_TYPES_H__
|
---|
| 8 | #define __ALIGN_H__
|
---|
| 9 |
|
---|
[74813216] | 10 | #include "../../arch/sparc64/include/stack.h"
|
---|
[437ee6a4] | 11 | #include "../../arch/sparc64/include/context.h"
|
---|
| 12 |
|
---|
| 13 | #define FILENAME "../../arch/sparc64/include/context_offset.h"
|
---|
| 14 |
|
---|
| 15 | int main(void)
|
---|
| 16 | {
|
---|
| 17 | FILE *f;
|
---|
| 18 | struct context *pctx = NULL;
|
---|
| 19 |
|
---|
| 20 |
|
---|
| 21 | f = fopen(FILENAME,"w");
|
---|
| 22 | if (!f) {
|
---|
| 23 | perror(FILENAME);
|
---|
| 24 | return 1;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | fprintf(f, "/* This file is automatically generated by %s. */\n", __FILE__);
|
---|
| 28 |
|
---|
| 29 | fprintf(f,"/* struct context */\n");
|
---|
| 30 |
|
---|
| 31 | fprintf(f,"#define OFFSET_SP 0x%x\n",((int)&pctx->sp) - (int )pctx);
|
---|
[74813216] | 32 | fprintf(f,"#define OFFSET_FP 0x%x\n",((int)&pctx->fp) - (int )pctx);
|
---|
[437ee6a4] | 33 | fprintf(f,"#define OFFSET_PC 0x%x\n",((int)&pctx->pc) - (int )pctx);
|
---|
| 34 | fprintf(f,"#define OFFSET_I1 0x%x\n",((int)&pctx->i1) - (int )pctx);
|
---|
| 35 | fprintf(f,"#define OFFSET_I2 0x%x\n",((int)&pctx->i2) - (int )pctx);
|
---|
| 36 | fprintf(f,"#define OFFSET_I3 0x%x\n",((int)&pctx->i3) - (int )pctx);
|
---|
| 37 | fprintf(f,"#define OFFSET_I4 0x%x\n",((int)&pctx->i4) - (int )pctx);
|
---|
| 38 | fprintf(f,"#define OFFSET_I5 0x%x\n",((int)&pctx->i5) - (int )pctx);
|
---|
| 39 |
|
---|
| 40 | fclose(f);
|
---|
| 41 |
|
---|
| 42 | return 0;
|
---|
| 43 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.