[ARC] Add SJLI instruction.
authorClaudiu Zissulescu <claziss@synopsys.com>
Wed, 19 Jul 2017 07:56:55 +0000 (09:56 +0200)
committerclaziss <claziss@synopsys.com>
Wed, 19 Jul 2017 07:56:55 +0000 (09:56 +0200)
include/
2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>

* opcode/arc.h (SJLI): Add.

opcode/
2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>

* arc-opc.c (extract_uimm12_20): New function.
(UIMM12_20): New operand.
(SIMM3_5_S): Adjust.
* arc-tbl.h (sjli): Add new instruction.

include/ChangeLog
include/opcode/arc.h
opcodes/ChangeLog
opcodes/arc-opc.c
opcodes/arc-tbl.h

index a31f62eea4ed8f132370ec2298c1299834488ee8..da1ce10a43a53f5cf36a483c2d78daef6aa68acd 100644 (file)
@@ -1,3 +1,7 @@
+2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>
+
+       * opcode/arc.h (SJLI): Add.
+
 2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>
            John Eric Martin  <John.Martin@emmicro-us.com>
 
index 69b26303a2ec7f98b435c225eff242afaa572017..cd8b1a8880ba73676965549aa9f45f2537319658 100644 (file)
@@ -76,6 +76,7 @@ typedef enum
   PMU,
   POP,
   PUSH,
+  SJLI,
   STORE,
   SUB,
   ULTRAIP,
index e789003512520e2ab5d0cfc8b1cdb488aae76c50..d14b325215f94bcd095ef713dd89c704fef29c7c 100644 (file)
@@ -1,3 +1,10 @@
+2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>
+
+       * arc-opc.c (extract_uimm12_20): New function.
+       (UIMM12_20): New operand.
+       (SIMM3_5_S): Adjust.
+       * arc-tbl.h (sjli): Add new instruction.
+
 2017-07-19  Claudiu Zissulescu  <claziss@synopsys.com>
            John Eric Martin  <John.Martin@emmicro-us.com>
 
index 7f934ce5b5d101595ab783d3a5ae543e2dabba23..f39704d3843be0627fcc5aca47b3f3c7cdcd8436 100644 (file)
@@ -1269,6 +1269,18 @@ extract_nps_misc_imm_offset (unsigned long long  insn,
   return ((insn >> 8) & 0x1f) * 4;
 }
 
+static long long int
+extract_uimm12_20 (unsigned long long insn ATTRIBUTE_UNUSED,
+                  bfd_boolean * invalid ATTRIBUTE_UNUSED)
+{
+  int value = 0;
+
+  value |= ((insn >> 6) & 0x003f) << 0;
+  value |= ((insn >> 0) & 0x003f) << 6;
+
+  return value;
+}
+
 /* Include the generic extract/insert functions.  Order is important
    as some of the functions present in the .h may be disabled via
    defines.  */
@@ -1934,8 +1946,12 @@ const struct arc_operand arc_operands[] =
   {12, 0, -SIMM12_20R, ARC_OPERAND_SIGNED | ARC_OPERAND_PCREL,
    insert_simm12_20, extract_simm12_20},
 
+  /* UIMM12_20 mask = 00000000000000000000111111222222.  */
+#define UIMM12_20      (SIMM12_20R + 1)
+  {12, 0, 0, ARC_OPERAND_UNSIGNED, insert_simm12_20, extract_uimm12_20},
+
   /* SIMM3_5_S mask = 0000011100000000.  */
-#define SIMM3_5_S      (SIMM12_20R + 1)
+#define SIMM3_5_S      (UIMM12_20 + 1)
   {3, 0, 0, ARC_OPERAND_SIGNED | ARC_OPERAND_NCHK,
    insert_simm3s, extract_simm3s},
 
index 07ff304acc8581d29463ee152de996cd4c6d8e07..ab51f0d7ddb9480ea1797341f02a94ae3df4f1c0 100644 (file)
 /* sfxtr<.f><.cc> b,b,limm 00110bbb11101001FBBB1111100QQQQQ.  */
 { "sfxtr", 0x30E90F80, 0xF8FF0FE0, ARC_OPCODE_ARC700, ARITH, NONE, { RB, RBdup, LIMM }, { C_F, C_CC }},
 
+/* sjli u12 00101RRR101000001RRRuuuuuuUUUUUU.  */
+{ "sjli", 0x28A08000, 0xFFFFF000, ARC_OPCODE_ARCv2EM, SJLI, CD1, { UIMM12_20 }, { 0 }},
+
 /* sleep c 00100001001011110000CCCCCC111111.  */
 { "sleep", 0x212F003F, 0xFFFFF03F, ARC_OPCODE_ARC600 | ARC_OPCODE_ARC700 | ARC_OPCODE_ARCv2EM | ARC_OPCODE_ARCv2HS, KERNEL, NONE, { RC }, { 0 }},
 
This page took 0.035905 seconds and 4 git commands to generate.