This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Committed: MMIX corrections, use of branch prediction hints.


The -mtoplevel-symbols stuff had several bugs (ugh).  I thought
it better to fix it than to delete it.  Now this port also uses
the branch prediction hints (optionally not) and the nice
define_constants machinery.

Perhaps you think I should not have "implemented" use of branch
prediction hints since we're in feature freeze, or even fixed
the minor FIXMEs.  I thought about that, but in the end I
considered it worse maintenance-wise and without practical
reason to keep as a separate patch.  It's not affecting any
(other; pre-3.1) target, and it's more logical to include it now
given that new ports are still considered acceptable to include.

I hadn't done the branch prediction thing before due to lack of
(time and) a "real" test-program; no use implementing something
you can't test.  It seemed a waste to not use all that static
branch prediction goodness and was high on my todo-list.  With a
certain amount of tweaking, I managed to get ghostscript-6.52 to
compile and run in the mmix simulator.  With branch prediction
(in the program as well as the library) the miss:hit prediction
ratio went from about 1:1 to about 1:4.  (More precise figures,
Makefile and ghostscript tweak patches on demand.)

Tested on mmix-knuth-mmixware.

gcc:
	* config/mmix/mmix.md: Update FIXME to not mention
	define_constants.
	(MMIX_rJ_REGNUM): New define_constants constant.
	("movqi", "movsi", "movdi", "*movdicc_real_foldable",
	"*movdicc_real"): Adjust contraints formatting.
	("*bCC_foldable"): Add %+ for P in output format and delete FIXME
	for branch prediction.
	("*bCC", "*bCC_inverted_foldable", "*bCC_inverted"): Add %+ in
	output template.
	("*call_real", "*call_value_real", "nonlocal_goto_receiver",
	"*nonlocal_goto_receiver_expanded"): Use MMIX_rJ_REGNUM instead of
	number.  Delete related FIXMEs.
	* config/mmix/mmix.h (MMIX_INCOMING_RETURN_ADDRESS_REGNUM): Change
	from number to MMIX_rJ_REGNUM.
	(TARGET_MASK_BRANCH_PREDICT): New.
	(TARGET_DEFAULT): Change to TARGET_MASK_BRANCH_PREDICT.
	(TARGET_SWITCHES): Update comment.  Correct -mno-toplevel-symbols
	value.  Add -mbranch-predict and -mno-branch-predict.
	(TARGET_VERSION): Drop date.
	(ADDITIONAL_REGISTER_NAMES): Use MMIX_rJ_REGNUM, not number.
	* config/mmix/mmix.c (mmix_encode_section_info): Correct condition
	for finding out global symbols.
	(mmix_asm_output_labelref): Revert condition for global symbol.
	(mmix_print_operand): <case '+'>: Emit P for a likely branch.
	(mmix_print_operand_punct_valid_p): A '+' is valid.

gcc/testsuite:

	* gcc.dg/mmix-1.c: New test.

*** /dev/null	Tue Jan  1 05:00:00 1980
--- gcc.dg/mmix-1.c	Tue Jan  1 11:39:25 2002
***************
*** 0 ****
--- 1,42 ----
+ /* Origin: <hp@bitrange.com>
+    Test that MMIX -mtoplevel-symbols cause a ":" to be prepended on the
+    right symbols and only there.  */
+ /* { dg-do compile { target mmix-*-* } } */
+ /* { dg-options "-mtoplevel-symbols" } */
+
+ static int static_variable = 1;
+ int global_initialized_variable = 2;
+ extern int extern_declared_variable;
+ int common_variable;
+ extern int extern_declared_function (void);
+ static int static_function (void);
+
+ int global_defined_function ()
+ {
+   static int static_variable_in_function = 2009;
+   return
+     static_variable
+     + static_variable_in_function++
+     + global_initialized_variable
+     + common_variable
+     + extern_declared_function ()
+     + static_function ();
+ }
+
+ static int
+ static_function (void)
+ {
+   if (extern_declared_variable)
+     return 42;
+   else
+     return 42 + global_defined_function ();
+ }
+
+ /* { dg-final { scan-assembler-not ":static_variable" } } */
+ /* { dg-final { scan-assembler-not "(^|\[^:\])global_initialized_variable" } } */
+ /* { dg-final { scan-assembler-not "\[^:\]extern_declared_variable" } } */
+ /* { dg-final { scan-assembler-not "\[^:\]common_variable" } } */
+ /* { dg-final { scan-assembler-not "\[^:\]extern_declared_function" } } */
+ /* { dg-final { scan-assembler-not ":static_function" } } */
+ /* { dg-final { scan-assembler-not "(^|\[^:\])global_defined_function" } } */
+ /* { dg-final { scan-assembler-not "\[^:\]extern_declared_variable" } } */

Index: mmix.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.c,v
retrieving revision 1.9
diff -p -c -r1.9 mmix.c
*** mmix.c	2001/12/30 16:48:59	1.9
--- mmix.c	2002/01/01 19:15:17
*************** mmix_encode_section_info (decl)
*** 1683,1692 ****
  {
    /* Test for an external declaration, and do nothing if it is one.  */
    if ((TREE_CODE (decl) == VAR_DECL
!        && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))
!        && ! TREE_STATIC (decl))
!       || (TREE_CODE (decl) == FUNCTION_DECL
! 	  && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl))))
      ;
    else if (DECL_P (decl))
      {
--- 1683,1690 ----
  {
    /* Test for an external declaration, and do nothing if it is one.  */
    if ((TREE_CODE (decl) == VAR_DECL
!        && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl)))
!       || (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl)))
      ;
    else if (DECL_P (decl))
      {
*************** mmix_encode_section_info (decl)
*** 1697,1704 ****
  	 Note that this does not work for data that is declared extern and
  	 later defined as static.  If there's code in between, that code
  	 will refer to the extern declaration.  And vice versa.  Until we
! 	 can get rid of mmixal, we have to assume that code is well-behaved
! 	 or come up with a contorted scheme to work around bad code.  */

        const char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0);
        int len = strlen (str);
--- 1695,1702 ----
  	 Note that this does not work for data that is declared extern and
  	 later defined as static.  If there's code in between, that code
  	 will refer to the extern declaration.  And vice versa.  Until we
! 	 can get rid of mmixal, we have to assume that code is
! 	 well-behaved.  */

        const char *str = XSTR (XEXP (DECL_RTL (decl), 0), 0);
        int len = strlen (str);
*************** mmix_asm_output_labelref (stream, name)
*** 2043,2053 ****
       FILE *stream;
       const char *name;
  {
!   int is_extern = 0;

    for (; (*name == '@' || *name == '*'); name++)
      if (*name == '@')
!       is_extern = 1;

    asm_fprintf (stream, "%s%U%s",
  	       is_extern && TARGET_TOPLEVEL_SYMBOLS ? ":" : "",
--- 2041,2051 ----
       FILE *stream;
       const char *name;
  {
!   int is_extern = 1;

    for (; (*name == '@' || *name == '*'); name++)
      if (*name == '@')
!       is_extern = 0;

    asm_fprintf (stream, "%s%U%s",
  	       is_extern && TARGET_TOPLEVEL_SYMBOLS ? ":" : "",
*************** mmix_print_operand (stream, x, code)
*** 2112,2117 ****
--- 2110,2125 ----
      {
        /* Unrelated codes are in alphabetic order.  */

+     case '+':
+       /* For conditional branches, output "P" for a probable branch.  */
+       if (TARGET_BRANCH_PREDICT)
+ 	{
+ 	  x = find_reg_note (current_output_insn, REG_BR_PROB, 0);
+ 	  if (x && INTVAL (XEXP (x, 0)) > REG_BR_PROB_BASE / 2)
+ 	    putc ('P', stream);
+ 	}
+       return;
+
      case 'B':
        if (GET_CODE (x) != CONST_INT)
  	fatal_insn ("MMIX Internal: Expected a CONST_INT, not this", x);
*************** int
*** 2319,2326 ****
  mmix_print_operand_punct_valid_p (code)
       int code ATTRIBUTE_UNUSED;
  {
!   /* None at the moment.  */
!   return 0;
  }

  /* PRINT_OPERAND_ADDRESS.  */
--- 2327,2334 ----
  mmix_print_operand_punct_valid_p (code)
       int code ATTRIBUTE_UNUSED;
  {
!   /* A '+' is used for branch prediction, similar to other ports.  */
!   return code == '+';
  }

  /* PRINT_OPERAND_ADDRESS.  */
Index: mmix.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.h,v
retrieving revision 1.8
diff -p -c -r1.8 mmix.h
*** mmix.h	2001/12/30 16:48:59	1.8
--- mmix.h	2002/01/01 19:15:19
*************** Boston, MA 02111-1307, USA.  */
*** 45,51 ****
  #define MMIX_FRAME_POINTER_REGNUM 253
  #define MMIX_STACK_POINTER_REGNUM 254
  #define MMIX_LAST_GENERAL_REGISTER 255
! #define MMIX_INCOMING_RETURN_ADDRESS_REGNUM 259
  #define MMIX_HIMULT_REGNUM 258
  #define MMIX_REMAINDER_REGNUM 260
  #define MMIX_ARG_POINTER_REGNUM 261
--- 45,51 ----
  #define MMIX_FRAME_POINTER_REGNUM 253
  #define MMIX_STACK_POINTER_REGNUM 254
  #define MMIX_LAST_GENERAL_REGISTER 255
! #define MMIX_INCOMING_RETURN_ADDRESS_REGNUM MMIX_rJ_REGNUM
  #define MMIX_HIMULT_REGNUM 258
  #define MMIX_REMAINDER_REGNUM 260
  #define MMIX_ARG_POINTER_REGNUM 261
*************** extern int target_flags;
*** 156,161 ****
--- 156,162 ----
  #define TARGET_MASK_ZERO_EXTEND 8
  #define TARGET_MASK_KNUTH_DIVISION 16
  #define TARGET_MASK_TOPLEVEL_SYMBOLS 32
+ #define TARGET_MASK_BRANCH_PREDICT 64

  /* FIXME: Get rid of this one.  */
  #define TARGET_LIBFUNC (target_flags & TARGET_MASK_LIBFUNCS)
*************** extern int target_flags;
*** 164,174 ****
  #define TARGET_ZERO_EXTEND (target_flags & TARGET_MASK_ZERO_EXTEND)
  #define TARGET_KNUTH_DIVISION (target_flags & TARGET_MASK_KNUTH_DIVISION)
  #define TARGET_TOPLEVEL_SYMBOLS (target_flags & TARGET_MASK_TOPLEVEL_SYMBOLS)

! #define TARGET_DEFAULT 0

! /* FIXME: Provide a way to *load* the epsilon register.
!    Kill some of these; preferrably the -mint=* ones.  */
  #define TARGET_SWITCHES							\
   {{"libfuncs",		TARGET_MASK_LIBFUNCS,				\
     N_("For intrinsics library: pass all parameters in registers")},	\
--- 165,175 ----
  #define TARGET_ZERO_EXTEND (target_flags & TARGET_MASK_ZERO_EXTEND)
  #define TARGET_KNUTH_DIVISION (target_flags & TARGET_MASK_KNUTH_DIVISION)
  #define TARGET_TOPLEVEL_SYMBOLS (target_flags & TARGET_MASK_TOPLEVEL_SYMBOLS)
+ #define TARGET_BRANCH_PREDICT (target_flags & TARGET_MASK_BRANCH_PREDICT)

! #define TARGET_DEFAULT TARGET_MASK_BRANCH_PREDICT

! /* FIXME: Provide a way to *load* the epsilon register.  */
  #define TARGET_SWITCHES							\
   {{"libfuncs",		TARGET_MASK_LIBFUNCS,				\
     N_("For intrinsics library: pass all parameters in registers")},	\
*************** extern int target_flags;
*** 189,203 ****
    {"no-knuthdiv",	-TARGET_MASK_KNUTH_DIVISION, ""},		\
    {"toplevel-symbols",	TARGET_MASK_TOPLEVEL_SYMBOLS,			\
     N_("Prepend global symbols with \":\" (for use with PREFIX)")},	\
!   {"no-toplevel-symbols", 0,						\
     N_("Do not provide a default start-address 0x100 of the program")},	\
    {"elf", 0,								\
     N_("Link to emit program in ELF format (rather than mmo)")},		\
    {"",			TARGET_DEFAULT, ""}}

  /* Unfortunately, this must not reference anything in "mmix.c".  */
  #define TARGET_VERSION \
!   fprintf (stderr, " (MMIX) 2001-09-01")

  #define OVERRIDE_OPTIONS mmix_override_options ()

--- 190,208 ----
    {"no-knuthdiv",	-TARGET_MASK_KNUTH_DIVISION, ""},		\
    {"toplevel-symbols",	TARGET_MASK_TOPLEVEL_SYMBOLS,			\
     N_("Prepend global symbols with \":\" (for use with PREFIX)")},	\
!   {"no-toplevel-symbols", -TARGET_MASK_TOPLEVEL_SYMBOLS,		\
     N_("Do not provide a default start-address 0x100 of the program")},	\
    {"elf", 0,								\
     N_("Link to emit program in ELF format (rather than mmo)")},		\
+   {"branch-predict",	TARGET_MASK_BRANCH_PREDICT,			\
+    N_("Use P-mnemonics for branches statically predicted as taken")},	\
+   {"no-branch-predict",	-TARGET_MASK_BRANCH_PREDICT,			\
+    N_("Don't use P-mnemonics for branches")},				\
    {"",			TARGET_DEFAULT, ""}}

  /* Unfortunately, this must not reference anything in "mmix.c".  */
  #define TARGET_VERSION \
!   fprintf (stderr, " (MMIX)")

  #define OVERRIDE_OPTIONS mmix_override_options ()

*************** const_section ()						\
*** 1074,1080 ****

  #define ADDITIONAL_REGISTER_NAMES			\
   {{"sp", 254}, {":sp", 254}, {"rD", 256}, {"rE", 257},	\
!   {"rH", 258}, {"rJ", 259}}

  #define PRINT_OPERAND(STREAM, X, CODE) \
   mmix_print_operand (STREAM, X, CODE)
--- 1079,1085 ----

  #define ADDITIONAL_REGISTER_NAMES			\
   {{"sp", 254}, {":sp", 254}, {"rD", 256}, {"rE", 257},	\
!   {"rH", 258}, {"rJ", MMIX_rJ_REGNUM}}

  #define PRINT_OPERAND(STREAM, X, CODE) \
   mmix_print_operand (STREAM, X, CODE)
Index: mmix.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mmix/mmix.md,v
retrieving revision 1.3
diff -p -c -r1.3 mmix.md
*** mmix.md	2001/12/30 16:48:59	1.3
--- mmix.md	2002/01/01 19:15:20
***************
*** 36,48 ****

  ;; FIXME:s
  ;; - Use new formats; e.g. '{' not '"*{'.
- ;; - define_constants.

  ;; FIXME: Can we remove the reg-to-reg for smaller modes?  Shouldn't they
  ;; be synthesized ok?
  (define_insn "movqi"
!   [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r ,r ,x ,r,r,m,??r")
! 	(match_operand:QI 1 "general_operand"	    "r,LS,K,rI ,x,m,r,n"))]
    ""
    "@
     SET %0,%1
--- 36,51 ----

  ;; FIXME:s
  ;; - Use new formats; e.g. '{' not '"*{'.

+ (define_constants
+   [(MMIX_rJ_REGNUM 259)]
+ )
+
  ;; FIXME: Can we remove the reg-to-reg for smaller modes?  Shouldn't they
  ;; be synthesized ok?
  (define_insn "movqi"
!   [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r ,r,x ,r,r,m,??r")
! 	(match_operand:QI 1 "general_operand"	    "r,LS,K,rI,x,m,r,n"))]
    ""
    "@
     SET %0,%1
***************
*** 70,76 ****

  ;; gcc.c-torture/compile/920428-2.c fails if there's no "n".
  (define_insn "movsi"
!   [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r ,r ,x,r,r,m,??r")
  	(match_operand:SI 1 "general_operand"	    "r,LS,K,r,x,m,r,n"))]
    ""
    "@
--- 73,79 ----

  ;; gcc.c-torture/compile/920428-2.c fails if there's no "n".
  (define_insn "movsi"
!   [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r ,r,x,r,r,m,??r")
  	(match_operand:SI 1 "general_operand"	    "r,LS,K,r,x,m,r,n"))]
    ""
    "@
***************
*** 85,91 ****

  ;; We assume all "s" are addresses.  Does that hold?
  (define_insn "movdi"
!   [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r ,r ,x,r,m ,r,m,r,??r")
  	(match_operand:DI 1 "general_operand"	    "r,LS,K,r,x,I,m,r,s,n"))]
    ""
    "@
--- 88,94 ----

  ;; We assume all "s" are addresses.  Does that hold?
  (define_insn "movdi"
!   [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r ,r,x,r,m,r,m,r,??r")
  	(match_operand:DI 1 "general_operand"	    "r,LS,K,r,x,I,m,r,s,n"))]
    ""
    "@
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 692,699 ****
  	 (match_operator 2 "mmix_foldable_comparison_operator"
  			 [(match_operand 3 "register_operand" "r,r,r,r")
  			  (const_int 0)])
! 	 (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI, 0  ,rI,GM")
! 	 (match_operand:DI 4 "mmix_reg_or_8bit_operand" "0  ,rI,GM ,rI")))]
    ""
    "@
     CS%d2 %0,%3,%1
--- 695,702 ----
  	 (match_operator 2 "mmix_foldable_comparison_operator"
  			 [(match_operand 3 "register_operand" "r,r,r,r")
  			  (const_int 0)])
! 	 (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,0 ,rI,GM")
! 	 (match_operand:DI 4 "mmix_reg_or_8bit_operand" "0 ,rI,GM,rI")))]
    ""
    "@
     CS%d2 %0,%3,%1
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 703,716 ****

  (define_insn "*movdicc_real"
    [(set
!     (match_operand:DI 0 "register_operand"	   "=r	,r ,r  ,r")
      (if_then_else:DI
       (match_operator
        2 "mmix_comparison_operator"
!       [(match_operand 3 "mmix_reg_cc_operand"	    "r	,r ,r  ,r")
        (const_int 0)])
!      (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI, 0 ,rI, GM")
!      (match_operand:DI 4 "mmix_reg_or_8bit_operand" "0	,rI,GM ,rI")))]
    ""
    "@
     CS%d2 %0,%3,%1
--- 706,719 ----

  (define_insn "*movdicc_real"
    [(set
!     (match_operand:DI 0 "register_operand"	   "=r ,r ,r ,r")
      (if_then_else:DI
       (match_operator
        2 "mmix_comparison_operator"
!       [(match_operand 3 "mmix_reg_cc_operand"	    "r ,r ,r ,r")
        (const_int 0)])
!      (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,0 ,rI,GM")
!      (match_operand:DI 4 "mmix_reg_or_8bit_operand" "0 ,rI,GM,rI")))]
    ""
    "@
     CS%d2 %0,%3,%1
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 925,932 ****
  ;; FIXME: we can emit an unordered-or-*not*-equal compare in one insn, but
  ;; there's no RTL code for it.  Maybe revisit in future.

- ;; FIXME: Non/probable branches? Check for REG_BR_PROB note on the jump
- ;; insn and emit 'P' where suitable *and measure*.
  ;; FIXME: Odd/Even matchers?
  (define_insn "*bCC_foldable"
    [(set (pc)
--- 928,933 ----
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 937,943 ****
  	 (label_ref (match_operand 0 "" ""))
  	 (pc)))]
    ""
!   "B%d1 %2,%0")

  (define_insn "*bCC"
    [(set (pc)
--- 938,944 ----
  	 (label_ref (match_operand 0 "" ""))
  	 (pc)))]
    ""
!   "%+B%d1 %2,%0")

  (define_insn "*bCC"
    [(set (pc)
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 948,954 ****
  	 (label_ref (match_operand 0 "" ""))
  	 (pc)))]
    ""
!   "B%d1 %2,%0")

  (define_insn "*bCC_inverted_foldable"
    [(set (pc)
--- 949,955 ----
  	 (label_ref (match_operand 0 "" ""))
  	 (pc)))]
    ""
!   "%+B%d1 %2,%0")

  (define_insn "*bCC_inverted_foldable"
    [(set (pc)
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 960,966 ****
  		      (label_ref (match_operand 0 "" ""))))]
  ;; REVERSIBLE_CC_MODE is checked by mmix_foldable_comparison_operator.
    ""
!   "B%D1 %2,%0")

  (define_insn "*bCC_inverted"
    [(set (pc)
--- 961,967 ----
  		      (label_ref (match_operand 0 "" ""))))]
  ;; REVERSIBLE_CC_MODE is checked by mmix_foldable_comparison_operator.
    ""
!   "%+B%D1 %2,%0")

  (define_insn "*bCC_inverted"
    [(set (pc)
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 971,977 ****
  	 (pc)
  	 (label_ref (match_operand 0 "" ""))))]
    "REVERSIBLE_CC_MODE (GET_MODE (operands[2]))"
!   "B%D1 %2,%0")

  (define_expand "call"
    [(parallel [(call (match_operand:QI 0 "memory_operand" "")
--- 972,978 ----
  	 (pc)
  	 (label_ref (match_operand 0 "" ""))))]
    "REVERSIBLE_CC_MODE (GET_MODE (operands[2]))"
!   "%+B%D1 %2,%0")

  (define_expand "call"
    [(parallel [(call (match_operand:QI 0 "memory_operand" "")
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 1044,1051 ****
  	  (match_operand:DI 0 "mmix_symbolic_or_address_operand" "s,rU"))
  	 (match_operand 1 "" ""))
     (use (match_operand 2 "" ""))
!    ;; 259 is rJ (We can't use the symbolic name here.  FIXME: Yes we can.)
!    (clobber (reg:DI 259))]
    ""
    "@
     PUSHJ $%p2,%0
--- 1045,1051 ----
  	  (match_operand:DI 0 "mmix_symbolic_or_address_operand" "s,rU"))
  	 (match_operand 1 "" ""))
     (use (match_operand 2 "" ""))
!    (clobber (reg:DI MMIX_rJ_REGNUM))]
    ""
    "@
     PUSHJ $%p2,%0
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 1057,1064 ****
  	       (match_operand:DI 1 "mmix_symbolic_or_address_operand" "s,rU"))
  	      (match_operand 2 "" "")))
    (use (match_operand 3 "" ""))
!   ;; 259 is rJ (We can't use the symbolic name here.  FIXME: Yes we can.)
!   (clobber (reg:DI 259))]
    ""
    "@
     PUSHJ $%p3,%1
--- 1057,1063 ----
  	       (match_operand:DI 1 "mmix_symbolic_or_address_operand" "s,rU"))
  	      (match_operand 2 "" "")))
    (use (match_operand 3 "" ""))
!   (clobber (reg:DI MMIX_rJ_REGNUM))]
    ""
    "@
     PUSHJ $%p3,%1
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 1103,1110 ****
  (define_expand "nonlocal_goto_receiver"
    [(parallel [(unspec_volatile [(match_dup 0)] 1)
  	      (clobber (scratch:DI))
! 	      (clobber (reg:DI 259))])
!    (set (reg:DI 259) (match_dup 1))]
    ""
    "
  {
--- 1102,1109 ----
  (define_expand "nonlocal_goto_receiver"
    [(parallel [(unspec_volatile [(match_dup 0)] 1)
  	      (clobber (scratch:DI))
! 	      (clobber (reg:DI MMIX_rJ_REGNUM))])
!    (set (reg:DI MMIX_rJ_REGNUM) (match_dup 1))]
    ""
    "
  {
*************** DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\
*** 1126,1132 ****
  (define_insn "*nonlocal_goto_receiver_expanded"
    [(unspec_volatile [(match_operand:DI 0 "address_operand" "p")] 1)
     (clobber (match_scratch:DI 1 "=&r"))
!    (clobber (reg:DI 259))]
    ""
    "GETA $255,0f\;PUT rJ,$255\;LDOU $255,%a0\n\
  0: GET %1,rO\;CMPU %1,%1,$255\;BNP %1,1f\;POP 0,0\n1:")
--- 1125,1131 ----
  (define_insn "*nonlocal_goto_receiver_expanded"
    [(unspec_volatile [(match_operand:DI 0 "address_operand" "p")] 1)
     (clobber (match_scratch:DI 1 "=&r"))
!    (clobber (reg:DI MMIX_rJ_REGNUM))]
    ""
    "GETA $255,0f\;PUT rJ,$255\;LDOU $255,%a0\n\
  0: GET %1,rO\;CMPU %1,%1,$255\;BNP %1,1f\;POP 0,0\n1:")

brgds, H-P


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