diff options
Diffstat (limited to 'include/opcode/arc-func.h')
-rw-r--r-- | include/opcode/arc-func.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/opcode/arc-func.h b/include/opcode/arc-func.h index c794593..fb45b07 100644 --- a/include/opcode/arc-func.h +++ b/include/opcode/arc-func.h @@ -274,8 +274,21 @@ replace_disp12s (unsigned insn, int value ATTRIBUTE_UNUSED) insn = insn & ~0xfff; insn |= ((value >> 0) & 0x003f) << 6; insn |= ((value >> 6) & 0x003f) << 0; - return insn; } #endif /* REPLACE_disp12s */ + +/* mask = 0000001111111111. */ +#ifndef REPLACE_jli +#define REPLACE_jli +ATTRIBUTE_UNUSED static unsigned +replace_jli (unsigned insn, int value) +{ + insn = insn & ~0x3ff; + insn |= ((value >> 0) & 0x03ff) << 0; + + return insn; +} + +#endif /* REPLACE_jli */ |