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:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto:void insn_get_immediate(struct insn *insn)

Type:void

Parameter:

TypeParameterName
struct insn *insn
551  If !0 if we've run insn_get_xxx() for this field Then Return
553  If Not !0 if we've run insn_get_xxx() for this field Then 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.
556  If inat_has_moffset(attr) Then
557  If Not Decode moffset16/32/64. Return 0 if failed Then Go to err_out
559  Go to done
562  If Not inat_has_immediate(attr) Then Go to done
567  Case inat_immediate_size(attr) == Immediate size
568  value = get_next(signedchar, insn)
569  nbytes = 1
570  Break
571  Case inat_immediate_size(attr) == INAT_IMM_WORD
572  value = get_next(short, insn)
573  nbytes = 2
574  Break
575  Case inat_immediate_size(attr) == INAT_IMM_DWORD
576  value = get_next(int, insn)
577  nbytes = 4
578  Break
579  Case inat_immediate_size(attr) == INAT_IMM_QWORD
580  value = get_next(int, insn)
581  nbytes = 4
582  value = get_next(int, insn)
583  nbytes = 4
584  Break
585  Case inat_immediate_size(attr) == INAT_IMM_PTR
586  If Not Decode ptr16:16/32(Ap) Then Go to err_out
588  Break
589  Case inat_immediate_size(attr) == INAT_IMM_VWORD32
590  If Not Decode imm v32(Iz). Return 0 if failed Then Go to err_out
592  Break
593  Case inat_immediate_size(attr) == INAT_IMM_VWORD
594  If Not Decode imm v64(Iv/Ov), Return 0 if failed Then Go to err_out
596  Break
597  Default
599  Go to err_out
601  If inat_has_second_immediate(attr) Then
602  value = get_next(signedchar, insn)
603  nbytes = 1
605  done :
606  !0 if we've run insn_get_xxx() for this field = 1
608  err_out :
609  Return
Caller
NameDescribe
insn_get_lengthsn_get_length() - Get the length of instruction*@insn: &struct insn containing instruction* If necessary, first collects the instruction up to and including the* immediates bytes.