]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gas/config/tc-riscv.c
2.41 Release sources
[thirdparty/binutils-gdb.git] / gas / config / tc-riscv.c
index aaf8b9be64fdf4b8a8635d221fab9edd509ab000..297bb9b2a819b6de32574871ce314b148fa489e5 100644 (file)
@@ -337,8 +337,7 @@ riscv_set_arch (const char *s)
   riscv_reset_subsets_list_arch_str ();
 
   riscv_set_rvc (false);
-  if (riscv_subset_supports (&riscv_rps_as, "c")
-      || riscv_subset_supports (&riscv_rps_as, "zca"))
+  if (riscv_subset_supports (&riscv_rps_as, "c"))
     riscv_set_rvc (true);
 
   if (riscv_subset_supports (&riscv_rps_as, "ztso"))
@@ -1426,18 +1425,6 @@ validate_riscv_insn (const struct riscv_opcode *opc, int length)
                  goto unknown_validate_operand;
                }
              break;
-           case 'c':
-             switch (*++oparg)
-               {
-               /* byte immediate operators, load/store byte insns.  */
-               case 'h': used_bits |= ENCODE_ZCB_HALFWORD_UIMM (-1U); break;
-               /* halfword immediate operators, load/store halfword insns.  */
-               case 'b': used_bits |= ENCODE_ZCB_BYTE_UIMM (-1U); break;
-               case 'f': break;
-               default:
-                 goto unknown_validate_operand;
-               }
-             break;
            default:
              goto unknown_validate_operand;
            }
@@ -3571,47 +3558,6 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
                      goto unknown_riscv_ip_operand;
                    }
                  break;
-
-               case 'c':
-                 switch (*++oparg)
-                   {
-                   case 'h': /* Immediate field for c.lh/c.lhu/c.sh.  */
-                     /* Handle cases, such as c.sh rs2', (rs1').  */
-                     if (riscv_handle_implicit_zero_offset (imm_expr, asarg))
-                       continue;
-                     if (my_getSmallExpression (imm_expr, imm_reloc, asarg, p)
-                         || imm_expr->X_op != O_constant
-                         || !VALID_ZCB_HALFWORD_UIMM ((valueT) imm_expr->X_add_number))
-                       break;
-                     ip->insn_opcode |= ENCODE_ZCB_HALFWORD_UIMM (imm_expr->X_add_number);
-                     goto rvc_imm_done;
-
-                   case 'b': /* Immediate field for c.lbu/c.sb.  */
-                     /* Handle cases, such as c.lbu rd', (rs1').  */
-                     if (riscv_handle_implicit_zero_offset (imm_expr, asarg))
-                       continue;
-                     if (my_getSmallExpression (imm_expr, imm_reloc, asarg, p)
-                         || imm_expr->X_op != O_constant
-                         || !VALID_ZCB_BYTE_UIMM ((valueT) imm_expr->X_add_number))
-                       break;
-                     ip->insn_opcode |= ENCODE_ZCB_BYTE_UIMM (imm_expr->X_add_number);
-                     goto rvc_imm_done;
-
-                   case 'f': /* Operand for matching immediate 255.  */
-                     if (my_getSmallExpression (imm_expr, imm_reloc, asarg, p)
-                         || imm_expr->X_op != O_constant
-                         || imm_expr->X_add_number != 255)
-                       break;
-                     /* This operand is used for matching immediate 255, and
-                        we do not write anything to encoding by this operand.  */
-                     asarg = expr_parse_end;
-                     imm_expr->X_op = O_absent;
-                     continue;
-
-                   default:
-                     goto unknown_riscv_ip_operand;
-                   }
-                 break;
                default:
                  goto unknown_riscv_ip_operand;
                }
@@ -4376,8 +4322,7 @@ s_riscv_option (int x ATTRIBUTE_UNUSED)
       riscv_reset_subsets_list_arch_str ();
 
       riscv_set_rvc (false);
-      if (riscv_subset_supports (&riscv_rps_as, "c")
-         || riscv_subset_supports (&riscv_rps_as, "zca"))
+      if (riscv_subset_supports (&riscv_rps_as, "c"))
        riscv_set_rvc (true);
 
       if (riscv_subset_supports (&riscv_rps_as, "ztso"))