[go: up one dir, main page]

File: gen-defs.h

package info (click to toggle)
seabios 1.16.3-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,400 kB
  • sloc: ansic: 55,254; cpp: 1,826; asm: 904; python: 821; yacc: 604; makefile: 517; perl: 416; lex: 363; sh: 287
file content (19 lines) | stat: -rw-r--r-- 437 bytes parent folder | download | duplicates (19)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Tool for building defintions accessible from assembler code.  This
// is based on code from the Linux Kernel.
#ifndef __GEN_DEFS_H
#define __GEN_DEFS_H


#define DEFINE(sym, val) \
    asm volatile("\n->" #sym " %0 " #val : : "i" (val))

#define BLANK() \
    asm volatile("\n->" : : )

#define OFFSET(sym, str, mem) \
    DEFINE(sym, offsetof(struct str, mem))

#define COMMENT(x) \
    asm volatile("\n->#" x)

#endif // gen-defs.h