This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

sparc.md generates invalid opcode



The new sparc.md generates the opcode "b,pt %xcc" which causes the Solaris
2.6 assembler to dump core.  This patch fixes the problem by changing
"b,pt" to "ba,pt".  Also, since the only processor with the b,a bug is
TurboSPARC the patch eliminates the bug workaround for V9.

*** sparc.md~	Mon Aug 10 09:38:16 1998
--- sparc.md	Mon Aug 10 18:58:11 1998
***************
*** 6535,6553 ****
    ""
    "*
  {
!   /* Some implementations (e.g. TurboSparc) are reported to have problems
!      with
  	foo: b,a foo
       i.e. an empty loop with the annul bit set.  The workaround is to use 
          foo: b foo; nop
       instead.  */
  
!   if (flag_delayed_branch
        && (insn_addresses[INSN_UID (operands[0])]
  	  == insn_addresses[INSN_UID (insn)]))
!     return TARGET_V9 ? \"b,pt\\t%%xcc, %l0%#\" : \"b\\t%l0%#\";
    else
!     return TARGET_V9 ? \"b,pt%*\\t%%xcc, %l0%(\" : \"b%*\\t%l0%(\";
  }"
    [(set_attr "type" "uncond_branch")])
  
--- 6545,6562 ----
    ""
    "*
  {
!   /* TurboSparc is reported to have problems with
  	foo: b,a foo
       i.e. an empty loop with the annul bit set.  The workaround is to use 
          foo: b foo; nop
       instead.  */
  
!   if (! TARGET_V9 && flag_delayed_branch
        && (insn_addresses[INSN_UID (operands[0])]
  	  == insn_addresses[INSN_UID (insn)]))
!     return \"b\\t%l0%#\";
    else
!     return TARGET_V9 ? \"ba,pt%*\\t%%xcc, %l0%(\" : \"b%*\\t%l0%(\";
  }"
    [(set_attr "type" "uncond_branch")])
  



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