mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 14:59:31 +08:00
* v850-opc.c (insert_d9, insert_d22): Slightly improve error
message. Issue an error if the branch offset is odd.
This commit is contained in:
@ -1,6 +1,9 @@
|
|||||||
start-sanitize-v850
|
start-sanitize-v850
|
||||||
Sat Aug 31 01:27:26 1996 Jeffrey A Law (law@cygnus.com)
|
Sat Aug 31 01:27:26 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
|
* v850-opc.c (insert_d9, insert_d22): Slightly improve error
|
||||||
|
message. Issue an error if the branch offset is odd.
|
||||||
|
|
||||||
* v850-opc.c: Add notes about needing special insert/extract
|
* v850-opc.c: Add notes about needing special insert/extract
|
||||||
for all the load/store insns, except "ld.b" and "st.b".
|
for all the load/store insns, except "ld.b" and "st.b".
|
||||||
|
|
||||||
|
@ -267,7 +267,10 @@ insert_d9 (insn, value, errmsg)
|
|||||||
const char **errmsg;
|
const char **errmsg;
|
||||||
{
|
{
|
||||||
if (value > 255 || value <= -256)
|
if (value > 255 || value <= -256)
|
||||||
*errmsg = "value out of range";
|
*errmsg = "branch value out of range";
|
||||||
|
|
||||||
|
if ((value % 2) != 0)
|
||||||
|
*errmsg = "branch to odd offset";
|
||||||
|
|
||||||
return (insn | ((value & 0x1f0) << 7) | ((value & 0x0e) << 3));
|
return (insn | ((value & 0x1f0) << 7) | ((value & 0x0e) << 3));
|
||||||
}
|
}
|
||||||
@ -294,6 +297,9 @@ insert_d22 (insn, value, errmsg)
|
|||||||
if (value > 0xfffff || value <= -0x100000)
|
if (value > 0xfffff || value <= -0x100000)
|
||||||
*errmsg = "value out of range";
|
*errmsg = "value out of range";
|
||||||
|
|
||||||
|
if ((value % 2) != 0)
|
||||||
|
*errmsg = "branch to odd offset";
|
||||||
|
|
||||||
return (insn | ((value & 0xfffe) << 16) | ((value & 0x3f0000) >> 16));
|
return (insn | ((value & 0xfffe) << 16) | ((value & 0x3f0000) >> 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user