[PATCH 10/34] HP-PA: use is_end_of_stmt()

John David Anglin dave.anglin@bell.net
Wed Feb 19 18:08:31 GMT 2025


On 2025-02-19 10:26 a.m., Jan Beulich wrote:
> ... instead of open-coding it.

This might be correct but on HP-PA multiple statements can appear on a line
separated by the '!' character.  We have this define in tc-hppa.h:

/* On the PA, an exclamation point can appear in an instruction.  It is
   used in FP comparison instructions and as an end of line marker.
   When used in an instruction it will always follow a comma.  */
#define TC_EOL_IN_INSN(PTR)     (*(PTR) == '!' && (PTR)[-1] == ',')

> 
> --- a/gas/config/tc-hppa.c
> +++ b/gas/config/tc-hppa.c
> @@ -2420,14 +2420,14 @@ pa_chk_field_selector (char **str)
>      s++;
>    *str = s;
>  
> -  if (is_end_of_line [(unsigned char) s[0]])
> +  if (is_end_of_stmt (s[0]))
>      return e_fsel;
>    else if (s[1] == '\'' || s[1] == '%')
>      {
>        name[0] = TOLOWER (s[0]);
>        name[1] = 0;
>      }
> -  else if (is_end_of_line [(unsigned char) s[1]])
> +  else if (is_end_of_stmt (s[1]))
>      return e_fsel;
>    else if (s[2] == '\'' || s[2] == '%')
>      {
> @@ -2435,7 +2435,7 @@ pa_chk_field_selector (char **str)
>        name[1] = TOLOWER (s[1]);
>        name[2] = 0;
>      }
> -  else if (is_end_of_line [(unsigned char) s[2]])
> +  else if (is_end_of_stmt (s[2]))
>      return e_fsel;
>    else if (s[3] == '\'' || s[3] == '%')
>      {
> 


-- 
John David Anglin  dave.anglin@bell.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/binutils/attachments/20250219/59d3b802/attachment-0001.sig>


More information about the Binutils mailing list