IDA SDK
Macros
Switch info flags

Detailed Description

Used by switch_info_t::flags.

Macros

#define SWI_SPARSE   0x00000001
 sparse switch (value table present) More...
 
#define SWI_V32   0x00000002
 32-bit values in table
 
#define SWI_J32   0x00000004
 32-bit jump offsets
 
#define SWI_VSPLIT   0x00000008
 value table is split (only for 32-bit values)
 
#define SWI_DEFAULT   0x00000010
 default case is present
 
#define SWI_DEF_IN_TBL   0x00000020
 default case is an entry in the jump table. More...
 
#define SWI_JMP_INV   0x00000040
 jumptable is inversed. More...
 
#define SWI_SHIFT_MASK   0x00000180
 use formula (element<<shift) + elbase to find jump targets
 
#define SWI_ELBASE   0x00000200
 elbase is present (if not and shift!=0, endof(jumpea) is used)
 
#define SWI_JSIZE   0x00000400
 jump offset expansion bit
 
#define SWI_VSIZE   0x00000800
 value table element size expansion bit
 
#define SWI_SEPARATE   0x00001000
 create an array of individual elements (otherwise separate items)
 
#define SWI_SIGNED   0x00002000
 jump table entries are signed
 
#define SWI_CUSTOM   0x00004000
 custom jump table. More...
 
#define SWI_INDIRECT   0x00010000
 value table elements are used as indexes into the jump table
 
#define SWI_SUBTRACT   0x00020000
 table values are subtracted from the elbase instead of being added
 
#define SWI_HXNOLOWCASE   0x00040000
 lowcase value should not be used by the decompiler (internal flag)
 
#define SWI_STDTBL   0x00080000
 custom jump table with standard table formatting. More...
 
#define SWI_DEFRET   0x00100000
 return in the default case (defjump==BADADDR)
 

Macro Definition Documentation

#define SWI_SPARSE   0x00000001

sparse switch (value table present)

otherwise lowcase present

#define SWI_DEF_IN_TBL   0x00000020

default case is an entry in the jump table.

This flag is only applicable in the case of a sparse nonindirect switch (i.e. a switch with a values table). <jump table="" size>=""> ==

+ 1. The default case entry is the last one in the table (or the first one in the case of an inversed jump table). See also the find_defjump_from_table() helper function.

#define SWI_JMP_INV   0x00000040

jumptable is inversed.

(last entry is for first entry in values table)

#define SWI_CUSTOM   0x00004000

custom jump table.

processor_t::create_switch_xrefs will be called to create code xrefs for the table. Custom jump table must be created by the module (see also SWI_STDTBL)

#define SWI_STDTBL   0x00080000

custom jump table with standard table formatting.

ATM IDA doesn't use SWI_CUSTOM for switches with standard table formatting. So this flag can be considered as obsolete.