This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Support Neon instructions in non-unified ARM mode


Hi,

This patch fixes an oversight which meant that the Neon instruction set didn't work with the legacy ARM syntax mode in Gas. With this patch, the Neon instructions can be used, though any immediate operands must be prefixed with "#" in accordance with the usual ARM syntax, etc.

Tested with "make check" and hand-written examples (modified versions of the existing Neon tests from the Gas testsuite). OK to commit? (for mainline and the CSL binutils branch?)

Cheers,

Julian

ChangeLog

    gas/
    * config/tc-arm.c (opcode_lookup): Allow Neon type suffixes to be
    recognized in non-unified syntax mode.

? gas/config/~tc-arm.c
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.250.2.20
diff -c -p -r1.250.2.20 tc-arm.c
*** gas/config/tc-arm.c	19 Jul 2006 13:08:20 -0000	1.250.2.20
--- gas/config/tc-arm.c	14 Aug 2006 13:55:45 -0000
*************** opcode_lookup (char **str)
*** 13482,13492 ****
    const struct asm_opcode *opcode;
    const struct asm_cond *cond;
    char save[2];
  
    /* Scan up to the end of the mnemonic, which must end in white space,
!      '.' (in unified mode only), or end of string.  */
    for (base = end = *str; *end != '\0'; end++)
!     if (*end == ' ' || (unified_syntax && *end == '.'))
        break;
  
    if (end == base)
--- 13482,13495 ----
    const struct asm_opcode *opcode;
    const struct asm_cond *cond;
    char save[2];
+   bfd_boolean neon_supported;
+   
+   neon_supported = ARM_CPU_HAS_FEATURE (cpu_variant, fpu_neon_ext_v1);
  
    /* Scan up to the end of the mnemonic, which must end in white space,
!      '.' (in unified mode, or for Neon instructions), or end of string.  */
    for (base = end = *str; *end != '\0'; end++)
!     if (*end == ' ' || ((unified_syntax || neon_supported) && *end == '.'))
        break;
  
    if (end == base)
*************** opcode_lookup (char **str)
*** 13497,13505 ****
      {
        int offset = 2;
        
!       if (end[1] == 'w')
  	inst.size_req = 4;
!       else if (end[1] == 'n')
  	inst.size_req = 2;
        else
          offset = 0;
--- 13500,13510 ----
      {
        int offset = 2;
        
!       /* The .w and .n suffixes are only valid if the unified syntax is in
!          use.  */
!       if (unified_syntax && end[1] == 'w')
  	inst.size_req = 4;
!       else if (unified_syntax && end[1] == 'n')
  	inst.size_req = 2;
        else
          offset = 0;
*************** opcode_lookup (char **str)
*** 13510,13516 ****
  
        if (end[offset] == '.')      
  	{
! 	  /* See if we have a Neon type suffix.  */
            if (parse_neon_type (&inst.vectype, str) == FAIL)
  	    return 0;
          }
--- 13515,13522 ----
  
        if (end[offset] == '.')      
  	{
! 	  /* See if we have a Neon type suffix (possible in either unified or
!              non-unified ARM syntax mode).  */
            if (parse_neon_type (&inst.vectype, str) == FAIL)
  	    return 0;
          }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]