From: Doug Evans Date: Tue, 7 Apr 1998 03:22:22 +0000 (+0000) Subject: * config/tc-dvp.c (assemble_vif): 0 is a valid length value (= max+1). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a9589a2ca77f8463d95d90f8711fd5ca8c0fa633;p=binutils-gdb.git * config/tc-dvp.c (assemble_vif): 0 is a valid length value (= max+1). (install_vif_length): 0 is a valid length value (= max+1). --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 34db311746f..d7664d9cdfb 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -2,6 +2,8 @@ start-sanitize-sky Mon Apr 6 17:08:47 1998 Doug Evans * config/tc-dvp.c (assemble_vif): Watch for macro insns. + 0 is a valid length value (= max+1). + (install_vif_length): 0 is a valid length value (= max+1). end-sanitize-sky Mon Apr 6 12:06:39 1998 Andreas Schwab diff --git a/gas/config/tc-dvp.c b/gas/config/tc-dvp.c index b3c523a1148..f605b06e177 100644 --- a/gas/config/tc-dvp.c +++ b/gas/config/tc-dvp.c @@ -569,7 +569,7 @@ assemble_vif (str) /* Ensure relaxable fragments are in their own fragment. Otherwise md_apply_fix3 mishandles fixups to insns earlier - in the fragment (because we set fr_opcode for the `direct' insn + in the fragment (because we set fr_opcode for the `mpg' insn because it can move in the fragment). */ frag_wane (frag_now); frag_new (0); @@ -762,7 +762,7 @@ assemble_vif (str) { /* data_len == -1 means the value must be computed from the data. */ - if (data_len == 0 || data_len <= -2) + if (data_len <= -2) as_bad ("invalid data length"); if (output_vif && data_len != -1) @@ -1345,7 +1345,7 @@ md_operand (expressionP) /* Advance over the '*'. */ ++input_line_pointer; } - /* Check if this is a '*' for mpgloc. */ + /* Check if this is a '*' for unpackloc. */ else if (cur_opcode && (cur_opcode->flags & VIF_OPCODE_UNPACK) != 0 && (cur_operand->flags & DVP_OPERAND_UNPACK_ADDRESS) != 0 @@ -2246,8 +2246,9 @@ install_vif_length (buf, len) as_bad ("missing `stcycle', can't compute length of `unpack' insn"); len = 1; } - if (len < 1 || len > 256) - as_bad ("`unpack' data length must be between 1 and 256"); + if (len < 0 || len > 256) + as_bad ("`unpack' data length must be between 0 and 256"); + /* 256 is recorded as 0 in the insn */ len = len == 256 ? 0 : len; buf[2] = len; }