Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\lib\insn.c Create Date:2022-07-28 07:25:07
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:void insn_get_displacement(struct insn *insn)

Type:void

Parameter:

TypeParameterName
struct insn *insn
382  If !0 if we've run insn_get_xxx() for this field Then Return
384  If Not !0 if we've run insn_get_xxx() for this field Then 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  If nbytes Then
404  mod = X86_MODRM_MOD(value)
405  rm = X86_MODRM_RM(value)
406  base = X86_SIB_BASE(value)
407  If mod == 3 Then Go to out
409  If mod == 1 Then
410  value = get_next(signedchar, insn)
411  nbytes = 1
412  Else if addr_bytes == 2 Then
413  If mod == 0 && rm == 6 || mod == 2 Then
414  value = get_next(short, insn)
416  nbytes = 2
418  Else
419  If mod == 0 && rm == 5 || mod == 2 || mod == 0 && base == 5 Then
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  Return
Caller
NameDescribe
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