函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\lib\insn.c Create Date:2022-07-27 08:24:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sn_get_displacement() - Get the displacement of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* SIB byte.* Displacement value is sign-expanded.

函数原型:void insn_get_displacement(struct insn *insn)

返回类型:void

参数:

类型参数名称
struct insn *insn
382  如果 !0 if we've run insn_get_xxx() for this field 则返回
384  如果非 !0 if we've run insn_get_xxx() for this field sn_get_sib() - Get the SIB byte of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* ModRM byte.
386  如果nbytes
404  mod等于X86_MODRM_MOD(value)
405  rm等于X86_MODRM_RM(value)
406  base等于X86_SIB_BASE(value)
407  如果mod恒等于3则转到:out
409  如果mod恒等于1则
410  value等于get_next(signedchar, insn)
411  nbytes等于1
412  否则如果addr_bytes恒等于2则
413  如果mod恒等于0且rm恒等于6或mod恒等于2则
414  value等于get_next(short, insn)
416  nbytes等于2
418  否则
419  如果mod恒等于0且rm恒等于5或mod恒等于2或mod恒等于0且base恒等于5则
421  value等于get_next(int, insn)
422  nbytes等于4
426  out :
427  !0 if we've run insn_get_xxx() for this field 等于1
429  err_out :
430  返回
调用者
名称描述
insn_get_immediatesn_get_immediate() - Get the immediates of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* displacement bytes.* Basically, most of immediates are sign-expanded
get_addr_ref_16get_addr_ref_16() - Obtain the 16-bit address referred by instruction*@insn: Instruction containing ModRM byte and displacement*@regs: Register values as seen when entering kernel mode* This function is to be used with 16-bit address encodings