projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prevent address violation problem when disassembling corrupt aarch64 binary.
[deliverable/binutils-gdb.git]
/
opcodes
/
fr30-ibld.c
diff --git
a/opcodes/fr30-ibld.c
b/opcodes/fr30-ibld.c
index 177a12baba35e12459fc917243a70334626e3e44..b6f1fa16ff44d029f762889771dee17d211ad70e 100644
(file)
--- a/
opcodes/fr30-ibld.c
+++ b/
opcodes/fr30-ibld.c
@@
-3,7
+3,7
@@
THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
- the resultant file is machine generated, cgen-ibld.in isn't
THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
- the resultant file is machine generated, cgen-ibld.in isn't
- Copyright (C) 1996-201
5
Free Software Foundation, Inc.
+ Copyright (C) 1996-201
7
Free Software Foundation, Inc.
This file is part of libopcodes.
This file is part of libopcodes.
@@
-207,12
+207,19
@@
insert_normal (CGEN_CPU_DESC cd,
#if CGEN_INT_INSN_P
{
#if CGEN_INT_INSN_P
{
- int shift;
+ int shift
_within_word, shift_to_word, shift
;
+ /* How to shift the value to BIT0 of the word. */
+ shift_to_word = total_length - (word_offset + word_length);
+
+ /* How to shift the value to the field within the word. */
if (CGEN_INSN_LSB0_P)
if (CGEN_INSN_LSB0_P)
- shift
= (word_offset + start + 1)
- length;
+ shift
_within_word = start + 1
- length;
else
else
- shift = total_length - (word_offset + start + length);
+ shift_within_word = word_length - start - length;
+
+ /* The total SHIFT, then mask in the value. */
+ shift = shift_to_word + shift_within_word;
*buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
}
*buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
}
@@
-874,7
+881,7
@@
fr30_cgen_extract_operand (CGEN_CPU_DESC cd,
{
long value;
length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 16, total_length, pc, & value);
{
long value;
length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 16, total_length, pc, & value);
- value = ((value) | (
((-1) << (4))
));
+ value = ((value) | (
-16
));
fields->f_m4 = value;
}
break;
fields->f_m4 = value;
}
break;
This page took
0.024928 seconds
and
4
git commands to generate.