x86_64 gen_align fix

Richard Henderson rth@twiddle.net
Wed Jun 4 20:20:00 GMT 2003


We could fall through without returning anything.  Probably
only shows up for real with cross compilers, since no real
version of the x86_64 assembler doesn't support max skip.


r~


        * config/i386/i386.md (align): Use ASM_OUTPUT_*ALIGN macros.

Index: i386.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.md,v
retrieving revision 1.463
diff -c -p -d -r1.463 i386.md
*** i386.md	4 Jun 2003 16:42:23 -0000	1.463
--- i386.md	4 Jun 2003 18:43:28 -0000
***************
*** 14279,14294 ****
     (set_attr "modrm" "0")
     (set_attr "ppro_uops" "one")])
  
! ;; UNSPEC_VOLATILE is considered to use and clobber all hard registers and
! ;; all of memory.  This blocks insns from being moved across this point.
  
  (define_insn "align"
    [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_ALIGN)]
    ""
  {
! #ifdef HAVE_GAS_MAX_SKIP_P2ALIGN
!   return ".p2align\t4,,%c0";
  #endif
  }
    [(set_attr "length" "16")])
  
--- 14279,14298 ----
     (set_attr "modrm" "0")
     (set_attr "ppro_uops" "one")])
  
! ;; Align to 16-byte boundary, max skip in op0.  Used to avoid
! ;; branch prediction penalty for the third jump in a 16-byte
! ;; block on K8.
  
  (define_insn "align"
    [(unspec_volatile [(match_operand 0 "" "")] UNSPECV_ALIGN)]
    ""
  {
! #ifdef ASM_OUTPUT_MAX_SKIP_ALIGN
!   ASM_OUTPUT_MAX_SKIP_ALIGN (asm_out_file, 4, INTVAL (operands[0]));
! #else
!   ASM_OUTPUT_ALIGN (asm_out_file, 4);
  #endif
+   return "";
  }
    [(set_attr "length" "16")])
  



More information about the Gcc-patches mailing list