ReactOS 0.4.16-dev-1494-gd054f63
opcodes.c File Reference
Include dependency graph for opcodes.c:

Go to the source code of this file.

Macros

#define UACPI_OP(opname, opcode, ...)    { #opname, .decode_ops = __VA_ARGS__, .code = opcode },
 
#define UACPI_OUT_OF_LINE_OP(opname, opcode, out_of_line_buf, props)
 
#define _(op)   (op & 0x00FF)
 
#define PARSE_FIELD_ELEMENTS(parse_loop_pc)
 
#define POP(x)   UACPI_PARSE_OP_##x
 

Functions

const struct uacpi_op_specuacpi_get_op_spec (uacpi_aml_op op)
 
const uacpi_charuacpi_parse_op_to_string (enum uacpi_parse_op op)
 

Variables

static const struct uacpi_op_spec opcode_table [0x100]
 
static const struct uacpi_op_spec ext_opcode_table []
 
static const uacpi_u8 ext_op_to_idx [0x100]
 
uacpi_u8 uacpi_field_op_decode_ops []
 
uacpi_u8 uacpi_bank_field_op_decode_ops []
 
uacpi_u8 uacpi_index_field_op_decode_ops []
 
uacpi_u8 uacpi_load_op_decode_ops []
 
uacpi_u8 uacpi_load_table_op_decode_ops []
 
static const uacpi_char *const pop_names [UACPI_PARSE_OP_MAX+1]
 

Macro Definition Documentation

◆ _

#define _ (   op)    (op & 0x00FF)

Definition at line 24 of file opcodes.c.

◆ PARSE_FIELD_ELEMENTS

#define PARSE_FIELD_ELEMENTS (   parse_loop_pc)

Definition at line 52 of file opcodes.c.

◆ POP

#define POP (   x)    UACPI_PARSE_OP_##x

Definition at line 193 of file opcodes.c.

◆ UACPI_OP

#define UACPI_OP (   opname,
  opcode,
  ... 
)     { #opname, .decode_ops = __VA_ARGS__, .code = opcode },

Definition at line 5 of file opcodes.c.

◆ UACPI_OUT_OF_LINE_OP

#define UACPI_OUT_OF_LINE_OP (   opname,
  opcode,
  out_of_line_buf,
  props 
)
Value:
{ \
.name = #opname, \
.indirect_decode_ops = out_of_line_buf, \
.properties = props, \
.code = opcode, \
},
static const WCHAR props[]
Definition: wbemdisp.c:288

Definition at line 8 of file opcodes.c.

Function Documentation

◆ uacpi_get_op_spec()

const struct uacpi_op_spec * uacpi_get_op_spec ( uacpi_aml_op  op)

Definition at line 44 of file opcodes.c.

45{
46 if (op > 0xFF)
48
49 return &opcode_table[op];
50}
UINT op
Definition: effect.c:236
static const uacpi_u8 ext_op_to_idx[0x100]
Definition: opcodes.c:26
static const struct uacpi_op_spec ext_opcode_table[]
Definition: opcodes.c:20
#define _(op)
Definition: opcodes.c:24
static const struct uacpi_op_spec opcode_table[0x100]
Definition: opcodes.c:16

Referenced by exec_op(), and get_op().

◆ uacpi_parse_op_to_string()

const uacpi_char * uacpi_parse_op_to_string ( enum uacpi_parse_op  op)

Definition at line 260 of file opcodes.c.

265{
@ UACPI_PARSE_OP_MAX
Definition: opcodes.h:272
#define uacpi_unlikely(expr)
Definition: compiler.h:58

Referenced by trace_pop().

Variable Documentation

◆ ext_op_to_idx

const uacpi_u8 ext_op_to_idx[0x100]
static
Initial value:
= {
[_(UACPI_AML_OP_MutexOp)] = 1, [_(UACPI_AML_OP_EventOp)] = 2,
[_(UACPI_AML_OP_CondRefOfOp)] = 3, [_(UACPI_AML_OP_CreateFieldOp)] = 4,
[_(UACPI_AML_OP_LoadTableOp)] = 5, [_(UACPI_AML_OP_LoadOp)] = 6,
[_(UACPI_AML_OP_StallOp)] = 7, [_(UACPI_AML_OP_SleepOp)] = 8,
[_(UACPI_AML_OP_AcquireOp)] = 9, [_(UACPI_AML_OP_SignalOp)] = 10,
[_(UACPI_AML_OP_WaitOp)] = 11, [_(UACPI_AML_OP_ResetOp)] = 12,
[_(UACPI_AML_OP_ReleaseOp)] = 13, [_(UACPI_AML_OP_FromBCDOp)] = 14,
[_(UACPI_AML_OP_ToBCDOp)] = 15, [_(UACPI_AML_OP_UnloadOp)] = 16,
[_(UACPI_AML_OP_RevisionOp)] = 17, [_(UACPI_AML_OP_DebugOp)] = 18,
[_(UACPI_AML_OP_FatalOp)] = 19, [_(UACPI_AML_OP_TimerOp)] = 20,
[_(UACPI_AML_OP_OpRegionOp)] = 21, [_(UACPI_AML_OP_FieldOp)] = 22,
[_(UACPI_AML_OP_DeviceOp)] = 23, [_(UACPI_AML_OP_ProcessorOp)] = 24,
[_(UACPI_AML_OP_PowerResOp)] = 25, [_(UACPI_AML_OP_ThermalZoneOp)] = 26,
[_(UACPI_AML_OP_IndexFieldOp)] = 27, [_(UACPI_AML_OP_BankFieldOp)] = 28,
[_(UACPI_AML_OP_DataRegionOp)] = 29,
}

Definition at line 26 of file opcodes.c.

Referenced by uacpi_get_op_spec().

◆ ext_opcode_table

const struct uacpi_op_spec ext_opcode_table[]
static
Initial value:
= {
}
#define UACPI_ENUMERATE_EXT_OPCODES
Definition: opcodes.h:1154

Definition at line 20 of file opcodes.c.

Referenced by uacpi_get_op_spec().

◆ opcode_table

const struct uacpi_op_spec opcode_table[0x100]
static
Initial value:
= {
}
#define UACPI_ENUMERATE_OPCODES
Definition: opcodes.h:498

Definition at line 16 of file opcodes.c.

Referenced by uacpi_get_op_spec().

◆ pop_names

const uacpi_char* const pop_names[UACPI_PARSE_OP_MAX+1]
static

Definition at line 196 of file opcodes.c.

◆ uacpi_bank_field_op_decode_ops

uacpi_u8 uacpi_bank_field_op_decode_ops[]
Initial value:
= {
}
@ UACPI_PARSE_OP_OPERAND
Definition: opcodes.h:55
@ UACPI_PARSE_OP_TRACKED_PKGLEN
Definition: opcodes.h:77
@ UACPI_PARSE_OP_EXISTING_NAMESTRING
Definition: opcodes.h:95
@ UACPI_PARSE_OP_LOAD_IMM
Definition: opcodes.h:140
#define PARSE_FIELD_ELEMENTS(parse_loop_pc)
Definition: opcodes.c:52

Definition at line 102 of file opcodes.c.

◆ uacpi_field_op_decode_ops

uacpi_u8 uacpi_field_op_decode_ops[]

◆ uacpi_index_field_op_decode_ops

◆ uacpi_load_op_decode_ops

uacpi_u8 uacpi_load_op_decode_ops[]
Initial value:
= {
}
@ UACPI_PARSE_OP_END
Definition: opcodes.h:19
@ UACPI_PARSE_OP_LOAD_TRUE_OBJECT
Definition: opcodes.h:147
@ UACPI_PARSE_OP_INVOKE_HANDLER
Definition: opcodes.h:110
@ UACPI_PARSE_OP_DISPATCH_TABLE_LOAD
Definition: opcodes.h:205
@ UACPI_PARSE_OP_TERM_ARG_UNWRAP_INTERNAL
Definition: opcodes.h:40
@ UACPI_PARSE_OP_JMP
Definition: opcodes.h:271
@ UACPI_PARSE_OP_OBJECT_TRANSFER_TO_PREV
Definition: opcodes.h:159
@ UACPI_PARSE_OP_IF_NULL
Definition: opcodes.h:224
@ UACPI_PARSE_OP_STORE_TO_TARGET
Definition: opcodes.h:170
@ UACPI_PARSE_OP_TARGET
Definition: opcodes.h:67
@ UACPI_PARSE_OP_LOAD_FALSE_OBJECT
Definition: opcodes.h:146
@ UACPI_PARSE_OP_OBJECT_ALLOC_TYPED
Definition: opcodes.h:125
@ UACPI_PARSE_OP_LOAD_ZERO_IMM
Definition: opcodes.h:137
@ UACPI_OBJECT_METHOD
Definition: types.h:113

Definition at line 119 of file opcodes.c.

◆ uacpi_load_table_op_decode_ops

uacpi_u8 uacpi_load_table_op_decode_ops[]

Definition at line 149 of file opcodes.c.