integer_t SIM_instruction_get_field_value(instruction_id_t ii, const char *field_name);
Reads the value of a format field. Fields that represent signed constants will automatically be sign extended. ii is the instruction to on CPU cpu to extract the field from.
Supported fields for the SPARC v9 target are (see the SPARC Architecture Manual, Version 9): a, cc0, cc1, cc2, cmask, cond, d16hi, d16lo, disp19, disp22, disp30, fcn, i, imm22, imm_asi, mmask, op, op2, op3, opf, opf_low, p, rcond, rd, rs1, rs2, shcnt32, shcnt64, simm10, simm11, simm13, sw_trap, x.
The only supported field for the x86 target is prefix which is a bit field that can be tested with the following constants: SIM_DI_PREFIX_F0_BIT, SIM_DI_PREFIX_F2_BIT, SIM_DI_PREFIX_F3_BIT, SIM_DI_PREFIX_CS_BIT, SIM_DI_PREFIX_SS_BIT, SIM_DI_PREFIX_DS_BIT, SIM_DI_PREFIX_ES_BIT, SIM_DI_PREFIX_FS_BIT, SIM_DI_PREFIX_GS_BIT, SIM_DI_PREFIX_OPERAND_SIZE_BIT, SIM_DI_PREFIX_ADDRESS_SIZE_BIT and SIM_DI_PREFIX_SSE_BIT.
Note that certain fields are only available for certain instructions, thus accessing simm13 when i is 0 will be illegal.
The instruction has to be decoded in order to use this function. See SIM_instruction_proceed.