Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
opcodes.h File Reference
#include <linux/types.h>
#include <linux/swab.h>
#include <linux/stringify.h>

Go to the source code of this file.

Macros

#define ARM_OPCODE_CONDTEST_FAIL   0
 
#define ARM_OPCODE_CONDTEST_PASS   1
 
#define ARM_OPCODE_CONDTEST_UNCOND   2
 
#define ___asm_opcode_swab32(x)
 
#define ___asm_opcode_swab16(x)
 
#define ___asm_opcode_swahb32(x)
 
#define ___asm_opcode_swahw32(x)
 
#define ___asm_opcode_identity32(x)   ((x) & 0xFFFFFFFF)
 
#define ___asm_opcode_identity16(x)   ((x) & 0xFFFF)
 
#define ___opcode_swab32(x)   swab32(x)
 
#define ___opcode_swab16(x)   swab16(x)
 
#define ___opcode_swahb32(x)   swahb32(x)
 
#define ___opcode_swahw32(x)   swahw32(x)
 
#define ___opcode_identity32(x)   ((u32)(x))
 
#define ___opcode_identity16(x)   ((u16)(x))
 
#define __opcode_to_mem_arm(x)   ___opcode_identity32(x)
 
#define __opcode_to_mem_thumb16(x)   ___opcode_identity16(x)
 
#define ___asm_opcode_to_mem_arm(x)   ___asm_opcode_identity32(x)
 
#define ___asm_opcode_to_mem_thumb16(x)   ___asm_opcode_identity16(x)
 
#define __opcode_to_mem_thumb32(x)   ___opcode_swahw32(x)
 
#define ___asm_opcode_to_mem_thumb32(x)   ___asm_opcode_swahw32(x)
 
#define __mem_to_opcode_arm(x)   __opcode_to_mem_arm(x)
 
#define __mem_to_opcode_thumb16(x)   __opcode_to_mem_thumb16(x)
 
#define __mem_to_opcode_thumb32(x)   __opcode_to_mem_thumb32(x)
 
#define __opcode_is_thumb32(x)
 
#define __opcode_is_thumb16(x)
 
#define __opcode_thumb32_first(x)   (___opcode_identity16((x) >> 16))
 
#define __opcode_thumb32_second(x)   (___opcode_identity16(x))
 
#define __opcode_thumb32_compose(first, second)
 
#define ___asm_opcode_thumb32_first(x)   (___asm_opcode_identity16((x) >> 16))
 
#define ___asm_opcode_thumb32_second(x)   (___asm_opcode_identity16(x))
 
#define ___asm_opcode_thumb32_compose(first, second)
 
#define __inst_arm(x)   ___inst_arm(___asm_opcode_to_mem_arm(x))
 
#define __inst_thumb32(x)
 
#define __inst_thumb16(x)   ___inst_thumb16(___asm_opcode_to_mem_thumb16(x))
 
#define __inst_arm_thumb16(arm_opcode, thumb_opcode)   __inst_arm(arm_opcode)
 
#define __inst_arm_thumb32(arm_opcode, thumb_opcode)   __inst_arm(arm_opcode)
 
#define ___inst_arm(x)   ".long " __stringify(x) "\n\t"
 
#define ___inst_thumb16(x)   ".short " __stringify(x) "\n\t"
 
#define ___inst_thumb32(first, second)   ".short " __stringify(first) ", " __stringify(second) "\n\t"
 

Functions

asmlinkage unsigned int arm_check_condition (u32 opcode, u32 psr)
 

Macro Definition Documentation

#define ___asm_opcode_identity16 (   x)    ((x) & 0xFFFF)

Definition at line 45 of file opcodes.h.

#define ___asm_opcode_identity32 (   x)    ((x) & 0xFFFFFFFF)

Definition at line 44 of file opcodes.h.

#define ___asm_opcode_swab16 (   x)
Value:
( \
(((x) << 8) & 0xFF00) \
| (((x) >> 8) & 0x00FF) \
)

Definition at line 32 of file opcodes.h.

#define ___asm_opcode_swab32 (   x)
Value:
( \
(((x) << 24) & 0xFF000000) \
| (((x) << 8) & 0x00FF0000) \
| (((x) >> 8) & 0x0000FF00) \
| (((x) >> 24) & 0x000000FF) \
)

Definition at line 26 of file opcodes.h.

#define ___asm_opcode_swahb32 (   x)
Value:
( \
(((x) << 8) & 0xFF00FF00) \
| (((x) >> 8) & 0x00FF00FF) \
)

Definition at line 36 of file opcodes.h.

#define ___asm_opcode_swahw32 (   x)
Value:
( \
(((x) << 16) & 0xFFFF0000) \
| (((x) >> 16) & 0x0000FFFF) \
)

Definition at line 40 of file opcodes.h.

#define ___asm_opcode_thumb32_compose (   first,
  second 
)
#define ___asm_opcode_thumb32_first (   x)    (___asm_opcode_identity16((x) >> 16))

Definition at line 152 of file opcodes.h.

#define ___asm_opcode_thumb32_second (   x)    (___asm_opcode_identity16(x))

Definition at line 153 of file opcodes.h.

#define ___asm_opcode_to_mem_arm (   x)    ___asm_opcode_identity32(x)

Definition at line 113 of file opcodes.h.

#define ___asm_opcode_to_mem_thumb16 (   x)    ___asm_opcode_identity16(x)

Definition at line 114 of file opcodes.h.

#define ___asm_opcode_to_mem_thumb32 (   x)    ___asm_opcode_swahw32(x)

Definition at line 122 of file opcodes.h.

#define ___inst_arm (   x)    ".long " __stringify(x) "\n\t"

Definition at line 224 of file opcodes.h.

#define ___inst_thumb16 (   x)    ".short " __stringify(x) "\n\t"

Definition at line 225 of file opcodes.h.

#define ___inst_thumb32 (   first,
  second 
)    ".short " __stringify(first) ", " __stringify(second) "\n\t"

Definition at line 226 of file opcodes.h.

#define ___opcode_identity16 (   x)    ((u16)(x))

Definition at line 95 of file opcodes.h.

#define ___opcode_identity32 (   x)    ((u32)(x))

Definition at line 94 of file opcodes.h.

#define ___opcode_swab16 (   x)    swab16(x)

Definition at line 91 of file opcodes.h.

#define ___opcode_swab32 (   x)    swab32(x)

Definition at line 90 of file opcodes.h.

#define ___opcode_swahb32 (   x)    swahb32(x)

Definition at line 92 of file opcodes.h.

#define ___opcode_swahw32 (   x)    swahw32(x)

Definition at line 93 of file opcodes.h.

#define __inst_arm (   x)    ___inst_arm(___asm_opcode_to_mem_arm(x))

Definition at line 201 of file opcodes.h.

#define __inst_arm_thumb16 (   arm_opcode,
  thumb_opcode 
)    __inst_arm(arm_opcode)

Definition at line 214 of file opcodes.h.

#define __inst_arm_thumb32 (   arm_opcode,
  thumb_opcode 
)    __inst_arm(arm_opcode)

Definition at line 215 of file opcodes.h.

#define __inst_thumb16 (   x)    ___inst_thumb16(___asm_opcode_to_mem_thumb16(x))

Definition at line 206 of file opcodes.h.

#define __inst_thumb32 (   x)
#define __mem_to_opcode_arm (   x)    __opcode_to_mem_arm(x)

Definition at line 127 of file opcodes.h.

#define __mem_to_opcode_thumb16 (   x)    __opcode_to_mem_thumb16(x)

Definition at line 128 of file opcodes.h.

#define __mem_to_opcode_thumb32 (   x)    __opcode_to_mem_thumb32(x)

Definition at line 130 of file opcodes.h.

#define __opcode_is_thumb16 (   x)
Value:
( \
((x) & 0xFFFF0000) == 0 \
&& !(((x) & 0xF800) == 0xE800 || ((x) & 0xF000) == 0xF000) \
)

Definition at line 140 of file opcodes.h.

#define __opcode_is_thumb32 (   x)
Value:
( \
((x) & 0xF8000000) == 0xE8000000 \
|| ((x) & 0xF0000000) == 0xF0000000 \
)

Definition at line 136 of file opcodes.h.

#define __opcode_thumb32_compose (   first,
  second 
)
#define __opcode_thumb32_first (   x)    (___opcode_identity16((x) >> 16))

Definition at line 146 of file opcodes.h.

#define __opcode_thumb32_second (   x)    (___opcode_identity16(x))

Definition at line 147 of file opcodes.h.

#define __opcode_to_mem_arm (   x)    ___opcode_identity32(x)

Definition at line 111 of file opcodes.h.

#define __opcode_to_mem_thumb16 (   x)    ___opcode_identity16(x)

Definition at line 112 of file opcodes.h.

#define __opcode_to_mem_thumb32 (   x)    ___opcode_swahw32(x)

Definition at line 121 of file opcodes.h.

#define ARM_OPCODE_CONDTEST_FAIL   0

Definition at line 16 of file opcodes.h.

#define ARM_OPCODE_CONDTEST_PASS   1

Definition at line 17 of file opcodes.h.

#define ARM_OPCODE_CONDTEST_UNCOND   2

Definition at line 18 of file opcodes.h.

Function Documentation

asmlinkage unsigned int arm_check_condition ( u32  opcode,
u32  psr 
)

Definition at line 55 of file opcodes.c.