mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-12 18:36:15 +00:00
Fix JMPI encoding for Haswell.
It uses the byte-aligned jump instead of 64-bit units. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
parent
8aa952873c
commit
495c4e14e7
@ -430,9 +430,13 @@ int main(int argc, char **argv)
|
|||||||
// this is a branch instruction with one offset argument
|
// this is a branch instruction with one offset argument
|
||||||
int offset = inst->first_reloc_offset;
|
int offset = inst->first_reloc_offset;
|
||||||
/* bspec: Unlike other flow control instructions, the offset used by JMPI is relative to the incremented instruction pointer rather than the IP value for the instruction itself. */
|
/* bspec: Unlike other flow control instructions, the offset used by JMPI is relative to the incremented instruction pointer rather than the IP value for the instruction itself. */
|
||||||
if(entry->instruction.header.opcode == BRW_OPCODE_JMPI)
|
|
||||||
|
int is_jmpi = entry->instruction.header.opcode == BRW_OPCODE_JMPI; // target relative to the post-incremented IP, so delta == 1 if JMPI
|
||||||
|
if(is_jmpi)
|
||||||
offset --;
|
offset --;
|
||||||
offset = jump_distance(offset);
|
offset = jump_distance(offset);
|
||||||
|
if (is_jmpi && (gen_level == 75))
|
||||||
|
offset = offset * 8;
|
||||||
|
|
||||||
if(!IS_GENp(6)) {
|
if(!IS_GENp(6)) {
|
||||||
entry->instruction.bits3.JIP = offset;
|
entry->instruction.bits3.JIP = offset;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user