OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [s390x/] [kernel/] [asm-offsets.c] - Blame information for rev 1275

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
/*
2
 * Generate definitions needed by assembly language modules.
3
 * This code generates raw asm output which is post-processed to extract
4
 * and format the required data.
5
 */
6
 
7
#include <linux/config.h>
8
#include <linux/sched.h>
9
 
10
/* Use marker if you need to separate the values later */
11
 
12
#define DEFINE(sym, val, marker) \
13
        asm volatile("\n->" #sym " %0 " #val " " #marker : : "i" (val))
14
 
15
#define BLANK() asm volatile("\n->" : : )
16
 
17
int main(void)
18
{
19
        DEFINE(__THREAD_ar2, offsetof(struct task_struct, thread.ar2),);
20
        DEFINE(__THREAD_ar4, offsetof(struct task_struct, thread.ar4),);
21
        DEFINE(__THREAD_ksp, offsetof(struct task_struct, thread.ksp),);
22
        DEFINE(__THREAD_per, offsetof(struct task_struct, thread.per_info),);
23
        BLANK();
24
        DEFINE(__TASK_state, offsetof(struct task_struct, state),);
25
        DEFINE(__TASK_sigpending, offsetof(struct task_struct, sigpending),);
26
        DEFINE(__TASK_need_resched,
27
               offsetof(struct task_struct, need_resched),);
28
        DEFINE(__TASK_ptrace, offsetof(struct task_struct, ptrace),);
29
        DEFINE(__TASK_processor, offsetof(struct task_struct, processor),);
30
 
31
        return 0;
32
}

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.