Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
code-patching.h File Reference
#include <asm/types.h>
#include <asm/ppc-opcode.h>

Go to the source code of this file.

Macros

#define BRANCH_SET_LINK   0x1
 
#define BRANCH_ABSOLUTE   0x2
 

Functions

unsigned int create_branch (const unsigned int *addr, unsigned long target, int flags)
 
unsigned int create_cond_branch (const unsigned int *addr, unsigned long target, int flags)
 
int patch_branch (unsigned int *addr, unsigned long target, int flags)
 
int patch_instruction (unsigned int *addr, unsigned int instr)
 
int instr_is_relative_branch (unsigned int instr)
 
int instr_is_branch_to_addr (const unsigned int *instr, unsigned long addr)
 
unsigned long branch_target (const unsigned int *instr)
 
unsigned int translate_branch (const unsigned int *dest, const unsigned int *src)
 

Macro Definition Documentation

#define BRANCH_ABSOLUTE   0x2

Definition at line 23 of file code-patching.h.

#define BRANCH_SET_LINK   0x1

Definition at line 22 of file code-patching.h.

Function Documentation

unsigned long branch_target ( const unsigned int instr)

Definition at line 130 of file code-patching.c.

unsigned int create_branch ( const unsigned int addr,
unsigned long  target,
int  flags 
)

Definition at line 35 of file code-patching.c.

unsigned int create_cond_branch ( const unsigned int addr,
unsigned long  target,
int  flags 
)

Definition at line 55 of file code-patching.c.

int instr_is_branch_to_addr ( const unsigned int instr,
unsigned long  addr 
)

Definition at line 140 of file code-patching.c.

int instr_is_relative_branch ( unsigned int  instr)

Definition at line 90 of file code-patching.c.

int patch_branch ( unsigned int addr,
unsigned long  target,
int  flags 
)

Definition at line 30 of file code-patching.c.

int patch_instruction ( unsigned int addr,
unsigned int  instr 
)

Definition at line 19 of file code-patching.c.

unsigned int translate_branch ( const unsigned int dest,
const unsigned int src 
)

Definition at line 148 of file code-patching.c.